Ad Widget

Collapse

Discovery question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • G0nz0uk
    Member
    • Apr 2021
    • 47

    #1

    Discovery question

    Hello,

    I have 2 templates I'm working on.

    Template A - General SNMP stuff. Works on all devices.
    Template B - Reads a local json file for some extra metrics.

    These 'extra' metrics via the json file the Template B looks for are not on all the devices, over time it will though. I wanted to link Template B to A, but I realise it's not best way possibly as Zabbix will run Template A on many devices where Template B won't work. Is there a way I can get Template B to discovery if the JSON file exists first then process with the rest of the template?

    The URL is http://{HOST.IP}//metrics.json

    I did wonder if I could check if port 80/443 is responding then treat that as ok too.

    Any ideas would be great

    I'm using Netbox to Sync with Zabbix, in Netbox I can only assign the one template (atm), so I wondered how I can assign 2 templates instead, so I thought I could just keep the same template name which is Template A and just link B to it, job done.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4811

    #2
    Discovery allows to define extra checks.

    Click image for larger version

Name:	image.png
Views:	15
Size:	4.9 KB
ID:	510300
    and add additional disocvery action based on that result...

    Comment

    • G0nz0uk
      Member
      • Apr 2021
      • 47

      #3
      Thankscyber

      I think I'm confusing myself on getting this discovery working. So I have the template working just great if I assign to a host device that is running http://{HOST.IP}/v0/metrics.json

      As you can see on the template below I have no discovery yet:

      Click image for larger version

Name:	image.png
Views:	6
Size:	102.6 KB
ID:	510414I want to get it to to discover http://{HOST.IP}/pod/v0/metrics.json first then if it finds it run through the items of not then skip this template on that host.

      What would the discovery section look like for this please?

      Looking at your screenshot I can't tell how you get to that 'check' section.

      Thanks

      Comment

      Working...