Hitachi

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


2.21.1 Configuring OracleDB exporter

This section describes how to configure OracleDB exporter, an optional feature of integrated agent host.

Organization of this subsection

(1) Preparing for setting up OracleDB exporter

This is the same as for Windows. See 1.23.1(1) Preparing for OracleDB exporter configuration.

(2) Installing OracleDB exporter

This is the same as for Windows. See 1.23.1(2) Installing OracleDB exporter.

(3) Uninstalling OracleDB exporter

This is the same as for Windows. See 1.23.1(3) Uninstalling OracleDB exporter.

(4) Configuring OracleDB exporter

This section explains how to configure OracleDB exporter.

(a) Adding monitoring targets (Required)

■ Preparing to add monitoring targets

This is the same as for Windows. See Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

■ Configuring OracleDB exporter

  1. Create a unit definition file.

    Copy the source unit definition file and rename it to the destination filename.

    The owner and owner group of the created unit definition file should be root, and the access rights should be 644.

    Source filename: OracleDB exporter location/oracledb_exporter_linux/jp1ima/conf/oracledb_exporter_@@instance@@.service.model

    Destination file name:

    • For physical host operation

      OracleDB exporter location/oracledb_exporter_linux/jp1ima/conf/oracledb_exporter_instance name#.service

    • For logical host operation

      OracleDB exporter location/oracledb_exporter_linux/jp1ima/conf/oracledb_exporter_instance name#_logical hostname.service

    #

    For instance name, specify the name determined in Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

  2. Updating unit definition file.

    Modify the following values of unit definition file created in step 1 as shown in the tables.

    Value to be changed

    Value to specify

    @@instance@@

    • For physical host operation

    Replace with the name determined in step 1 of Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

    • For logical host operation

    Replace with the name determined in step 1 of Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required) with the name "_logical host name".

    @@oracledb_exporter_installdir@@

    Replace with OracleDB exporter location.

    @@port@@

    Replace with the port number determined in step 2 of Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

    For a logical host, specify the logical host name, and replace it so that --web.listen-address="logical host name: port number".

    @@installdir2@@

    Replace with the directory confirmed in step 3 of Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

    @@data_source_name@@

    Replace with the content confirmed in step 4 of Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

  3. Register the unit definition file in systemd.

    Copy# the unit definition file updated in step 2 to the following directory. For logical host operation, copy on both nodes of the cluster.

    Destination directory: /usr/lib/systemd/system

    #

    Please copy, not move. If you move, SELinux permissions may not be set correctly and the services may not start correctly.

    After copying the unit definition file to the destination directory, run the following command to reload systemd. For logical host operation, execute the command on both nodes of the cluster.

    systemctl daemon-reload

    If you want the system to start automatically when OS is started in physical-host operation, execute the following command. In the case of logical host operation, automatic startup is not performed.

    systemctl enable service name
  4. Create a log directory.

    Create a log directory in the location of the OracleDB exporter.

    The owner and owner group of the created directory should be root, and the access rights should be 700.

    • For physical host operation

      Where to deploy the OracleDB exporter/oracledb_exporter_linux/jp1ima/logs/oracledb_exporter/instance name#

    • For logical host operation

      OracleDB exporter location/oracledb_exporter_linux/jp1ima/logs/oracledb_exporter/instance name#_logical hostname

    #

    For instance name, specify the name determined in Preparing to add a monitoring target in 1.23.1(4)(a) Adding a monitoring target (Required).

  5. Register the password of the user used to connect to Oracle Database.

    Register the password of the user used to connect to Oracle Database with the jimasecret command.

    • For physical host operation

      jimasecret -add -key OracleDB.user.username -s password

    • For logical host operation

      jimasecret -add -key OracleDB.user.username -s password -l shared directory

    If you want to register users with the same username but different passwords, you can use a key that includes the host name and the service name.

    For more information about jimasecret commands, see jimasecret in Chapter 1. Commands in the manual JP1/Integrated Management 3 - Manager Command, Definition File and API Reference.

  6. Register the service in the cluster software.

    In the case of a cluster configuration, the service is registered in the cluster software.

  7. Start the OracleDB exporter service.

    Start the OracleDB exporter service with the systemctl start command.

    For a cluster configuration, start the service from the cluster software.

  8. Confirm that OracleDB exporter can acquire the performance data.

    Access the following URL with the curl command or browser and check whether the performance information has been obtained.

    http://hostname:port /metrics

    The hostname is the host on which OracleDB exporter is booting, and the port is the listen port of OracleDB exporter.

