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...
check_hadr_status on a linux db2-server with several databases
-
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
Hello, @welbp00 . First, try manually running the plugin with arguments from the command line:
# -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
# Parameters:/home/nagios/scripts/check_hadr_status -i /home/db2inst1 -d sample
# -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.
Re: check_hadr_status on a linux db2-server with several dat
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.
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
Great!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.
Locking thread