Page 1 of 1

check_hadr_status on a linux db2-server with several databases

Posted: Wed Mar 13, 2019 8:56 am
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...

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

Posted: Wed Mar 13, 2019 4:09 pm
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
}

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

Posted: Fri Mar 15, 2019 4:25 am
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.

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

Posted: Fri Mar 15, 2019 10:04 am
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