Page 4 of 4
Re: check_ms_win_disk_load error?
Posted: Thu Sep 24, 2015 1:56 pm
by WillemDH
Weird, because the output of the plugin you gave does indeed pass perfdata.
PS C:\Program Files\NSClient++\scripts> .\check_ms_win_disk_load.ps1
OK: Drive C: Avg of 2 samples: {Rate (Read: 0.00000MB/s)(Write: 0.00219MB/s)} {Avg Nr of (Reads: 0.00000r/s)(Writes: 0.
0000w/s)} {Latency (Read: 0.00000us)(Write: 0.07500us)} {Queue Length (Read: 0.00000ql)(Write: 0.00000ql)} | 'Read_Late
cy'=0.00000us 'Write_Latency'=0.07500us 'Read_Queue'=0.00000ql 'Write_Queue'=0.00015ql 'Number_of_Reads'=0.00000r/s 'Nu
ber_of_Writes'=0.99696w/s 'Read_Rate'=0.00000MB/s 'Write_Rate'=0.00219MB/s
(After the pipe symbol).
Can you post your service configuration?
Re: check_ms_win_disk_load error?
Posted: Thu Sep 24, 2015 5:31 pm
by tgriep
Did you change your nsclient.ini file entry from
Code: Select all
check_ms_win_disk_load = cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit LastExitCode | powershell.exe -command –
to
Code: Select all
check_ms_win_disk_load = cmd /c echo scripts/check_ms_win_disk_load.ps1 $ARG1$; exit $LastExitCode | powershell.exe -command –
That could be causing it too.
Re: check_ms_win_disk_load error?
Posted: Thu Sep 24, 2015 6:17 pm
by hk44765
figured it out...
It was the command line thru powershell causing issue.
Here is what I updated command to be:
check_ms_win_disk_load = cmd /c echo scripts\check_ms_win_disk_load.ps1 $ARG1$; exit($lastexitcode) | powershell.exe -command -
Also, in the original script file, updated the stanza and added ;;; seemed to fix my issue with graphs:
Modified lines:
$DiskStruct.OutputString += "'Read_Latency'=$($DiskStruct.AvgDiskSecReadValue)us;;;; "
$DiskStruct.OutputString += "'Write_Latency'=$($DiskStruct.AvgDiskSecWriteValue)us;;;; "
$DiskStruct.OutputString += "'Read_Queue'=$($DiskStruct.AvgDiskReadQueueValue)ql;;;; "
$DiskStruct.OutputString += "'Write_Queue'=$($DiskStruct.AvgDiskWriteQueueValue)ql;;;; "
$DiskStruct.OutputString += "'Number_of_Reads'=$($DiskStruct.AvgDiskReadsSecValue)r/s;;;; "
$DiskStruct.OutputString += "'Number_of_Writes'=$($DiskStruct.AvgDiskWritesSecValue)w/s;;;; "
$DiskStruct.OutputString += "'Read_Rate'=$($DiskStruct.AvgDiskReadBytesSecValue)MB/s;;;; "
$DiskStruct.OutputString += "'Write_Rate'=$($DiskStruct.AvgDiskWriteBytesSecValue)MB/s;;;; "
Thank you guys...it been fun and great help.
Re: check_ms_win_disk_load error?
Posted: Fri Sep 25, 2015 4:59 am
by WillemDH
I'm not sure why this:
$DiskStruct.OutputString += "'Read_Latency'=$($DiskStruct.AvgDiskSecReadValue)us;;;; "
$DiskStruct.OutputString += "'Write_Latency'=$($DiskStruct.AvgDiskSecWriteValue)us;;;; "
$DiskStruct.OutputString += "'Read_Queue'=$($DiskStruct.AvgDiskReadQueueValue)ql;;;; "
$DiskStruct.OutputString += "'Write_Queue'=$($DiskStruct.AvgDiskWriteQueueValue)ql;;;; "
$DiskStruct.OutputString += "'Number_of_Reads'=$($DiskStruct.AvgDiskReadsSecValue)r/s;;;; "
$DiskStruct.OutputString += "'Number_of_Writes'=$($DiskStruct.AvgDiskWritesSecValue)w/s;;;; "
$DiskStruct.OutputString += "'Read_Rate'=$($DiskStruct.AvgDiskReadBytesSecValue)MB/s;;;; "
$DiskStruct.OutputString += "'Write_Rate'=$($DiskStruct.AvgDiskWriteBytesSecValue)MB/s;;;; "
Should change something. The original script is working perfect for me (and others).
Glad your issue is solved though.
Grtz
Willem
Re: check_ms_win_disk_load error?
Posted: Fri Sep 25, 2015 9:33 am
by hsmith
Glad to hear you got it working. Is this thread all right to be marked as resolved and closed?