
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
Project Files
File | Description |
---|---|
mssqljob.zip | MSSQL Job Monitoring plugin , Source code and Documentation |
Project Notes
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?
thank you very much
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:
: 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.
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!
after service definition plugin go into "unknown" status
Can someone help me????
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
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.