Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
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
Owner
Gregor
License
GPL
Compatible With
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.
Where are you suppose to place the script on the client or the nagios server? I mean where does it run from?
You must be logged in to submit a review.
To:
From: