Giter VIP home page Giter VIP logo

check_ms_win_disk_load's Introduction

Nagios plugin to check disk load on a Microsoft Windows host.

Idea

Check MS Windows disk load by using this Powershell script to get all disk load related counters from Windows Performance Manager, computing averages for all gathered samples and calculating read / write rate, number of reads / writes, read / write latency and read / write queue length.

Screenshot

Disk Load Highcharts Graph 01

Status

Production ready.

How To

Please visit https://outsideit.net/check-ms-win-disk-load for more information on how to use this plugin.

Help

In case you find a bug or have a feature request, please make an issue on GitHub.

On Nagios Exchange

https://exchange.nagios.org/directory/Plugins/Operating-Systems/Windows-NRPE/Check-Microsoft-Windows-Disk-Load/details

Copyright

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/licenses/.

check_ms_win_disk_load's People

Contributors

willemdh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

check_ms_win_disk_load's Issues

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

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.

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)

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?

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.