Skip to main content
Solved

Warning - regex and pipe in plugin command

  • July 22, 2022
  • 2 replies
  • 391 views

Forum|alt.badge.img+7

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

Best answer by Cyril_31

Ok, it was the “$” the problem.

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

2 replies

Forum|alt.badge.img+7
  • Author
  • Steward ***
  • July 22, 2022

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


Forum|alt.badge.img+7
  • Author
  • Steward ***
  • Answer
  • July 25, 2022

Ok, it was the “$” the problem.

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