Solved

Windows SNMP Disk - How to check all disks except C: ?

  • 17 August 2023
  • 2 replies
  • 355 views

Badge +1

Hi everyone,

 

I’m setting up Centreon to monitor different infrastructures and I would like to create 2 different services to check the HDD on Windows servers (using SNMP). The idea would be to adjust the checks intervals and values depending on which HDD we are talking (system HDD or “storage” HDD)

 

I already created a service model checking only C: but I want to create an other service model that will check all HDD except C:.

Can anyone help me find the value I should use after DISKNAME ? I was thinking about what could be the translation of “check all hard drives above the letter C” or “check all hard drives except C”.

 

I am pretty new to Centreon and I have no knowledge of this kind of value formulae.

 

Thanks a lot :)

icon

Best answer by christophe.niel-ACT 21 August 2023, 17:26

View original

2 replies

Userlevel 5
Badge +14

Hello

you could try the service template disk-global for windows snmp : 

(you can duplicate it to make a custom one)

in filter you could use what it says here How to play with Regex - Part II | Community (centreon.com)

and put '^(?!C$)' instead of .*

 

if you don’t use the plugin pack but used this plugin : --plugin=os::windows::snmp::plugin --mode=storage, then  the “FILTER” macros goes here :

--storage='^(?!C$)' --name --regexp

with --regexp to know it must interpret the regular expression

Badge +1

Hi Christophe,

 

Thank you very much for the documentation, exactly what I was looking for !

 

The command to check all disks except C is  ‘^(?!C.*$)’

 

Thanks again for your answer !

Cheers

Reply