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
MSSQL Job Monitoring
Re: MSSQL Job Monitoring
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?
When it shows up as UNKNOWN, does it give any more info in the description?
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: MSSQL Job Monitoring
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
And no it doesn't give any more of a description after UNKNOWN:
Thanks again
Re: MSSQL Job Monitoring
i would suggest trying this:
chown nagios.nagcmd <path to the plugin>
chmod 775 <path to plugin>
chown nagios.nagcmd <path to the plugin>
chmod 775 <path to plugin>
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: MSSQL Job Monitoring
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?
Any ideas?
Re: MSSQL Job Monitoring
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!
Re: MSSQL Job Monitoring
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
}
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
}
Re: MSSQL Job Monitoring
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>
Re: MSSQL Job Monitoring
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/javaBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL Job Monitoring
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
Thanks,
Kent