Usage of disk_space parameters ?

Help
2009-03-30
2013-04-10
  • Kimmo Lahteenlahti

    Hello,

    I'm facing a little bit problems when using disk_space command.
    It looks like parameters warning and critical have been comparing in the different way.

    disk_usage returns percent value of used disk space.
    ./check_wsc.pl -H xx.xx.xx.xx -r xx.xx.xx.xx -p C,80%,90% -t disk_space
    Result: Disk Critical |spaceused_c=8114200576;8580585882;9653159117;0;10725732352
    C: 76%,|

    Warning value is checked correctly if used space is less than 80% => result Okay
    Critical value is used to checked incorrectly if less than 90% => Result Critical

    If i change critical value to 70% everything looks to be okay, but we never get a critical alarm unless we start using less than 70% of our disk.
    ./check_wsc.pl -H xx.xx.xx.xx -r xx.xx.xx.xx -p C,80%,70% -t disk_space
    Result: Disk Okay |spaceused_c=8114266112;8580585882;7508012646;0;10725732352
    C: 76%,|

    And is it possible to change disk size to GB instead of Bytes ?

    It looks that disk commands is also some problems to present perfdata.
    ./check_wsc.pl -H xx.xx.xx.xx -r xx.xx.xx.xx -p C,20%,10% -t disk
    Result: Disk Okay;C:2.43GB/9.99GB (24% free)|freeperc=24%;20;20;;

    Warning and critical fields are always getting same value in perfdata.
    Functionality is still correct because i will get warning if i change values. but just presenting perfdata is incorrect.
    ./check_wsc.pl -H xx.xx.xx.xx -r xx.xx.xx.xx -p C,40%,30% -t disk
    Result: Disk Critical;C:2.43GB/9.99GB (24% free)|freeperc=24%;40;40;;

    I'm using nagios-wsc ver 1.3.3 with Win2003 +IIS6.

    - Kimmo

     
    • W. Wagner

      W. Wagner - 2009-03-31

      Hi Kimmo,

      having a first look you are totally right.

      1. disk_space incorrectly does check free space instead of space used
      I will provide a fix (although breaking contributed code)

      2. disk does report perfdata warning value instead of the critical (if using percentage values)
      Will be fixed.

      3. reporting GB instead of bytes?
      I will have a look. The decision for using (ugly long numbers of) bytes resulted in tests with different perfdata tools. Some of them where not able to handle values having size-qualifiers. I will check the documentation to see what should be supported today.
      If possible I will add an option to report size-qualifiers in perfdata strings. Probably this will not be done with the fix for the above bugs.

      Thanks for reporting.

      Regards,
      Wolfgang

       
    • Kimmo Lahteenlahti

      Hi,

      Thanks for quick reply.

      Items 1 and 2 are most important for me.

      Item 3 is more and less nice to have, but help a lot to get pnp graphs looking nicer.

      Let me know if you need help for testing this out.

      - Kimmo

       
    • W. Wagner

      W. Wagner - 2009-04-13

      Hi,

      check out v1.3.4. This should solve the problems with "disk" and "disk_space".
      Your request for different perfdata behavior is still open.

      Hope that helps.

      Wolfgang.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks