Home
Random
Log in
Settings
About Apoyar Wiki
Disclaimers
Apoyar Wiki
Search
Editing
Check defrag probe not working on Nagios
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Checking Defrag Probe not working on Nagios ------------------------------------------ We have a problem with WG-DC1 -Defragmentation. Lets look on nagios machine /usr/local/etc/nagios/objects $ vi service.cfg /defrag Command is : check_defrag ! βC1β Lets go to command $ vi command.cfg Defrag command $USER1$|Check_nrpe3 -H $HOSTADDRESS$ -n -t 7200 -c check-defrag -a $ARG1$ (its not always easy to get the metrics from a windows machine and lets execute the command on nagios machine $ /usr/local/libexec/nagios/check-nrpe3 -H dc1.wise.apoyar -n -t 7200 -c check_defrag -a c: It is easy with NRPE. Go to DC1 Server. Start Services Stop the NSClient++ Monitoring agent Now we try running it manually Start CMD(Admin) We find the NSClient++ in the local disk this is the windows server which takes all the commands and requests from nrpe, browses them and keeps all the information about. Local Disk --- Program Files β NSClient++--NSCP. In Command Prompt C:β\program Filesβ\NSClient++β Nscp Go to command prompt admin C:\program files\NSClient++ > cd Scripts C: \program files\NSClient++\scripts > check_defrag( this command is missing ) We need to get the contents from other any other server Go to folders Search : \\dc\\ Network>dc>c$>programfiles>NSClient++>Scripts (this script folder contains pre installed scripts and custom scripts , Copy them) Go back to previous folder Local disk>program files> NSClieent++>scripts folder Paste it (skip files which are same now we can see check defrag script in the folder) Now we try running the command C:\ program files\NSClient++\scripts > check_defrag.exe C: a dialogue box displays with some message(the following feature couldnβt be installed .NET Framework 3.5(includes >NET 2.0 and 3.0) We need to install .NET Framework Start> server manager(need to wait until it finish the loading)>manage>add roles and features>server selection(next)>server roles>features (.NET Framework3.5)>confirmation. Note : if you try to install .NET Framework 3.5 it would throw an error for windows) Specify an alternate source path Go to folder This PC > DVD Drivers> sources>sxs Copy the path and paste as alternate path Click Install Close after completes the installation Now if we try to run the command C:\ program files\NSClient++\scripts > check_defrag.exe C: It will run without any error β We need to restart the services of NSClient++ after defrag completes without fail. Let go back to Nagios machine and run the command. $ /usr/local/libexec/nagios/check-nrpe3 -H dc1.wise.apoyar -n -t 7200 -c check_defrag -a c: (Now we can see the services run for defragmentation) Now we go to nagios WG DC2 > Defragmentation > Reschedule the next check (Manually) > it will take some time and the issue get resolved.
Summary:
Please note that all contributions to Apoyar Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Apoyar Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)