Solved

Warning - regex and pipe in plugin command

  • 22 July 2022
  • 2 replies
  • 73 views

Badge +3

Hello,

 

I have a status issue when I use the "centreon_stormshiel_snmp.pl" plugin to check storage.

I want to check a specific storage:

→ ./centreon_stormshiel_snmp.pl --plugin network::stormshield::snmp::plugin --hostname @IP --snmp-version 3 --snmp-autoreduce --snmp-username user --authpassphrase pwd --authprotocol SHA --privpassphrase pwd --privprotocol AES --mode storage --storage=’(/|/data|/var|/log|/tmp)$’ --name --regexp --warning-usage 80 --critical-usage 90

 

If i run this command directly on my central server, i have a great status, but on centreon GUI, i have “Warning - (no output returned from plugin).

If i modify the --storage for /data for exemple, it’s ok on GUI.

I have enable the checkbox “Enable shell” on the “Configuration → Commands → checks → name:xxx)

 

Can you help me please ?

Thank you

icon

Best answer by Cyril_31 25 July 2022, 11:02

View original

2 replies

Badge +3

I have a “warning” if i use  --storage=’^(?!/data.*$)’, so it’s not the pipe the problem

Badge +3

Ok, it was the “$” the problem.

I modify --storage=’(/|/data|/var|/log|/tmp)$’ for --storage=’^(?!(/data/Main/Data/GUI|/dev))’ and it’s ok.

Reply