Best way to check Disk fragmentation levels

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Best way to check Disk fragmentation levels

Post by dlukinski »

What is the best way to check on DISK fragmentation levels with XI ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Best way to check Disk fragmentation levels

Post by rkennedy »

Where do you usually look for the defrag level?

I looked at windows, and found the defrag command, but I don't think it'll give you the 'level'. If a plugin needs to be made, we need to be able to pull that data from somewhere.
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Best way to check Disk fragmentation levels

Post by dlukinski »

rkennedy wrote:Where do you usually look for the defrag level?

I looked at windows, and found the defrag command, but I don't think it'll give you the 'level'. If a plugin needs to be made, we need to be able to pull that data from somewhere.
Reason I asked is because this is stock check in SCOM (for Windows servers)
- was wondering if similar was known for NAGIOS

You could close this thread if not known
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Best way to check Disk fragmentation levels

Post by rkennedy »

I found this plugin at our Exchange, give it a try and see if it's what you're looking for.
https://exchange.nagios.org/directory/P ... ag/details
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Best way to check Disk fragmentation levels

Post by dlukinski »

rkennedy wrote:I found this plugin at our Exchange, give it a try and see if it's what you're looking for.
https://exchange.nagios.org/directory/P ... ag/details
Defined command in nsclient.ini as

[NRPE Handlers]
check_ExecCustScript= scripts\$ARG1$ $ARG2$

but getting this error: Unknown command(s): check_execcustscript
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Best way to check Disk fragmentation levels

Post by rkennedy »

Did you restart the NSClient++ service after adding it? Also, make sure that the command is under this section (not sure where the [NRPE Handlers] came from) - [/settings/external scripts/scripts]

If that doesn't work, please post your nsclient configuration file for us to look at.
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Best way to check Disk fragmentation levels

Post by dlukinski »

rkennedy wrote:Did you restart the NSClient++ service after adding it? Also, make sure that the command is under this section (not sure where the [NRPE Handlers] came from) - [/settings/external scripts/scripts]

If that doesn't work, please post your nsclient configuration file for us to look at.

Taken from author's page- HOW TO INSTALL THE PLUG-IN section.

Now error had changed to "Unknown command(s): scripts\$arg1$"

nsclient.ini attached
You do not have the required permissions to view the files attached to this post.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Best way to check Disk fragmentation levels

Post by mcapra »

Your check_ExecCustScript definition is under [/settings/external scripts/alias] when, as @rkennedy pointed out, it should instead be under [/settings/external scripts/scripts].

It's also worth mentioning that NSClient++ might be a bit finicky if you're trying to pass a script name as an actual argument. Generally when you define external scripts, you're including the full script path (eg check_custom = scripts\myscript.bat $ARG1$).
Former Nagios employee
https://www.mcapra.com/
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: Best way to check Disk fragmentation levels

Post by dlukinski »

mcapra wrote:Your check_ExecCustScript definition is under [/settings/external scripts/alias] when, as @rkennedy pointed out, it should instead be under [/settings/external scripts/scripts].

It's also worth mentioning that NSClient++ might be a bit finicky if you're trying to pass a script name as an actual argument. Generally when you define external scripts, you're including the full script path (eg check_custom = scripts\myscript.bat $ARG1$).
Please close this thread. We could not get it to work, but with migration of physical Wintel servers into W2012, it is no longer required.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Best way to check Disk fragmentation levels

Post by rkennedy »

Awesome, closing out!
Former Nagios Employee
Locked