Page 1 of 1

db2 script monitoring

Posted: Mon Jan 16, 2017 5:34 am
by raamardhani7
Hi team,

We wrote script to check progress of DB2 backup. Script contain some db2 command / query to execute.

But whenever i tried to execute them using "nagios" user it throws error while its running fine using DB2 instance user ID. File has 755 permission.

Is there any alternative to monitor this script in Nagios without NRPE or can we monitor this using check_by_ssh? If yes advise me about check_by_ssh.

Thanks.

Re: db2 script monitoring

Posted: Mon Jan 16, 2017 12:27 pm
by ssax
Please try running su - nagios before running the plugin manually from the CLI, this may show the issue.

One of the main problems (usually) is that the PATH variable doesn't get set like it normally does so even running su - nagios beforehand is not a direct comparison.

Make sure that you specify the full path to all binaries in your scripts to prevent this.


Thank you