is there an easy way to find out how often a check_command is used within the whole icinga setup?
I need to find out how often snmp-based checks are used.
My approach whould be to write a script which parses the output of ‘icinga2 object list --type Service’ and filter for commands which have snmp-like arguments…
Is there a better way to do this?
You could query all hosts and services (you likely want to limit this query attributes to only the check_command, ?attrs=check_command), unJSONify the response and count the check_command-s.