check_sqljob.sh

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: check_sqljob.sh

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_sqljob.sh

Post by Box293 »

Lets change the group to the nagios group:

Code: Select all

chown root:nagios /usr/bin/java
Does that fix your problem?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: check_sqljob.sh

Post by braindope »

Hi Box,

Sorry for the late reply, still the output is
unknown

:( :(
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_sqljob.sh

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
braindope
Posts: 80
Joined: Fri Sep 26, 2014 12:13 am

Re: check_sqljob.sh

Post 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:
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_sqljob.sh

Post 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!
Former Nagios employee
Locked