db2 script monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

db2 script monitoring

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: db2 script monitoring

Post 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
Locked