Skip to main content
Question

Invert critical-content for http plugin

  • Dec 13, 2024 12:51 PM UTC
  • 2 replies
  • 109 views

Forum|alt.badge.img+9

Hi,

I would like to check that a word is not present on my webpage : 

 

/usr/lib/centreon/plugins//centreon_protocol_http.pl --plugin=apps::protocols::http::plugin --mode=expected-content 

I don’t find the good regexp.

Could you help me ?

Thanks,

2 replies

ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • Dec 17, 2024 8:19 PM UTC

Hello

 

    --expected-string
Define the expected expression, where
--expected-string='mypattern' is actually a shortcut for
--critical-content='%{content} !~ /mypattern/mi'. It is
recommended to use --critical-content directly.

Something like this?

 

--critical-content='%{content} =~ /mypattern/mi'

critical if there, ok if not


Forum|alt.badge.img+9
  • Author
  • Steward **
  • Aug 5, 2025 5:26 AM UTC

Thanks a lot