SQLServer

MSSQL Job Monitoring

Description:

The MSSQL Job Monitoring is designed to monitor sql jobs. The main reason for doing this, this plugin pulls information on Job Details such as Job Name, step name, Current Status, Last Run Status, server, message. This information about Jobs Details allows DBAs to identify if automated tasks are executed properly as planned. This saves DBAs a lot of time and effort instead of monitoring them manually.

Current Version

0.1.1

Last Release Date

2010-07-25

Compatible With

  • Nagios 3.x

Owner


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Photos
Project Notes
1.Download mssqljob.zip extract that file.Folder contains SqlJobMon.class, url.properties, check_sqljob.sh sqljdbc.jar, MSSQL_JOB.doc, a folder which consists of java source code. 2. Copy files SqlJobMon.class,url.properties,check_sqljob.sh and sqljdbc.jar into libexec directory(eg /usr/local/nagios/libexec). 3. Edit the check_sqljob.sh file and set CLASSPATH corresponding to where you put class file SqlJobMon.class and sqljdbc.jar on your machine. 4. Edit url.properties file and set HTML_DIR and HTML_LINK corresponding to nagios share folder on your machine. (eg: HTML_DIR=/usr/local/nagios/share/ HTML_LINK=/nagios/sqllog). This file consists of where to create html file and HTML link for plugin output. sample usage of the plugin -------------------------- sh check_sqljob.sh -H 10.25.5.115 -u Nagios -p Fefr6dre plugin output will be CRITICAL: Number of Jobs Failed:9|count=9 sh check_sqljob.sh -h Usage: check_sqljob.sh -H hostaddress -u {username} -p {password} -h for help -H (hostaddress) -u (username) -p (password) Example command check_sqljob -H 10.70.5.45 -u sa -p s22css
Reviews (13) Add a Review
fine for general purpose
by jshipe, March 31, 2014
The plugin functions as intended but there are some unnecessary features that I would like to disable. Overall the configurability is lacking.
Helpful? Yes  No 
HTML Ref not working
by gtown1_sj, November 30, 2013
I am running core 3.5.1 on SLES 11 SP3 and the HTML ref is not working properly. It gets the info manually but not from service.

Manually -
sudo -u nagios /usr/lib/nagios/plugins/check_sqljob.sh -H -u user -p passwd
OK: Number of Jobs Failed:0|count=0

Nagios run:
usherdbt02;Failed Jobs;OK;SOFT;2; OK: Number of Jobs Failed:0

The link is also bad in Nagios:
http://nagios/nagios/cgi-bin/null/-2013-11-08.html

Any ideas? what am I missing?
Helpful? Yes  No 
Jobs SqL Nagios
by egalstad, June 30, 2013
Very good afternoon my name is Osman Panama writing from the truth I have a little problem, I have set up a nagios 3.2.1 on my system I have all monitoring well but I was asked to configure SQL server 2008 jobs I've seen on the website of nagios some cases but honestly I could not give the matter would like to know is can you give me a step by step that I must put in where and what should I set

thank you very much
Helpful? Yes  No 
UNKNOWN status
by bbradley, August 31, 2012
I can get this plugin to run from a command line all day long under the nagios and root user but when I set it up in nagiosxi and returns unknown every time. What am I missing?
Helpful? Yes  No 
Error running plugin
by L0cayta, July 31, 2012
Getting this error when running the plugin.

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/local/nagios/libexec/,file:/usr/local/nagios/libexec/sqljdbc.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.10)
at java.lang.ClassLoader.loadClass(libgcj.so.10)
at java.lang.ClassLoader.loadClass(libgcj.so.10)
at java.lang.Class.forName(libgcj.so.10)
at SqlJobMon.main(SqlJobMon.java:97)
UNKNOWN:
Helpful? Yes  No 
About the error
by jetole, December 31, 2011
If you're getting the error

: bad variable nameH

This is because it's a Windows formatted file. Not sure how a Windows formatted bash script came to exist anywhere but there is one in this release. The difference is that Linux and Unix (which includes Mac OSX) use n for newlines in their text files while Windows uses rn for new lines in their text files.

To convert the file to unix format you can use the command fromdos or on some systems, the older command dos2unix.

...or you could try out my much simpler Python check I wrote to do the same thing as this script and more without requiring compiled Java binaries in order to work. It's a simple, single, Python script with no other files combined with it that you can get from either:

http://exchange.nagios.org/directory/Plugins/Databases/SQLServer/MSSQL-Job-History/details

or

https://github.com/jetole/MSSQL-Job-History

Doesn't require Java. Doesn't have Windows line endings, provides more options and gives more detailed reports.
Helpful? Yes  No 
Doesn't Work For Me!
by logoldman, November 30, 2011
Running on Ubuntu:

I can't use this plugin.
I can't run this command:
sh check_sqljob -h

Because this wrote:

: bad variable nameH

Can you help me?

Thanks
Helpful? Yes  No 
JAVA Source issue
by Khoneini, November 30, 2010
Hi muthu,
First of all, really thanks for sharing this script with us. I'm trying to rewrite the java source so I can specify a Job name instead of all job names of a MSSQL server.
I'm stuck on some parts of the java source code, mind helping me out? You can contact me on sjorrs[at]gmail.com ofcourse I will share the source after it is working!
Cheers!
Helpful? Yes  No 
strange problem
by mad12, November 30, 2010
running command from console plug-in work fine
after service definition plugin go into "unknown" status
Can someone help me????
Owner's Reply:

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


2 of 3 found this review helpful.
Helpful? Yes 2 No 1
Windows Auth
by hjolli, September 30, 2010
Is it not possible to use windows Auth with this plugin ? we only run our servers with Windows authentication

ps on the current version I had to do dos2ux for the check_sqljob.sh to even run
Helpful? Yes  No 
bad variable nameH
by bigpeti_nagios, August 31, 2010
I can't use this plugin.
I can't run this command:
sh check_sqljob -h

Because this wrote:

: bad variable nameH

Can you help me?

thanks

Peter
Helpful? Yes  No 
is it open source?
by lausser, July 31, 2010
It's a few lines shell script around binary java files hiding the core functionality. Any chance to see the source code? I won't let this connect to my databases and do whatever without having the slightest idea what's inside.
Owner's Reply:

Hi
yes its open source, i shared the source code mssqljob.zip file. Because i am changing some of the logic. So that i did not shared the code. I tested thoroughly last week its working fine for me. I included a design and installation document with that zip file.


0 of 2 found this review helpful.
Helpful? Yes  No 2
Awesome...
by madhusudhan, June 30, 2010
This one just works fine..... Hats off!!
Owner's Reply:

Thanks lot


0 of 1 found this review helpful.
Helpful? Yes  No 1
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
3.4 (24)
Favorites
4
Views
1,382,133