Giter VIP home page Giter VIP logo

outsideit / check_ms_win_disk_load Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 3.0 161 KB

:four_leaf_clover: Check MS Windows Disk Load :four_leaf_clover:

Home Page: https://outsideit.net/monitoring-windows-disk-load/

PowerShell 93.77% PHP 6.23%
monitoring io disk windows perfmon health-check nagios-plugin nagios-plugins monitoring-plugins monitoring-scripts metrics-gathering nagios nagios-nrpe powershell-script powershell

check_ms_win_disk_load's Issues

Virtual disk "Total"

Hello,

It would be nice to be able to use the virtual disk "_Total" in order to get stats of I/O on the whole system.

Regards.

Illegal Metachars

Hi,
Not sure this is the right place to add this.

I have mountpoints so when I try and test this, it works with -dl C but not with my mount points

./check_nrpe -H xxx.xxx.xxx.xxx -p 5666 -t 60 -c check_ms_win_disk_load -a '-dl "R:\DATA1" -ms 5'
Exception processing request: Request command contained illegal metachars!

Any ideas?

icinga2 - invalid performance data

Hello

icinga[2] does not recognize all UOMs in perfdata. See http://docs.icinga.org/latest/en/perfdata.html

changing to

$DiskStruct.ReturnString += "'Read_Latency'=$($DiskStruct.AvgDiskSecReadValue)ms " $DiskStruct.ReturnString += "'Write_Latency'=$($DiskStruct.AvgDiskSecWriteValue)ms " $DiskStruct.ReturnString += "'Read_Queue'=$($DiskStruct.AvgDiskReadQueueValue) " $DiskStruct.ReturnString += "'Write_Queue'=$($DiskStruct.AvgDiskWriteQueueValue) " $DiskStruct.ReturnString += "'Number_of_Reads'=$($DiskStruct.DiskReadsSecValue) " $DiskStruct.ReturnString += "'Number_of_Writes'=$($DiskStruct.DiskWritesSecValue) " $DiskStruct.ReturnString += "'Read_Rate'=$($DiskStruct.DiskReadBytesSecValue)MB " $DiskStruct.ReturnString += "'Write_Rate'=$($DiskStruct.DiskWriteBytesSecValue)MB "

solved my problem.

I don´t know if the script is intended to work with icinga. I just want to mention.

Thanks for your work!
Andreas

Update compatibility to PowerShell 7

Good afternoon,

We are now running some later versions of PowerShell and would like to run this script - would it please be possible to update the script to be able to run on a later PowerShell version? (e.g PowerShell 7.xx)

As Nagios now outputs this as a status on newer Windows hosts:

At C:Program FilesNSClient++scriptspowershellcheck_ms_win_disk_load.ps1:23 char:13+ #Requires �?"Version 2.0+ ~~~~~~~~~~~~The string is missing the terminator: ".At C:\Program Files\NSClient++\scripts\powershell\check_ms_win_disk_load.ps1:23 char:11+ #Requires �?"Version 2.0+ ~~~~~~~~~~~~~~Cannot process the #requires statement because it is not in the correct format.The #requires statement must be in one of the following formats:"#requires -shellid ""#requires -version <major.minor>""#requires -psedition ""#requires -pssnapin [-version <major.minor>]""#requires -modules ""#requires -runasadministrator"+ CategoryInfo : ParserError: (:) [], ParseException+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString

Many thanks

Performance data not compliant with monitoring-plugin API specification

The current performance data units of measurement are not compliant with the monitoring-plugin API performance data section specified under https://www.monitoring-plugins.org/doc/guidelines.html#AEN201 .
This can create problems with monitoring systems that strictly implement this specification (such as icinga2) since they then ignore the 'malformed' performance data results.

Possibly a parameter to enforce strict monitoring-plugin API compliance would be a solution?

Formating number

Hi,
I think that is not a good idea:

$DiskStruct.AvgDiskReadQueueValue = '{0:N5}' -f ($AvgObjDiskReadQueueValues.average)
etc.

befor:
Read/s = 2205.06046082681
after:
Read/s = 2,205.06046

because:

(Get-Culture).NumberFormat.CurrencyGroupSeparator
,

it might be better:
$DiskStruct.AvgDiskReadQueueValue = [math]::Round($AvgObjDiskReadQueueValues.average, 5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.