Ad Widget

Collapse

Discovery rule problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fsousa
    Member
    • Aug 2017
    • 99

    #1

    Discovery rule problem

    Hi all,

    I'm working on Zabbix 3.4.1 and I've registered my hosts with the Auto Registration action.

    Now i'm trying to build a discovery rule to check if my host's have the HTTPS service running and then link to a template and it's work perfectly. Now I want to be notified when the template is linked but unfortunately I still receiving the notification every time the discovery rule runs. It's possible receive the notification only when the template is linked?

    Thank you.
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    But the Template is linked when the Service is UP, yes? Then I believe that Conditions are TRUE = Linked template. In such case you need to configure the message along with an Operation: Link to Template.

    If you want to perform something more flexible, then it is better to work with API calls.

    Regards,
    Alex!

    Comment

    • fsousa
      Member
      • Aug 2017
      • 99

      #3
      Hello,

      Yes, the template is linked when the service is UP. I have the message configured along with the operation: Link to Template but I receive one message every Update interval defined in my discovery rule and I want to receive only when the service is discovered.

      I will look for the API calls.

      Regards.
      Fábio Sousa

      Comment

      • fsousa
        Member
        • Aug 2017
        • 99

        #4
        Hello,

        Now I have another problem, like I said before I'm using the Auto Registration to add my hosts to zabbix server. I've configured one discovery rule and an action with the operation to link a template. This discovery rule are adding some hosts again and linking them to a Discovered hosts group.

        My goal is with this discover rule link the correct template to my existing hosts.

        What I'm doing wrong?

        Regards.
        Fábio

        Comment

        • allexpetrov
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2017
          • 361

          #5
          Sorry, Discovery rule and Auto registration is a different terms. Lets not mix them.

          Discovery is a procedure for discovering the hosts using your defined parameters. It stands for a term Network Discovery in Zabbix: https://www.zabbix.com/documentation...work_discovery

          Auto-registration stands for Active agent auto-registration and this is a procedure when host have agent installed: https://www.zabbix.com/documentation...o_registration

          And the operations, according to the manual: https://www.zabbix.com/documentation...tion/operation are



          You can define the following operations for all events:

          send a message
          execute a remote command (including IPMI)

          For discovery events, there are additional operations available:
          • add host
          • remove host
          • enable host
          • disable host
          • add to group
          • delete from group
          • link to template
          • unlink from template
          • set host inventory mode

          The additional operations available for auto-registration events are:
          • add host
          • disable host
          • add to group
          • link to template
          • set host inventory mode


          Also: https://www.zabbix.com/documentation...#host_creation

          Please show the rules and actions.

          Regards,
          Alex

          Comment

          • fsousa
            Member
            • Aug 2017
            • 99

            #6
            I know they are a different terms. But my idea with the auto registration to add the hosts to my zabbix server. With the discovery rule discover which hosts have the HTTP service running and link a template to them.
            I trying this way because with the auto registration option I have to change my agent host config file with a specific host metadata. And I have to create a new rule per service.

            What is the best solution?

            My actual configuration:

            Auto registration - Hosts Linux Host metadata like Linux

            Condition Host metadata like Linux (value of my hosts agent config file)
            Send message to user groups: Zabbix administrators via all media
            Add host
            Add to host groups: Linux servers
            Link to templates: Template OS Linux
            Set host inventory mode: Automatic

            Discovery rules

            Name: Check HTTPs Service
            IP Range: 10.39.10.0-254,10.39.81.0-254
            Update interval: 1h
            Checks: HTTPS, Zabbix agent "system.hostname"
            Device uniqueness criteria: IP address

            Thank you

            Comment

            Working...