check_hadr_status on a linux db2-server with several databases

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
welbp00
Posts: 50
Joined: Fri Mar 08, 2019 5:48 am

check_hadr_status on a linux db2-server with several databases

Post by welbp00 »

Another question: i try to run the plugin check_hadr_status on a linux db2-server with several databases. How and what parameter do i use in the confuration..?

I am such a newbee...
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: check_hadr_status on a linux db2-server with several dat

Post by npolovenko »

Hello, @welbp00 . First, try manually running the plugin with arguments from the command line:
/home/nagios/scripts/check_hadr_status -i /home/db2inst1 -d sample
# Parameters:
# -d | --database : Database name.
# -h | --help : Show the help of this script.
# -i | --instance : Home directory of the instance. Usually it is
# /home/db2inst1.
# -K | --mk : Change the output for Check_MK.
# -T | --trace : Trace mode. Writes output in /tmp.
# -v | --verbose : Execute the program in verbose mode.
# -V | --version : Show the current version of this script.

If running the plugin from the command line provides the right output you can use command definitions from the following page:
https://github.com/angoca/monitor-db2-w ... adr_status
define command {
command_name check_hadr_status
command_line $USER1$/check_by_ssh -H $HOSTADDRESS$ -l nagios -t 20 -C "scripts/check_hadr_status -i '$ARG1$' -d '$ARG2$'"
}
define service{
host_name db2server
service_description HADR status
check_command check_hadr_status!/home/db2inst1!sample
use generic-service
}

define service{
host_name db2server
service_description HADR status
check_command check_nrpe_1arg!hadr_status
use generic-service
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
welbp00
Posts: 50
Joined: Fri Mar 08, 2019 5:48 am

Re: check_hadr_status on a linux db2-server with several dat

Post by welbp00 »

Hi npolovenko.

Thnx for the advice, got it working.

The issue for me was that there are more than 1 database to monitor.
Now i understand i have to make a command check for each database.

Thnx.

Regards,

Paul.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: check_hadr_status on a linux db2-server with several dat

Post by scottwilkerson »

welbp00 wrote:Hi npolovenko.

Thnx for the advice, got it working.

The issue for me was that there are more than 1 database to monitor.
Now i understand i have to make a command check for each database.

Thnx.

Regards,

Paul.
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked