Ad Widget

Collapse

Trigger Problem if discovery of new host is new

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MJC3125
    Junior Member
    • Aug 2020
    • 4

    #1

    Trigger Problem if discovery of new host is new

    hello all,

    I am new to Zabbix, have been given control after the last person left the business.

    I need Zabbix to Trigger a problem and email when a new host is found in discovery when this new host is not listed in Configuration>Hosts.

    Ie. ICMP PING 192.168.0.2 is found in Discovery but is not listed in Configuration>Hosts for monitoring.

    Can this be done?
  • isaqueprofeta
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2020
    • 154

    #2
    Yes, try looking at Actions: https://www.zabbix.com/documentation...cations/action

    Comment

    • MJC3125
      Junior Member
      • Aug 2020
      • 4

      #3
      Thanks for the message, I have look but can't work it out..... a bit over my head still

      Comment

      • isaqueprofeta
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Aug 2020
        • 154

        #4
        Originally posted by MJC3125
        Thanks for the message, I have look but can't work it out..... a bit over my head still
        There's a specific set of actions for Discovery Rules, explore that.

        Comment

        • MJC3125
          Junior Member
          • Aug 2020
          • 4

          #5
          When I Look in Configuration > Actions, in the drop-down list is nothing about Discovery Rules in Conditions

          Comment

          • bdaniel
            Junior Member
            • Dec 2019
            • 14

            #6
            Originally posted by MJC3125
            When I Look in Configuration > Actions, in the drop-down list is nothing about Discovery Rules in Conditions
            Did you get an answer to your question? I had Discovery and Discovery Actions set up previously, working fine. After upgrading to 5.0 I can't find any Action in relation to Discovery - all about alerting and messaging it seems...

            Comment

            • bdaniel
              Junior Member
              • Dec 2019
              • 14

              #7
              Check this out that I just found on another thread...

              Attached Files

              Comment

              • MJC3125
                Junior Member
                • Aug 2020
                • 4

                #8
                No I am no closer to getting my problem fixed, can not work out the conditions

                Comment

                • Trevpr{
                  Junior Member
                  • May 2025
                  • 1

                  #9
                  I think I have a working solution.
                  Basically setting up a template with an item that reads the inventory install date from the host, and a trigger that fires if install date is not set.
                  When a new device is discovered, a discovery action creates a new host, and links a template. A template Item reads the installed date inventory field from the host, and trigger reports a problem, resolved once an install date is manually added to host.
                  I'm using Zabbix 7.2

                  Go to Data Collection > Templates
                  Create a new template (I just added it to the "Templates" template group)
                  Click image for larger version

Name:	image.png
Views:	79
Size:	13.8 KB
ID:	502627

                  Add item, the parameter is as follows,
                  name: install value: {INVENTORY.HW.DATE.INSTALL}
                  The script is:
                  return JSON.parse(value).install;
                  Click image for larger version

Name:	image.png
Views:	80
Size:	50.4 KB
ID:	502626

                  Add Trigger, expression:
                  last(/New Device Alerting/installdate)="*UNKNOWN*"
                  or
                  last(/New Device Alerting/installdate)=""​
                  Click image for larger version

Name:	image.png
Views:	132
Size:	50.6 KB
ID:	502625

                  Go to Alerts > Actions > Discovery Actions
                  Create or update your rule, to link your new template to discovered hosts.
                  Click image for larger version

Name:	image.png
Views:	79
Size:	18.6 KB
ID:	502628

                  If you have existing hosts you don't want to trigger problems, you can do a mass update through Data collection > Hosts
                  Select known hosts, and click "Mass update" at the bottom.
                  In the inventory tab, check "Inventory Mode" and select "Manual". Check "Date HW installed" and fill in a non-empty value​​​

                  Comment

                  Working...