MSSQL Job Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
easy2kent
Posts: 45
Joined: Wed Aug 24, 2011 11:11 am

MSSQL Job Monitoring

Post by easy2kent »

I have been working on getting the MSSQL Job Monitoring plugin to work and I have gotten it to work in the command line but when I add as a service it comes back unknown. The user mad12 commented with the same error but the fix the owner suggested still returns the same error. I have JRE 1.6.0 installed.

Any suggestions?

Thanks

Running:
Linux 32
VMWare Image
No special config
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: MSSQL Job Monitoring

Post by nscott »

What is the ownership of the MSSQL plugin? Can you login and run the check command as nagios? When you login just do an 'su nagios' and then try and run the command.

When it shows up as UNKNOWN, does it give any more info in the description?
Nicholas Scott
Former Nagios employee
easy2kent
Posts: 45
Joined: Wed Aug 24, 2011 11:11 am

Re: MSSQL Job Monitoring

Post by easy2kent »

The owner is root and it will not run after su nagios. That seems to be the problem. What would the fix be? Change the owner to nagios?

And no it doesn't give any more of a description after UNKNOWN:

Thanks again
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: MSSQL Job Monitoring

Post by nscott »

i would suggest trying this:

chown nagios.nagcmd <path to the plugin>
chmod 775 <path to plugin>
Nicholas Scott
Former Nagios employee
easy2kent
Posts: 45
Joined: Wed Aug 24, 2011 11:11 am

Re: MSSQL Job Monitoring

Post by easy2kent »

Thanks for the reply, now it works with the root user and su nagios but it still comes up as UNKNOWN when ran in the Web GUI. I am thinking about scrapping it although the functionality of the plugin is useful.

Any ideas?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL Job Monitoring

Post by lmiltchev »

Can you post the working check command that you are currently using from the command-line? We will also need to see the check command and service definitions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
easy2kent
Posts: 45
Joined: Wed Aug 24, 2011 11:11 am

Re: MSSQL Job Monitoring

Post by easy2kent »

Sure, the command line command is ./check_sqljob.sh -H (host) -u (user) -p (password)
The command definition is:

define command {
command_name check_sqljob
command_line $USER1$/check_sqljob.sh -H $ARG1$ -u $ARG2$ -p $ARG3$
}

The service definition is:

define service {
host_name DB Server
service_description SQL Jobs
check_command check_sqljob!(ip of server)!(username)!(password)!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 0
first_notification_delay 0
notification_period 24x7
notification_options w,u,r,c,f,s
notifications_enabled 0
contacts nagiosadmin
contact_groups admins
register 1
}
easy2kent
Posts: 45
Joined: Wed Aug 24, 2011 11:11 am

Re: MSSQL Job Monitoring

Post by easy2kent »

I tried solving this issue again today. I found the Plugin Tool wizard from the Nagios Exchange to test plugins and commands. Now when tested as a plugin and as a command the output is correct (Critical or OK) but when I actually add it to my configuration the output is still Unknown. Here is what the output is supposed to be: <a href=/nagios/sqllog/(hostip)-2011-09-12.html target=main> CRITICAL: Number of Jobs Failed:9|count=9</a>
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL Job Monitoring

Post by lmiltchev »

Have you tried the solution (aimed at solving the "unkown status" problem), that the developer posted on Nagios Exchange?

Code: Select all

Edit check_sqljob.sh script and replace javacmd=`which java`
with actual path of java
below is an example
javacms=/usr/local/java/bin/java
Be sure to check out our Knowledgebase for helpful articles and solutions!
easy2kent
Posts: 45
Joined: Wed Aug 24, 2011 11:11 am

Re: MSSQL Job Monitoring

Post by easy2kent »

Yes I read that and that was one of the first things I changed. Still the same error though. I tried contacting the developer and will see if they have any answers. Could the newer version of Nagios XI be the problem?

Thanks,
Kent
Locked