Ad Widget

Collapse

Add another discovery rule using service.discovery with different filter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chojin
    Member
    Zabbix Certified Specialist
    • Jul 2011
    • 64

    #1

    Add another discovery rule using service.discovery with different filter

    I have a few windows hosts, which have the default Windows OS Template assigned, hence have a service.discovery-discovery-rule defined on them.
    This default rule, will discover all services that are set to startup automaticaly.

    But now I want to discover a few application-specific services which I should be able to discover using service.discovery with a filter on the service-path and startup-type set to Manual
    However, Zabbix complains that a discovery rule service.discovery is already defined, since indeed this key is already used by the windows OS services auto-discovery rule..

    I tried adding a dummy parameter to service.discovery to make the key unique, but that makes the rule not supported as the key does not accept parameters.

    Is there a way add a new (services) discovery-rule with a different set of filters avoiding this duplicate key problem ?

    (running Zabbix 4.4.4)
    Last edited by chojin; 20-01-2020, 17:00.
  • chojin
    Member
    Zabbix Certified Specialist
    • Jul 2011
    • 64

    #2
    I found this: https://support.zabbix.com/browse/ZBXNEXT-3206

    So adding
    Code:
    Alias=service.discovery[*]:service.discovery
    to the agent config files, enables me to add discovery-rules with keys like service.discovery[dummy_parameter].

    It is a workaround, and it feels a bit dirty, as I have to change agent config-files, just to have a builtin key working.. So I hope https://support.zabbix.com/browse/ZBXNEXT-1606 will get implemented some day soon.. But according to https://support.zabbix.com/browse/ZBXNEXT-3635 this alias method is the currently "official solution" to my problem..

    Comment

    • RaulChiarella
      Member
      • Apr 2021
      • 59

      #3
      How do you call it?
      Key is service.discovery[1] ?

      Comment

      • chojin
        Member
        Zabbix Certified Specialist
        • Jul 2011
        • 64

        #4
        Possible, but more logical is service.discovery["identifier"] where your should replace "identifier" into something that is clear to you what this check is about (probably you have filters defined on that item to limit the services you want to discover). For example service.discover["Oracle"] when you added a filter for "^Oracle.*" in service names or so.

        Comment

        Working...