1.21.1 Setup for JP1/IM - Agent service
- 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.
Note that the log metrics feature itself cannot be started or stopped because it is a Fluentd plug-in. The log metrics feature starts or stops as Fluentd starts or stops.
(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 Overview and System 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.
Agent-path\tools\jpc_service_stop -s all
-
Execute the following command to Enable the service.
Agent-path\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 Agent-path\conf\jpc_file_sd_config_off folder to Agent-path\conf folder.
Service
Discovery configuration file
prometheus_server
None
alertmanager
None
windows_exporter
jpc_file_sd_config_windows.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
promitor
jpc_file_sd_config_promitor.yml
script_exporter
None
-
-
Verify that the service is Enabled.
At the command prompt, execute "services.msc" to see the service in management console. If the service exists, the service is Enabled.
-
Execute "1.21.2(16) Creation and import of IM management node tree data (for Windows) (mandatory).
(b) Disable 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.
Agent-path\tools\jpc_service_stop -s all
-
Disable the service by execute the following command:
Agent-path\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 Agent-path\conf folder to Agent-path\conf\jpc_file_sd_config_off folder.
Service
Discovery configuration file
prometheus_server
None
alertmanager
None
windows_exporter
jpc_file_sd_config_windows.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
promitor
jpc_file_sd_config_promitor.yml
script_exporter
None
-
-
Verify that the service is disabled.
At the command prompt, execute "services.msc" to see the service in management console. If the service does not exist, the service is disabled.
(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
At the command prompt, execute "services.msc" to see the service in management console.
Open the properties of the applicable service and it is enabled if the "Startup Type" is "Automatic" or "Automatic (Delayed)". Otherwise, 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 Auto-stop in OS Shutdown
Manually shut down all integrated agent services prior to shutting down Windows. Shutting down Windows does not wait for the service outage completed, so if you shut down Windows while the service is running, the service may not be able to terminate normally. If this happens, Error or Warnings may be output in the event log, and the contents of integrated agent logs around OS shutdown may be incorrect. In addition, it may take a while for the next service to start.
(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 agent service. |
jpc_service_stop |
Stop 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
At the command prompt, execute "services.msc" to see the service in management console. Check Status of the target service.
(5) Location of configuration file
When installing, place imagent, imagentproxy, imagentaction, and service definition file for each add-on program in the following location:
For details about the service definition file, see Service definition file (jpc_program-name_service.xml) in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
Location (path) |
Typical Uses |
Layout method |
---|---|---|
Agent-path\conf\ (for physical hosts) |
Model file (service definition file template) Do not edit the model file. |
Place in the installer. |
Shared-disk\JP1ima\conf\ (for logical hosts) |
Model file (service definition file template) Do not edit the model file. |
Manually place. |
Agent-path\bin\ |
Service definition file main unit Do not edit the model file. |
Place by initial setting command for Physical host and by manually for Logical host. |
(6) Edit Configuration file
If you want to change setup of a service, edit service definition file. If you have edited service definition file, reflection method of the definition depends on the parameter you have changed, and going to be one of the following:
-
Uninstall the service (Execute the jpc_service disable command) and reinstall it (Execute the jpc_service enable command).
-
Restart the service
-
Save Service definition file
For details, see When the definitions are applied in Service definition file (jpc_program-name_service.xml in Chapter 2. Definition Files in the JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.
(7) Notes on changing Setup of service-auto-start
<startmode> in service definition file enables you to setup the service-auto-start. However, because the jpc_service_autostart command or Windows service's setup can be directly changed to change setup of the service-auto-start, setup of the <startmode> specified in service definition file and current setup of the service-auto-start do not always match.
(8) Notes on disabling services
If you Execute the jpc_service disable command to disable the service, the invalidation may fail if service definition file does not exist or service definition file content is incorrect. If this happens, Execute the following command with administrator privileges.
SC Delete Service name