Several rules of same type for host - which one is valid?

CMK version: check-mk-raw-2.0.0p12-sles15sp2-38
OS version: SLES 15 SP3

Error message:

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

Checkmk version 2.0.0p12
Try license usage history update.
Trying to acquire lock on /omd/sites/test/var/check_mk/license_usage/next_run
Got lock on /omd/sites/test/var/check_mk/license_usage/next_run
Trying to acquire lock on /omd/sites/test/var/check_mk/license_usage/history.json
Got lock on /omd/sites/test/var/check_mk/license_usage/history.json
Next run time has not been reached yet. Abort.
Releasing lock on /omd/sites/test/var/check_mk/license_usage/history.json
Released lock on /omd/sites/test/var/check_mk/license_usage/history.json
Releasing lock on /omd/sites/test/var/check_mk/license_usage/next_run
Released lock on /omd/sites/test/var/check_mk/license_usage/next_run
Updating IPv4 DNS cache for check-mk: 10.201.25.252
Trying to acquire lock on /omd/sites/test/var/check_mk/ipaddresses.cache
Got lock on /omd/sites/test/var/check_mk/ipaddresses.cache
Releasing lock on /omd/sites/test/var/check_mk/ipaddresses.cache
Released lock on /omd/sites/test/var/check_mk/ipaddresses.cache
+ FETCHING DATA
  Source: SourceType.HOST/FetcherType.PIGGYBACK
[cpu_tracking] Start [7f9fb9eac6a0]
No piggyback files for 'check-mk'. Skip processing.
No piggyback files for '10.201.25.252'. Skip processing.
[PiggybackFetcher] Fetch with cache settings: NoCache(base_path=PosixPath('/omd/sites/test/tmp/check_mk/data_source_cache/piggyback/check-mk'), max_age=MaxAge(checking=0, discovery=120, inventory=120), disabled=False, use_outdated=False, simulation=False)
[PiggybackFetcher] Execute data source
[cpu_tracking] Stop [7f9fb9eac6a0 - Snapshot(process=posix.times_result(user=0.0, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.0))]
[cpu_tracking] Start [7f9fb9eacd30]
+ PARSE FETCHER RESULTS
  Source: SourceType.HOST/FetcherType.PIGGYBACK
No persisted sections loaded
  -> Add sections: []
Received no piggyback data
Loading item states
Trying to acquire lock on /omd/sites/test/tmp/check_mk/counters/check-mk
Got lock on /omd/sites/test/tmp/check_mk/counters/check-mk
Releasing lock on /omd/sites/test/tmp/check_mk/counters/check-mk
Released lock on /omd/sites/test/tmp/check_mk/counters/check-mk
No piggyback files for 'check-mk'. Skip processing.
No piggyback files for '10.201.25.252'. Skip processing.
[cpu_tracking] Stop [7f9fb9eacd30 - Snapshot(process=posix.times_result(user=0.010000000000000009, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.009999997913837433))]
execution time 0.0 sec | execution_time=0.010 user_time=0.010 system_time=0.000 children_user_time=0.000 children_system_time=0.000 cmk_time_agent=0.000

I have some hosts which have constantly some errors on their network interfaces: between 1% and 5%. For those i raised already the levels in the service rule “Network Interfaces and switch ports”.
But a few hosts have error levels more than 10%. For those hosts i attach a host label and create for this label a service rule “Network Interfaces and switch ports” with higher error rates. Now i have the problem that for the hosts with the high error rate two rules are valid. So when i have already some errors the more tight rule applies. So i get already notifications, but want to have only notifications when the high error rates happen. What can i do ? Can i deactivate certain rules just for dedicated hosts ?
Is there an order in the rules ? How do i recognize this ? How can i change it ? What is if one rule matches ? Does checkmk stops to process further rules of the same type ?
Bernd

Hallo,
most rules are working first come first server.
But you should solve your problem instead of muting checkmk.
Ralf

Hi,
you should get a lot of answers to your questions here:
https://docs.checkmk.com/latest/en/wato_rules.html
https://docs.checkmk.com/latest/en/wato_rules.html#matching

Karl

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.