DFS Checks

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

DFS Checks

Post by kwhogster »

Nagios 4.1 core

Windows 2012 R2 DFS Servers

found this plugin on here on here

https://exchange.nagios.org/directory/A ... og/details

Ran these commands against both dfs servers

root@tgcs017:/usr/lib/nagios/plugins# ./check_nrpe -u -H TGCS011 -t 120 -c check_DFSBacklog -a HomeDirectories 100 200
C:\Program Files\NSClient++\scripts\DFS-Backlog.vbs(7, 1) Microsoft VBScript runtime error: Subscript out of range

root@tgcs017:/usr/lib/nagios/plugins# ./check_nrpe -u -H TGCS012 -t 120 -c check_DFSBacklog -a HomeDirectories 100 200
C:\Program Files\NSClient++\scripts\DFS-Backlog.vbs(7, 1) Microsoft VBScript runtime error: Subscript out of range

This one works

root@tgcs017:/usr/lib/nagios/plugins# ./check_nrpe -u -H TGCS011 -t 120 -c check_DFSR -t 180 -a 3000
4 Replication groups passed, all under 3000MB synch difference.
State - Normal HomeDirectories - 474MB out of synch
State - Normal Documentation - 524MB out of synch
State - Normal tgcsnetdfs - 0MB out of synch
State - Normal TechNotes - 0MB out of synch
root@tgcs017:/usr/lib/nagios/plugins# ./check_nrpe -u -H TGCS012 -t 120 -c check_DFSR -t 180 -a 3000
4 Replication groups passed, all under 3000MB synch difference.
State - Normal HomeDirectories - 2338MB out of synch
State - Normal TechNotes - 318MB out of synch
State - Normal tgcsnetdfs - 0MB out of synch
State - Normal Documentation - 503MB out of synch

Any ideas

Thanks

Tom
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: DFS Checks

Post by kwhogster »

Fix this


Original code in DFS-Backlog.vbs

Code: Select all

GroupName = Replace(WScript.Arguments.Item(0),"_"," ")
Warn = CInt(WScript.Arguments.Item(1))
Crit = CInt(WScript.Arguments.Item(2))
sTarget = "localhost"
set oPing = _

Change to this

Code: Select all

GroupName = Replace(WScript.Arguments.Item(0),"_"," ")
if WScript.Arguments.Count > 1 then
    Warn = CInt(WScript.Arguments.Item(1))
    Crit = CInt(WScript.Arguments.Item(2))
else
    Warn = 1
    Crit = 5
end if
sTarget = "localhost"
set oPing = _
Now the check works

This can now be locked.
kyang

Re: DFS Checks

Post by kyang »

Sounds great! Thanks for posting the answer to your solution!

If you have any more questions, feel free to create another thread!

Thank you for using the Nagios Support Forum!
Locked