We're using Zabbix 4.2.2.
In LLD I can discover Windows services using the service.discovery key. With that I can create an item prototype and a trigger prototype, and assign a severity to the trigger.
The item stores the state of a discovered service as an int, and no issues so far.
However, there are a couple of in-house developed services that are included in this discovery, but should have a higher trigger severity level.
- I tried to use regular expressions to filter the discovered services and have 2 different LLD rules for average and high severity, but that of course doesn't work because I cannot reuse service.discovery for the 2nd discovery rule.
- I was hoping to use a regexp match on the {#SERVICE.NAME} macro like this:
{Template OS Windows:service.info[{#SERVICE.NAME},state].min(#3)}<>0
and
{#SERVICE.NAME}.iregexp("^svc_name") = 0
This would have been my preferred solution, but it seems it's something that can't be done as it won't save.
- I wrote a service discovery script that can include/exclude services based on name and so can be used with multiple LLD rules, but maybe this is sub-optimal.
So.. What is the best way to do this?
In LLD I can discover Windows services using the service.discovery key. With that I can create an item prototype and a trigger prototype, and assign a severity to the trigger.
The item stores the state of a discovered service as an int, and no issues so far.
However, there are a couple of in-house developed services that are included in this discovery, but should have a higher trigger severity level.
- I tried to use regular expressions to filter the discovered services and have 2 different LLD rules for average and high severity, but that of course doesn't work because I cannot reuse service.discovery for the 2nd discovery rule.
- I was hoping to use a regexp match on the {#SERVICE.NAME} macro like this:
{Template OS Windows:service.info[{#SERVICE.NAME},state].min(#3)}<>0
and
{#SERVICE.NAME}.iregexp("^svc_name") = 0
This would have been my preferred solution, but it seems it's something that can't be done as it won't save.
- I wrote a service discovery script that can include/exclude services based on name and so can be used with multiple LLD rules, but maybe this is sub-optimal.
So.. What is the best way to do this?
Comment