[Nagiosplug-devel] check_sql patch for check MSSQL backup jobs

Mattias Ryrlén mattias.ryrlen at op5.com
Thu Dec 18 22:36:21 CET 2008


Got tiered to write the MSSQL backup job check on commandline and never 
got right on the "fnutts" and escapes.

so i integrated it into check_sql, could probably improve it but im tierd :)

-o MSSQLJOB -n "job name" is added.

Check:
root at support-mon-gbg2:/tmp# ./check_sql -H 192.168.1.8 -d Sybase -U 
"monitor-svcacc" -P "apa" -D msdb -o MSSQLJOB -n "pubs backup"

Result:
CHECK_SQL OK - SQL Server MSSQLJOB: pubs backup : The job succeeded. The 
Job was invoked by Schedule 1 (pubs daily backup).  The last step to run 
was step 1 (Step 1). (0.035919 seconds) | time=0.035919s;;

Check:
root at support-mon-gbg2:/tmp# ./check_sql -H 192.168.1.8 -d Sybase -U 
"monitor-svcacc" -P "apa" -D msdb -o MSSQLJOB -n "op5 backup"

Result:
CHECK_SQL OK - SQL Server MSSQLJOB: op5 backup : The job succeeded.  The 
Job was invoked by Schedule 3 (Schedule 1).  The last step to run was 
step 1 (Step 1). (0.023689 seconds) | time=0.023689s;;

Check:
root at support-mon-gbg2:/tmp# ./check_sql -H 192.168.1.8 -d Sybase -U 
"monitor-svcacc" -P "apa" -D msdb -o MSSQLJOB -n "master backup"

Result:
CHECK_SQL OK - SQL Server MSSQLJOB: master backup : The job succeeded. 
The Job was invoked by Schedule 2 (master daily backup).  The last step 
to run was step 1 (Step 1). (0.015828 seconds) | time=0.015828s;;


-- 
Vänliga hälsningar / Best Regards
Mattias Ryrlén

__________________________
op5 AB
Första Långgatan 19
SE-413 27 Göteborg
Mobil: +46 735-17 70 99
Support: +46 31-774 09 24
www.op5.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_sql.diff
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20081218/4e51b768/attachment.ksh>


More information about the Devel mailing list