8.3.6 Newly installing JP1/IM - Agent with integrated agent host (for UNIX)
Install the JP1/IM - Agent on the local disk of the primary server and the secondary server.
-
Newly installing JP1/IM - Agent.
For details on how to install the software, see 2.3.1(2) Procedure of JP1/IM - Agent installation.
Select "Normal installation mode" for the installation mode.
This command is executed for both the primary server and the secondary server.
Do not start the JP1/IM - Agent service on the physical host. If it is running, stop it.
-
Create a directory for logical host on the shared disk.
A directory created on a shared disk for logical host is called a shared directory. Create according to the following rules:
-
The path length of the shared disk is within 63 bytes.
-
The characters that can be used in the path of a shared disk are alphanumeric characters, hyphens, underscores, periods, and path separators.
-
If you create more than one logical host, make sure that it does not overlap with other logical host shared directories.
-
-
Create the contents of the shared directory.
- Steps to be taken when physical host has not yet started operation
-
Copy the directory below of physical host to the shared directory.
When copying, the owner, the owner group, and the permission are inherited and copied.
Copy source
Copy destination
/opt/jp1ima/conf
Shared-directory/jp1ima/
/opt/jp1ima/bin
/opt/jp1ima/data
/opt/jp1ima/logs
/opt/jp1ima/tmp
-
Empty the contents of bin directory.
Delete all files in the shared directory/jp1ima/bin directory.
You must keep bin directory.
-
Delete the definition file for physical host.
Files in the shared-directory/jp1ima/conf with extensions other than ".model" and ".update" are definition file for physical host and therefore delete.
- If you have already started operation on physical host
-
Create the following directory in the shared directory.
Go to the shared directory at the command prompt, and then execute the following command:
mkdir -m 700 jp1ima/ mkdir -m 777p1ima/conf/ mkdir -m 700 jp1ima/conf/secret/ mkdir -m 700 jp1ima/conf/user/ mkdir -m 700 jp1ima/conf/user/cert/ mkdir -m 700 jp1ima/conf/user/secret/ mkdir -m 700 jp1ima/conf/jpc_file_sd_config_off/ mkdir -m 700 jp1ima/bin/ mkdir -m 700 jp1ima/data/ mkdir -m 700 jp1ima/data/alertmanager/ mkdir -m 700 jp1ima/data/prometheus_server/ mkdir -m 700 jp1ima/data/fluentd/ mkdir -m 700 jp1ima/logs/ mkdir -m 700 jp1ima/logs/imagent/ mkdir -m 700 jp1ima/logs/imagentproxy/ mkdir -m 700 jp1ima/logs/imagentaction/ mkdir -m 700 jp1ima/logs/alertmanager/ mkdir -m 700 jp1ima/logs/prometheus_server/ mkdir -m 700 jp1ima/logs/node_exporter/ mkdir -m 700 jp1ima/logs/blackbox_exporter/ mkdir -m 700 jp1ima/logs/ya_cloudwatch_exporter/ mkdir -m 700 jp1ima/logs/process_exporter/ mkdir -m 700 jp1ima/logs/promitor_scraper/ mkdir -m 700 jp1ima/logs/promitor_resource_discovery/ mkdir -m 700 jp1ima/logs/script_exporter/ mkdir -m 700 jp1ima/logs/fluentd/ mkdir -m 700 jp1ima/logs/tools/ mkdir -m 700 jp1ima/tmp/ mkdir -m 700 jp1ima/tmp/upload mkdir -m 700 jp1ima/tmp/download mkdir -m 700 jp1ima/tmp/lockfiles chown -R root:root jp1ima
-
Copy file to a shared directory.
Copy file with the extensions ".model" and ".update" in /opt/jp1ima/conf of the primary server to the shared-directory/jp1ima/conf.
When copying, assume the owner, owner group, and permissions.
-
Add initial secret.
Add initial secret with the secret administration command. Here is the command line:
jimasecret -add -key immgr.initial_secret -s "initial-secret" -l shared-directory
-
Setup password of JP1/IM agent control base proxies.
If agent host connects to the manager host through a proxy that requires authentication, the proxy's authentication ID must setup password.
For setup of authentication ID of the proxy, see 2.19.2(2)(e) Setup the proxy authentication's authentication ID and Password (optional). Note that definition file is file under the shared directory.
Password of the proxy is setup with the secret administration command. Here is the command line:
jimasecret -add -key immgr.proxy_user.authentication-ID -s "password-of-proxies" -l shared-directory
-
-
Removes ".model" or ".update" from file name of the definition file.
For all definition file that you copied to the shared-directory/jp1ima/conf, remove ".model" or ".update" that is granted to the end of file name.
-
Configure TLS settings.
When operating with TLS enabled, place the CA certificate file in the shared-directory/jp1ima/conf/user/cert.
Also, enter the full path of the CA certificate in the immgr.tls_config.ca_file of the shared-directory/jp1ima/conf/jpc_imagentcommon.json.
-
Modify the variables listed in definition file.
Copy definition file in the shared-directory/jp1ima/conf contains the variable-names listed in the tables below. Search for each variable name and rewrite all corresponding parts as shown in the table below.
Variable name
Value to be rewritten
@@immgr.host@@
Replace with host name of the destination manager host.
@@immgr.imbase_port@@
Replace with port number of imbase process to connect to.
@@immgr.imbaseproxy_port@@
Replace with port number of imbase proxy process to connect to.
@@immgr.proxy_url@@
If you are connecting to Integrated manager host through a proxy, replace it with URL of the proxy.
If not through a proxy, replace it with an empty string.
@@immgr.proxy_user@@
If the proxy requires authentication, replace it with user name of the proxy.
Replace it with an empty string if it is not through a proxy or if it is not authentication.
@@hostname@@
Replace with logical host.
@@installdir1@@
Replace with "/opt".
@@installdir2@@
Replace with the path of the shared directory.
-
Change to IP binding method.
Both physical host and logical host must be setup.
For physical host, both nodes require setup. For physical host, restart of the service is required after changing setup.
In physical host, physical host name is setup to the changes in the definition file as shown below.
Service
Target file
Change point
prometheus_server
/usr/lib/systemd/system/jpc_prometheus_server.service
Specify the physical host name for --web.listen-address.
--web.listen-address="host-name:port"
alertmanager
/usr/lib/systemd/system/jpc_alertmanager.service
Specify the physical host name for --web.listen-address.
--web.listen-address="host-name:port"
node_exporter
/usr/lib/systemd/system/jpc_node_exporter.service
Specify the physical host name for --web.listen-address.
--web.listen-address="host-name:port"
blackbox_exporter
/usr/lib/systemd/system/jpc_blackbox_exporter.service
Specify the physical host name for --web.listen-address.
--web.listen-address="host-name:port"
ya_cloudwatch_exporter
/usr/lib/systemd/system/jpc_ya_cloudwatch_exporter.service
Specify the physical host name for -listen-address.
-listen-address="host-name:port"
fluentd
None
Not applicable
jpc_ya_cloudwatch_exporter
Unit definition file located in /usr/lib/systemd/system
Specify the IP address of the physical host for -listen-address
jpc_process_exporter
Unit definition file located in /usr/lib/systemd/system
Specify the IP address of the physical host for --web.listen-address
jpc_promitor_scraper
Runtime configuration file located in /opt/jp1ima/conf/promitor/scraper/
Specify the IP address of the physical host for resourceDiscovery.host
jpc_promitor_resource_discovery
None
Not applicable
jpc_script_exporter
Unit definition file located in /usr/lib/systemd/system
Specify the IP address of the physical host for --web.listen-address
jpc_fluentd (log metrics feature)
Log metrics definition file located in /opt/jp1ima/conf/user
Specify the IP address of the physical host for bind
Also, "IP" is setup to the change point of definition file below.
Service
Target file
Change point
-
imagent
-
imagentproxy
/opt/jp1ima/conf/jpc_imagentcommon.json
Specify "IP" in the JP1_BIND_ADDR.
In logical host, logical host is named setup to the changes in definition file below.
Service
Target file
Change point
imagent
Shared-directory/jp1ima/conf/jpc_imagent.service
Add the command line option -hostname to the command line as follows.
ExecStart = "/opt/jp1ima/ bin/imagent" -hostname logical-host-name
imagentproxy
Shared-directory/jp1ima/conf/jpc_imagentproxy.service
Add the command line option -hostname to the command line as follows.
ExecStart = "/opt/jp1ima/ bin/imagentproxy" -hostname logical-host-name
imagentaction
Shared-directory/jp1ima/conf/jpc_imagentaction.service
Add the command line option -hostname to the command line as follows.
ExecStart = "/opt/jp1ima/ bin/imagentaction" -hostname logical-host-name
prometheus_server
Shared-directory/jp1ima/conf/jpc_prometheus_server.service
Specify the logical host name for --web.listen-address.
--web.listen-address="host-name:port"
alertmanager
Shared-directory/jp1ima/conf/jpc_alertmanager.service
Specify the logical host name for --web.listen-address.
--web.listen-address="host-name:port"
node_exporter
Shared-directory/jp1ima/conf/jpc_node_exporter.service
Specify the logical host name for --web.listen-address.
--web.listen-address="host-name:port"
blackbox_exporter
Shared-directory/jpc_blackbox_exporter.service
Specify the logical host name for --web.listen-address.
--web.listen-address="host-name:port"
ya_cloudwatch_exporter
Shared-directory/jpc_ya_cloudwatch_exporter.service
Specify the logical host name for -listen-address.
-listen-address="host-name:port"
fluentd
None
-
jpc_ya_cloudwatch_exporter
Unit definition file located in /usr/lib/systemd/system (for logical host)
Specify the IP address of the logical host for -listen-address
jpc_process_exporter
Unit definition file located in /usr/lib/systemd/system (for logical host)
Specify the IP address of the logical host for --web.listen-address
jpc_promitor_scraper
Runtime configuration file located in shared-directory/jp1ima/conf/promitor/scraper/
Specify the IP address of the logical host for resourceDiscovery.host
jpc_promitor_resource_discovery
None
Not applicable
jpc_script_exporter
Unit definition file located in /usr/lib/systemd/system (for logical host)
Specify the IP address of the logical host for --web.listen-address
jpc_fluentd(log metrics feature)
Log metrics definition file located in shared-directory/jp1ima/conf/user
Specify the IP address of the logical host for bind
Also, "IP" is setup to the change point of definition file below.
Service
Target file
Change point
-
imagent
-
imagentproxy
Shared-directory/jp1ima/conf/jpc_imagentcommon.json
Specify "IP" in the JP1_BIND_ADDR.
For promitor_scraper and promitor_resource_discovery, prepare new ports for the logical host and specify the portsas the value of the key in their definition file listed in the following table.
Service
Definition file
Key to be modified
Value
promitor_scraper
Promitor Scraper runtime configuration file located in shared-directory/jp1ima/conf/promitor/scraper
server.httpPort
Port number of promitor_scraper
resourceDiscovery.port
Port number of promitor_resource_discovery
romitor discovery configuration file located in shared-directory/jp1ima/conf
targets
Port number of promitor_scraper
promitor_resource_discovery
Promitor Resource Discovery runtime configuration file located in shared-directory/jp1ima/conf/promitor/resource-discovery
server.httpPort
Port number of promitor_resource_discovery
-
-
Give logical host to Description of unit definition file.
Give all unit definition file in the shared-directory/jp1ima/conf a logical host to Description listed in file.
File name of unit definition file: jpc_service-name.service
Please implement this procedure for services that are not in use.
The following shows a sample editing procedure for jpc_alertmanager.service.
Before change
After change
Description = JPC Alertmanager
Description = JPC Alertmanager logical-host-name
-
Give logical host name to file name of unit definition file.
Give logical host name to file name of unit definition file under the shared-directory/jp1ima/conf.
File name before change:jpc_service name.service
File name after change: jpc_ service-name_logical-host-name.service
Please implement this procedure for services that are not in use.
The following shows a sample jpc_alertmanager.service.
File name before change
File name after change
jpc_alertmanager.service
jpc_alertmanager_logical-host-name.service
-
Copy unit definition file to /usr/lib/systemd/system.
Copy unit definition file (File renamed in step 9) in the shared-directory/jp1ima/conf to /usr/lib/systemd/system of both the primary server and the secondary server.
Be sure to copy it to /usr/lib/systemd/system. If the file is moved, the appropriate context may not be set in the unit definition file in the case of SELinux, and systemd may not recognize it.
In the copied unit definition file, set permission 644, owner root:root.
If you modify the contents of the unit definition file after placing it in /usr/lib/systemd/system, execute the following command to reload systemd.
# systemctl daemon-reload
-
Delete unit definition file in the shared directory.
Delete unit definition file (Copy source file in step 9) at the bottom of the shared-directory/jp1ima/conf because it is not required.
-
Disable services for logical hosts that you do not use.
For services used on logical hosts, disable services for logical hosts that are not used on both the running and standby servers.
To disable services on a logical host, use the following command:
/opt/jp1ima/tools/jpc_service -off service-key -h logical-host
The following is an example of disabling the Alertmanager service:
/opt/jp1ima/tools/jpc_service -off jpc_alertmanager -h logical-host
Also, for services not used by logical hosts, move the following discovery configuration file from the shared-directory/jp1ima/conf directory to the shared-directory/jp1ima/conf/jpc_file_sd_config_off 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 systemd has registered to servicing.
On both the primary server and the secondary server, display the service list of systemd to confirm that the service for logical host has been registered.
The name of the service for logical host is file name of unit definition file.
-
Perform the required setup.
8.3.7 Setting up the JP1/IM - Agent during new installation (for UNIX) and 2.19.2 Settings of JP1/IM - Agent to make the required configuration changes.
-
Reister the service for logical host in the cluster software.
For JP1/IM - Agent service's registration to the clustered software, see 8.5 Registering into the cluster software during new installation and setup (for UNIX).
Also, register only the services you will use from listed in the following table, with your cluster software.
-
jpc_ya_cloudwatch_exporter
-
jpc_process_exporter
-
jpc_promitor_scraper
-
jpc_promitor_resource_discovery
-
jpc_script_exporter
-
jpc_fluentd
-
-
Setup JP1/IM - Agent to determine if it has stopped servicing for one minute on setup of the clusters.
If you upload the definition file to integrated operation viewer, restart of the service might occur after you deploy the definition file.
Also, if the content of the uploaded definition file is invalid and the service fails to start, the definition file is restored and the service is started.
As described above, you should setup the clusters to prevent them from detecting a temporary service outage because service might be temporarily stopped.
-
Check for problems in operation.
-
Start the service from the cluster software.
-
Causes a failover.
-