■ Configuring Prometheus

This is the same as for Windows. See Configuring Prometheus in 1.23.1(4)(a) Adding a monitoring target (Required).

■ Configuring Intelligent Integrated Management Base

This is the same as for Windows. See Configuring Intelligent Integrated Management Base in 1.23.1(4)(a) Adding a monitoring target (Required).

(b) Change the port for OracleDB exporter (Optional)

This is the same as for Windows. See 1.23.1(4)(b) Changing OracleDB exporter port (Optional).

(c) Change the password for the connection (Optional)

This is the same as for Windows. See 1.23.1(4)(c) Change the password for connecting (Optional).

(d) Delete a monitoring target (Optional)

■ Configuring Prometheus

This is the same as for Windows. See Configuring Prometheus in 1.23.1(4)(d) Deleting a monitoring target (Optional).

■ Configuring Prometheus

This is the same as for Windows. See Removing OracleDB exporter from Cluster Software in 1.23.1(4)(d) Deleting a monitoring target (Optional).

■ Configuring OracleDB exporter

  1. Stop the monitoring target OracleDB exporter service that you want to delete.

    Stop the OracleDB exporter service with the systemctl start command.

  2. Delete the unit definition file.

    Delete the unit definition file shown below.

    • For physical host operation

      oracledb_exporter_instance name_service

    • For logical host operation

      oracledb_exporter_instance name_logical host name_service

    For logical host operation, delete on both nodes of the cluster.

  3. Refresh systemctl.

    Execute the following command to refresh systemctl.

    systemctl daemon-reload

    For logical host operation, delete on both nodes of the cluster.

  4. Deletes the password for the user used to connect to Oracle Database.

    If you are not using the same user in another OracleDB exporter, use jimasecret command to delete the registered password.

    • For physical host operation

      jimasecret -rm -key OracleDB.user.username

    • For logical host operation

      jimasecret -rm -key OracleDB.user.username -s password -l shared directory

    If you register by specifying a key that includes a host name or listener name, specify that key.

(e) Configuring OracleDB exporter life-and-death monitoring (Optional)

This is the same as for Windows. See 1.23.1(4)(e) Settng up OracleDB exporter life-and-death monitoring (Optional).

(f) Modifying users for connections (Optional)

  1. Add a new person to Oracle Database.

  2. Stop OracleDB exporter.

  3. Delete the password of the user before the change.

    Use jimasecret command to delete the password of the user used to connect to Oracle Database.

    • For physical host operation

      jimasecret -rm -key OracleDB.user.old username

    • For logical host operation

      jimasecret -rm -key OracleDB.user.old username -l shared directory

    If you want to register users with the same user name but different passwords, use a key that includes the host name and the service name.

  4. Register the password of the user after change.

    Register the password of the user used to connect to Oracle Database with the jimasecret command.

    • For physical host operation

      jimasecret -add -key OracleDB.user.new username -s password

    • For logical host operation

      jimasecret -add -key OracleDB.user.new username -s password -l shared directory

    If you want to register users with the same user name but different passwords, you can use a key that includes the host name and the service name.

  5. Modify the environment variable DATA_SOURCE_NAME.

    Open unit definition file in a text editor, change the username in the environment variable DATA_SOURCE_NAME to the new username, and save it.

  6. Start OracleDB exporter.

  7. Deletes the previous person from Oracle Database.

    If the old user is not needed, remove the old user from Oracle Database.

(5) Cluster environment

This is the same as for Windows. See 1.23.1(5) Cluster environment.