Page 1 of 1

DFS Checks

Posted: Fri Oct 06, 2017 8:24 pm
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

Re: DFS Checks

Posted: Sun Oct 08, 2017 3:55 pm
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.

Re: DFS Checks

Posted: Mon Oct 09, 2017 9:46 am
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!