This support forum board is for support questions relating to
Nagios XI, our flagship commercial network monitoring solution.
-
WillemDH
- Posts: 2320
- Joined: Wed Mar 20, 2013 5:49 am
- Location: Ghent
-
Contact:
Post
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?
-
tgriep
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Post
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.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
-
hk44765
- Posts: 21
- Joined: Mon Sep 21, 2015 1:14 pm
Post
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.
-
WillemDH
- Posts: 2320
- Joined: Wed Mar 20, 2013 5:49 am
- Location: Ghent
-
Contact:
Post
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
-
hsmith
- Agent Smith
- Posts: 3539
- Joined: Thu Jul 30, 2015 11:09 am
- Location: 127.0.0.1
-
Contact:
Post
by hsmith »
Glad to hear you got it working. Is this thread all right to be marked as resolved and closed?
Former Nagios Employee.
me.