Skip to main content

Hello,

I’m trying to monitor C:\ disk only on Windows with the filesystem filter option (CMA 24.10.4).

Following Windows Centreon Monitoring Agent | Centreon Documentation I tested with C:\.* and got this restult : 

Fail to execute {"check":"storage", "args":{ "warning" : "80", "critical" : "90", "filter-storage-type" : ".*", "filter-fs" : "C:\.*"}} : The system cannot find the file specified

Following How to play with Regex - Part I | Community I tested with ^C:\$ and got this result : 

Fail to execute {"check":"storage", "args":{ "warning" : "80", "critical" : "90", "filter-storage-type" : ".*", "filter-fs" : "^C:\$"}} : The system cannot find the file specified

How does the regex interpreter work?

Thanks for your help

 

hello

: and \ are special char for regex

for windows disk, try

^C.*$

any disk starting whith C will match, normally you should have only 1

 


Thanks Christophe, it works.

I also successfully tested for C:\ and E:\ with this argument 

^^C,E].*$ 


Reply