Child pages
  • Use custom filters (Monitor 6.1+) to filter for custom object variables
Skip to end of metadata
Go to start of metadata

Version

This article was written for version 6.1 of Monitor, it could work on both lower and higher version if nothing else is stated.

Articles in the Community-Space are not supported by op5 Support.

Note:

This is a side effect of how Livestatus Query Language is designed, and not an intended feature.

The syntax of filtering on custom variables will change, so don't expect it to work in the future. It's useful for simple searches, and possibly some saved queries, which will need to be updated later. But don't embed it in other programs. They will stop working when we update this feature, and implement it in a more user-friendly way.

test scenario (on demo.op5.com):

  • host "selenium-probe" has _NOMONITORING = "unproductive"
  • host "germany-web-server has _NOMONITORING = "1234"
  • host "mail" has _NOMONITORING = "1234"

 

filters:

 

show all hosts that have "_NOMONITORING" set to something (the "." stands for "any character)

[hosts] custom_variables ~~ "NOMONITORING ."

 

show all hosts that have "_NOMONITORING" set to "1234"

[hosts] custom_variables ~~ "NOMONITORING 1234"

 

show all services called something with "ping" on hosts that have "_NOMONITORING" set to "1234"

[services] host.custom_variables ~~ "NOMONITORING 1234" and description ~~ "ping"


  • No labels