SQLServer

Check SQL Database Size (with NRPE)

Description:

A VB script which can be used with NRPE to check the size of a given SQL database.

Current Version

v1.0

Last Release Date

2015-04-29

Compatible With

  • Nagios 4.x

Owner

License

GPL


Project Files
Project Photos
Project Notes
As I couldn't find a script/plugin that did exactly what I needed I put this VB script together to check the size of a SQL database with NRPE and NS Client++. The sizes are all in MB. Usage: cscript check_sqldbsize.vbs SERVERINSTANCE DATABASE WARNING CRITICAL eg. cscript check_sqldbsize.vbs localhostsqlexpress edgesight 5000 9000 Nagios Command Definition Example define command { command_name check_sqldbsize command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_sqldbsize -a $ARG1$ $ARG2$ $ARG3$ $ARG4$ } Nagios Service Definition Example (Note the double back slash () before the instance name) define service { use generic_passive_service service_description SQL DB Size host_name server1 check_command check_sqldbsize!localhostsqlexpress!edgesight!8000!9500 } NS Client++ (nsclient.ini) Example [/settings/external scripts/scripts] check_sqldbsize = cscript.exe //T:5 //NoLogo "C:Program FilesNSCLient++scriptscheck_sqldbsize.vbs" $ARG1$ $ARG2$ $ARG3$ $ARG4$ Tested with: -Nagios Core 4.0.8 -NSClient++ v0.4.1.105 -SQL Server 2008 Express Change Log v1.1: Exclude Log from DB size Any comments/suggestions appreciated.
Reviews (1) Add a Review
This is nice but .....
by mac1959, October 31, 2016

Where are you suppose to place the script on the client or the nagios server? I mean where does it run from?



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 (1)
Favorites
0
Views
17,803