Page 2 of 2

Re: check_sqljob.sh

Posted: Mon Mar 02, 2015 7:19 pm
by braindope
Hi jdalrymple,

below is the output, can you direct me to the easiest and simplest way to resolved my issue, thanks :D :D :D

[root@pwnagios ~]# ll /usr/bin/java
lrwxrwxrwx 1 root root 22 Feb 18 14:48 /usr/bin/java -> /etc/alternatives/java

As far as i know the server only host our nagios

Re: check_sqljob.sh

Posted: Mon Mar 02, 2015 7:50 pm
by Box293
Lets change the group to the nagios group:

Code: Select all

chown root:nagios /usr/bin/java
Does that fix your problem?

Re: check_sqljob.sh

Posted: Wed Mar 04, 2015 6:37 pm
by braindope
Hi Box,

Sorry for the late reply, still the output is
unknown

:( :(

Re: check_sqljob.sh

Posted: Thu Mar 05, 2015 12:47 am
by Box293
Try setting the debug level on and then restart Nagios.

Code: Select all

sed -i 's/.*debug_level=.*/debug_level=-1/g' /usr/local/nagios/etc/nagios.cfg
service nagios restart
Then go and schedule an immediate check of the service

This will be logged in the file /usr/local/nagios/var/nagios.debug
You will see how the command is constructed and what is being executed.
Does this help identify anything?

When you are finished this turns debugging off:

Code: Select all

sed -i 's/.*debug_level=.*/debug_level=0/g' /usr/local/nagios/etc/nagios.cfg
service nagios restart

Re: check_sqljob.sh

Posted: Tue Mar 10, 2015 4:35 am
by braindope
Hi,


I can't still see any hint on my error.. after debugging :( , any other idea?


Update:

I have successfully fixed my error, what i did is i just add

define command{
command_name check_sqllog
command_line $USER1$/check_sqllog -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}

to my commands.cfg :D and it magically work :lol: :lol: :lol:

Re: check_sqljob.sh

Posted: Tue Mar 10, 2015 10:31 am
by tmcdonald
Good to hear!

I'll be closing this thread now, but feel free to open another if you need anything in the future!