<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.apoyar.eu/index.php?action=history&amp;feed=atom&amp;title=Check_defrag_probe_not_working_on_Nagios</id>
	<title>Check defrag probe not working on Nagios - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.apoyar.eu/index.php?action=history&amp;feed=atom&amp;title=Check_defrag_probe_not_working_on_Nagios"/>
	<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Check_defrag_probe_not_working_on_Nagios&amp;action=history"/>
	<updated>2026-07-20T14:09:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.apoyar.eu/index.php?title=Check_defrag_probe_not_working_on_Nagios&amp;diff=238&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;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...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Check_defrag_probe_not_working_on_Nagios&amp;diff=238&amp;oldid=prev"/>
		<updated>2022-06-01T07:01:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;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...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Checking Defrag Probe not working on Nagios&lt;br /&gt;
------------------------------------------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have a problem with WG-DC1 -Defragmentation.&lt;br /&gt;
&lt;br /&gt;
Lets look on nagios machine&lt;br /&gt;
&lt;br /&gt;
/usr/local/etc/nagios/objects $ vi service.cfg&lt;br /&gt;
&lt;br /&gt;
/defrag&lt;br /&gt;
&lt;br /&gt;
Command is : check_defrag ! “C1”&lt;br /&gt;
&lt;br /&gt;
Lets go to command&lt;br /&gt;
&lt;br /&gt;
$ vi command.cfg&lt;br /&gt;
&lt;br /&gt;
Defrag command &lt;br /&gt;
&lt;br /&gt;
$USER1$|Check_nrpe3 -H $HOSTADDRESS$ -n -t 7200 -c check-defrag -a $ARG1$&lt;br /&gt;
&lt;br /&gt;
(its not always easy to get the metrics from a windows machine and lets execute the command on nagios machine&lt;br /&gt;
&lt;br /&gt;
$ /usr/local/libexec/nagios/check-nrpe3 -H dc1.wise.apoyar -n -t 7200 -c check_defrag -a c:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is easy with NRPE.&lt;br /&gt;
&lt;br /&gt;
Go to DC1 Server.&lt;br /&gt;
&lt;br /&gt;
Start &lt;br /&gt;
&lt;br /&gt;
Services&lt;br /&gt;
&lt;br /&gt;
Stop the NSClient++ Monitoring agent&lt;br /&gt;
&lt;br /&gt;
Now we try running it manually &lt;br /&gt;
&lt;br /&gt;
Start&lt;br /&gt;
&lt;br /&gt;
CMD(Admin)&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Local Disk --- Program Files – NSClient++--NSCP.&lt;br /&gt;
&lt;br /&gt;
In Command Prompt&lt;br /&gt;
&lt;br /&gt;
C:”\program Files”\NSClient++”&lt;br /&gt;
&lt;br /&gt;
Nscp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to command prompt admin&lt;br /&gt;
&lt;br /&gt;
C:\program files\NSClient++ &amp;gt; cd Scripts&lt;br /&gt;
&lt;br /&gt;
C: \program files\NSClient++\scripts &amp;gt; check_defrag( this command is missing )&lt;br /&gt;
&lt;br /&gt;
We need to get the contents from other any other server &lt;br /&gt;
&lt;br /&gt;
Go to folders&lt;br /&gt;
&lt;br /&gt;
Search : \\dc\\&lt;br /&gt;
&lt;br /&gt;
Network&amp;gt;dc&amp;gt;c$&amp;gt;programfiles&amp;gt;NSClient++&amp;gt;Scripts&lt;br /&gt;
&lt;br /&gt;
(this script folder contains pre installed scripts and custom scripts , Copy them)&lt;br /&gt;
&lt;br /&gt;
Go back to previous folder&lt;br /&gt;
&lt;br /&gt;
Local disk&amp;gt;program files&amp;gt; NSClieent++&amp;gt;scripts folder &lt;br /&gt;
&lt;br /&gt;
Paste it&lt;br /&gt;
&lt;br /&gt;
(skip files which are same now we can see check defrag script in the folder)&lt;br /&gt;
&lt;br /&gt;
Now we try running the command&lt;br /&gt;
&lt;br /&gt;
C:\ program files\NSClient++\scripts &amp;gt; check_defrag.exe C:&lt;br /&gt;
&lt;br /&gt;
a dialogue box displays with some message(the following feature couldn’t be installed&lt;br /&gt;
.NET Framework 3.5(includes &amp;gt;NET 2.0 and 3.0)&lt;br /&gt;
&lt;br /&gt;
We need to install .NET Framework&lt;br /&gt;
&lt;br /&gt;
Start&amp;gt; server manager(need to wait until it finish the loading)&amp;gt;manage&amp;gt;add roles and features&amp;gt;server selection(next)&amp;gt;server roles&amp;gt;features (.NET Framework3.5)&amp;gt;confirmation.&lt;br /&gt;
&lt;br /&gt;
Note : if you try to install  .NET Framework 3.5 it would throw an error for windows) Specify an alternate source path&lt;br /&gt;
&lt;br /&gt;
Go to folder&lt;br /&gt;
&lt;br /&gt;
This PC &amp;gt; DVD Drivers&amp;gt; sources&amp;gt;sxs&lt;br /&gt;
&lt;br /&gt;
Copy the path and paste as alternate path &lt;br /&gt;
&lt;br /&gt;
Click Install&lt;br /&gt;
&lt;br /&gt;
Close after completes the installation&lt;br /&gt;
&lt;br /&gt;
Now if we try to run the command &lt;br /&gt;
&lt;br /&gt;
C:\ program files\NSClient++\scripts &amp;gt; check_defrag.exe C:&lt;br /&gt;
&lt;br /&gt;
It will run without any error –&lt;br /&gt;
&lt;br /&gt;
We need to restart the services of NSClient++ after defrag completes without fail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let go back to Nagios machine and run the command.&lt;br /&gt;
&lt;br /&gt;
$ /usr/local/libexec/nagios/check-nrpe3 -H dc1.wise.apoyar -n -t 7200 -c check_defrag -a c:&lt;br /&gt;
&lt;br /&gt;
(Now we can see the services run for defragmentation)&lt;br /&gt;
&lt;br /&gt;
Now we go to nagios&lt;br /&gt;
&lt;br /&gt;
WG DC2 &amp;gt; Defragmentation &amp;gt; Reschedule the next check (Manually) &amp;gt; it will take some time and the issue get resolved.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>