IBM DB2 agent
Prerequisites
- For prerequisite checks for agent installation, see Prerequisite checks for agent installation.
- URL/IP of the SixthSense collector (your tenant URL, which will be provided by Customer Support).
- Access token from the SixthSense portal. For accessing the token, see Accessing your Access Token under Getting started with the Observability Portal.
- IBM DB2 Database must be available on a VM or container.
- IBM DB2 Client installed on the host where the agent will run to fetch data.
- After extracting IBM DB2 client, configure the DB2 client environment by exporting these variables:
export DB2_HOME=/Users/path/clidriver
export DB2INSTANCE=db2inst1
export DB2LIB=/Users/path/clidriver/lib
export CGO_CFLAGS=-I/Users/path/clidriver/include
export CGO_LDFLAGS=-v -L/Users/path/clidriver/lib
export LD_LIBRARY_PATH=/Users/path/clidriver/lib
- IBM DB2 database details (host name, port, database name, database user credentials).
- Package token to download the agent (which will be provided by Customer Support).
- For information about supported agent versions and framework, see Supported agents.
Downloading the Agent version 5.0.0 (latest)
For Windows and Linux based OS, use the following link.
curl --header "PRIVATE-TOKEN:<TOKEN>" --output meter-agent.zip "https://artifacts-observability.sixthsense.rakuten.com/api/v4/projects/32/packages/generic/Meter-Agent/v5.0.0/meter-agent.zip"
note
The agent depends on the Operating System and architecture.
Database User Permissions
To capture database metrics from the IBM DB2, you must first create a DB2 user with read permissions to all the monitored databases mentioned in above ss-ibmdb2-config.yaml
Configuring the IBM DB2 agent
- Open the config file
< path to Meter Agent >/Meter-Agent-v5.0.0/Configs/ss-ibmdb2-config.yaml
- Update ss-ibmdb2-config.yaml as per the instructions mentioned in the configuration file.
# sixthsense-ibmdb2-agent can be configured via yaml or environment variables
sixthsense:
# Identifier for this IDM DB2 Instance in SixthSense
service_name: <SERVICE_NAME>
# For GCP: grpc-collector-observability.sixthsense.rakuten.com:443
# (One Cloud) For connectivity to backend using intra public network: 133.237.176.44:80
# (One Cloud) For connectivity to backend using onecloud private network: 100.99.116.221:80
sixthsense_backend: <custom-sixthsense_backend-url>
# Login to Sixthsense UI --> Go to Settings on Side Navbar --> Copy Access Token
authentication: <custom-service-authKey>
# debug|error|info
logging: info
# log file path
logPath: < path to downloaded database monitoring Agent >/Meter-Agent-v5.0.0/logs/db2.log
# SSL connection with backend true|false (For One Cloud, secure: false)
secure: true
# DB2 for IBM DB2 Database
type: DB2
# Used to configure polling frequency (optional), default polling frequency is 60 sec.
# cron: "* * * * *"
# Hostname & Port of the IBM DB2 Instance.
hostname: <db2_HOST_IP>
port: <db2_PORT> #50000
# User credentials which is used to poll the data from IBM DB2.
user: <db2_USER> #DB2INST1
password: <db2_PASSWORD>
# Databases list monitored by the agent.
db:
databases:
- DBname1
- DBname2
- DBname3
# Set "true" to skip Custom Queries data ingestion.
disableCDQ: true
- Save and close the file.
Run/Start the Agent
- Run the Database Monitoring Agent manually with below command to monitor IBM DB2 Databse
./< path to Meter Agent >/Meter-Agent-v5.0.0/Linux/meter-agent-db2-v5.0.0 < path to Meter Agent >/Meter-Agent-v5.0.0/Configs/ss-ibmdb2-config.yaml &
- In case of network restrictions, pass proxy to the meter-agent process to be able to connect to sixthsense-backend. ( Linux Based Hosts )
HTTPS_PROXY=proxy-server:port ./< path to Meter Agent >/Meter-Agent-v5.0.0/Linux/meter-agent-db2-v5.0.0 < path to Meter Agent >/Meter-Agent-v5.0.0/Configs/ss-ibmdb2-config.yaml
Register & Start the agent as a Service ( Windows )
- Register Database Monitoring Agent as a service in Windows with following command to monitor IBM DB2
sc create "Sixthsense IBMDB2 Agent" binPath= "\"< path to Meter Agent >\Meter-Agent-v5.0.0\Windows\meter-agent-db2-v5.0.0.exe\" -config \"< path to Meter Agent >\Meter-Agent-v5.0.0\ss-ibmdb2-config.yaml\"" start= auto
Confirm whether the service is registered by opening Services and search for the Service Name - Sixthsense IBM DB2 Agent with which you've registered.
Run the service by opening the Services again and look for Service name - Sixthsense IBMDB2 Agent > Start OR sc start <service_name>.
Example: sc start "Sixthsense IBM DB2 Agent"
note
- ( Windows based Hosts ) - Edit your host file on IBM DB2 Host to configure proxy OR you can use below command to configure proxy via administrator command prompt.
netsh winhttp set proxy <proxy>:<port>
Validate Database Monitoring Agent is running on Host
- On Linux based Hosts, use
ps -ef | grep meter-agent
- On Windows Hosts
open the Services window OR open command prompt and run following command
sc query "Sixthsense IBMDB2 Agent"
Visualise IBM DB2 data
- Once Agent is installed & configured successfully, data can be visualised in IBMDB2 Dashboard.
- IBM DB2 metrics listed here, IBMDB2 Metrics