Hello,
We're trying to setup an item prototype that returns provides the name of a discovered Windows Service. By default there's an item prototype that creates items that are the "display name" but not the actual service name, it's key is service.info[{#SERVICE.NAME},displayname]. The information we'd like the item to be is what {#SERVICE.NAME} is however if you put service.info[{#SERVICE.NAME}] as the key it returns "state" as that's the default as documented here: https://www.zabbix.com/documentation...nt/win_keys.We can see that {#SERVICE.NAME} resolves to the service name in other places, like the title of the item, so we know Zabbix has that info. We tried service.info[{#SERVICE.NAME},name] but that apparently doesn't exist. Is there anyway to get the actual service name as an item?
We'd like to use this for logic in triggers so that different service names could raise a different level of severity. Display name works but can be ugly as they're normally much longer, have spaces and can be inconsistent. An example of what we're trying to do is this in the trigger expression (but using display name):
{Template OS Windows:service.info[{#SERVICE.NAME},state].min(#3)}<>0
and
{Template OS Windows:service.info[{#SERVICE.NAME},displayname].iregexp(@Critical Windows service names,#1)}=1
We're running Zabbix 3.4.7. Any help would be appreciated, thanks!
We're trying to setup an item prototype that returns provides the name of a discovered Windows Service. By default there's an item prototype that creates items that are the "display name" but not the actual service name, it's key is service.info[{#SERVICE.NAME},displayname]. The information we'd like the item to be is what {#SERVICE.NAME} is however if you put service.info[{#SERVICE.NAME}] as the key it returns "state" as that's the default as documented here: https://www.zabbix.com/documentation...nt/win_keys.We can see that {#SERVICE.NAME} resolves to the service name in other places, like the title of the item, so we know Zabbix has that info. We tried service.info[{#SERVICE.NAME},name] but that apparently doesn't exist. Is there anyway to get the actual service name as an item?
We'd like to use this for logic in triggers so that different service names could raise a different level of severity. Display name works but can be ugly as they're normally much longer, have spaces and can be inconsistent. An example of what we're trying to do is this in the trigger expression (but using display name):
{Template OS Windows:service.info[{#SERVICE.NAME},state].min(#3)}<>0
and
{Template OS Windows:service.info[{#SERVICE.NAME},displayname].iregexp(@Critical Windows service names,#1)}=1
We're running Zabbix 3.4.7. Any help would be appreciated, thanks!