Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Configuration Guide


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.

  1. 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.

  2. 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.

  3. Create the contents of the shared directory.

    - Steps to be taken when physical host has not yet started operation

    1. 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

    2. Empty the contents of bin directory.

      Execution file that you copied to the shared directory /jp1ima/bin directory is not used. Delete if you want to free up disk space.

      You must keep bin directories.

    3. 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

    1. 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 700 jp1ima/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/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
    2. 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.

    3. 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 directories

    4. 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 directories

  4. 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.

  5. 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.

  6. 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.

  7. 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

    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

    Specify a logical host name with the -hostname option.

    -hostname host-name

    imagentproxy

    Shared-directory/jp1ima/conf/jpc_imagentproxy.service

    Specify a logical host name with the -hostname option.

    -hostname host-name

    imagentaction

    Shared-directory/jp1ima/conf/jpc_imagentaction.service

    Specify a logical host name with the -hostname option.

    -hostname 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

    -

    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.

  8. 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

    The following shows a sample editing procedure for jpc_alertmanager.service.

    Before change

    After change

    Description = JPC Alertmanager

    Description = JPC Alertmanager logical-host-name

  9. 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

    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

  10. Copy unit definition file to /usr/lib/systemd/system.

    Copy unit definition file (File renamed in step 8) 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
  11. 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.

  12. 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-name -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

  13. 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.

  14. Perform the required setup.

    8.3.7 Setting up the JP1/IM - Agent during new installation (for UNIX) and 2.19.2 Change Setup in JP1/IM - Agent to make the required configuration changes.

  15. 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).

  16. 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.

  17. Check for problems in operation.

    • Start the service from the cluster software.

    • Causes a failover.