2.19.1 Setup for JP1/IM - Agent servicing
- Organization of this subsection
(1) Enable or disable add-on program
This section explains how to enable or disable add-on program. JP1/IM - Agent contains more than one add-on programs and can only start services that are enabled.
(a) Enable add-on programs
- To setup when installing
In initial setting command to use when installing, select add-on program that you want to enable.
For details, see 3.15.9 Initial setting command in the JP1/Integrated Management 3 - Manager Deployment and Design Guide.
During the version upgrade installation, the existing settings are inherited. However, add-on programs that is newly added in new Version are in the disabled Status.
- To setup after installing
The following are the steps to enable add-on program services for a JP1/IM - Agent:
-
If the service is running, execute the following command to terminate.
/opt/jp1ima/tools/jpc_service_stop -s all
-
Execute the following command to enable the service.
/opt/jp1ima/tools/jpc_service -on [Service-key-of-JP1/IM-Agent]
-
Move the discovery configuration file corresponding to the service.
Move the discovery configuration file corresponding to the following services from the /opt/jp1ima/conf/jpc_file_sd_config_off directory to /opt/jp1ima/conf directory:
Service
Discovery configuration file
prometheus_server
None
alertmanager
None
node_exporter
jpc_file_sd_config_node.yml
blackbox_exporter
-
jpc_file_sd_config_blackbox_http.yml
-
jpc_file_sd_config_blackbox_icmp.yml
ya_cloudwatch_exporter
jpc_file_sd_config_cloudwatch.yml
fluentd
None
process_exporter
jpc_file_sd_config_process.yml
promitor
jpc_file_sd_config_promitor.yml
script_exporter
None
-
-
Verify that the service is enabled.
Execute systemctl list-unit-files command. It is enabled if value of STATE of the corresponding service is not "masked".
-
Perform 2.19.2(17) Creating and importing IM management node tree data (for Linux) (mandatory).
(b) Disabling add-on program
The following are the steps to disable service of add-on program for a JP1/IM - Agent:
-
If the service is running, execute the following command to terminate.
/opt/jp1ima/tools/jpc_service_stop -s all
-
Disable the service by execute the following command:
/opt/jp1ima/tools/jpc_service -off [Service-key-of-JP1/IM-Agent]
-
Move the discovery configuration file corresponding to the service.
Move the discovery configuration file corresponding to the following services from the /opt/jp1ima/conf/jpc_file_sd_config_off directory to /opt/jp1ima/conf directory:
Service
Discovery configuration file
prometheus_server
None
alertmanager
None
node_exporter
jpc_file_sd_config_node.yml
blackbox_exporter
-
jpc_file_sd_config_blackbox_http.yml
-
jpc_file_sd_config_blackbox_icmp.yml
ya_cloudwatch_exporter
jpc_file_sd_config_cloudwatch.yml
fluentd
None
process_exporter
jpc_file_sd_config_process.yml
promitor
jpc_file_sd_config_promitor.yml
script_exporter
None
-
-
Verify that the service is disabled.
Execute systemctl list-unit-files command. It is disabled if value of STATE of the corresponding service is "masked".
(2) Enable and Disable of Auto-start
(a) Enable for Auto-start
To enable the service-auto-start when OS starts, follow these steps:
-
Execute the following command to enable all the auto-start of services on JP1/IM - Agent.
jpc_service_autostart -on
(b) Disable for Auto-start
To disable the service-auto-start when OS starts, follow these steps:
-
Execute the following command to disable all the auto-start of services on JP1/IM - Agent.
jpc_service_autostart -off
(c) How to Check Automatic Start and Stop
Check with the following command.
systemctl list-unit-files
If value of the corresponding service's STATE is "enabled," it is enable. It is disabled if it is "disabled". For details about the service name, see 2.9 Service of JP1/IM - Agent in the JP1/Integrated Management 3 - Manager Overview and System Design Guide
(d) Notes on Automatically Stopping During OS Shutdown
Although integrated agent service is stopped when shuts down Linux while integrated agent service is running, /var/log/messages file may not receive an message indicating that integrated agent service is stopped.
(3) How to start and stop manually
To start or stop JP1/IM - Agent manually, use the following command:
Command |
Description |
---|---|
jpc_service_start |
Start the Agent service. |
jpc_service_stop |
Stop the Agent service. |
For details of the command, see the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
(4) How to check Startup status of a service
Check with the following command.
systemctl list-units --all --type=service
Starting if ACTIVE column is "active", otherwise it is Stopped.
(5) Location of configuration file
Place systemd's unit definition file in the following location:
For details about the unit definition file, see Unit definition file (jpc_program-name.service) in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
Location (path) |
Typical Uses |
Layout method |
---|---|---|
/opt/jp1ima/conf/ (For Physical host) |
Model file (unit definition file template) Do not edit the model file. |
Place in the installer. |
Shared-disk/jp1ima/conf/ (For Logical host) |
Model file (unit definition file template) Do not edit the model file. |
Place manually. |
/usr/lib/systemd/system/ |
Unit definition file main unit. Edit this file. Systemd uses this file. |
It is initial setting command for the physical host and manually for the logical host. |
(6) Configuration file editing
If you want to change setup of a service, you can do so by editing unit definition file. If you have edited unit definition file, to reflect definition, you need to execute the following command with a user who has root permission:
systemctl daemon-reload