Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
This plug-in for Nagios allows you to check if a disk needs to be defragmented.
Current Version
Last Release Date
2012-05-19
Owner
Alan
Website
http://www.alan-pipitone.com
Compatible With
bin and source
This plug-in helps you to monitor fragmented disks.
NB: It doesn't run a defrag, It only tells you if you have to defrag your disks.
To function properly it needs .Net Framework 2.0 or higher.
---------------------------------------------------------------------- HOW IT WORKS ----------------------------------------------------------------------
The plug-in queries windows through WMI. It returns a critical state (or an ok state) according to what windows returns. It works on windows 2003 and windows 2008.
The plug-in also return performance data.
---------------------------------------------------------------------- HOW TO INSTALL THE PLUG-IN ----------------------------------------------------------------------
This plug-in runs on a windows server that is checked by nagios. I used NSClient++ but i think that you can also use check_mk.
To print the help use the following command:
check_defrag.exe /h
If you use NSClient++ you have to copy check_defrag.exe into the scripts subfolder and then add the current lines into the NSC.ini file:
[NRPE Handlers]
check_ExecCustScript= scripts$ARG1$ $ARG2$
If the lines above do not work then you probably need to edit them according to the version of NSClient that you are using. I suggest you to increase the command_timeout in the NSC.ini
On Nagios server you have to define a new command:
define command { command_name check_defrag_nrpe command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 3600 -c check_execcustscript -a "check_defrag.exe" "$ARG1$" }
Now on Nagios server you can define a new service:
define service { use your_service_template host_name your_server service_description Disk Fragmentation C: D: check_command check_defrag_nrpe!C: D: }
---------------------------------------------------------------------- ONE LAST NOTE ----------------------------------------------------------------------
I defined this command on NSClient:
This allows you to define several commands on Nagios without edit NSC.ini of your servers.
For example, you can put (on the NSClient++ scripts subfolder of your windows server) a.exe, b.exe, c.bat and then define the following commands on Nagios:
define command { command_name check_a command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_execcustscript -a "a.exe" "$ARG1$" }
define command { command_name check_b command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_execcustscript -a "b.exe" "$ARG1$" }
define command { command_name check_c command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_execcustscript -a "c.bat" "$ARG1$" }
For any questions or concerns please contact me: http://www.alan-pipitone.com/contact.php
Alan Pipitone.
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!