Ad Widget

Collapse

Idea: reusable templates (use one template more than once per host)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kuba-orlik
    Junior Member
    • Aug 2020
    • 1

    #1

    Idea: reusable templates (use one template more than once per host)

    I tried using Zabbix for monitoring of a VPS. We run multiple sites on that VPS and I wanted to receive notifications when any of the websites goes down.

    I quickly discovered that for each of the 20 websites, I have to:

    * set up a Web Scenario
    * set up a trigger

    That's a lot of clicking, and when I want to change something, I have to again do it one by one for each scenario/trigger.

    I figured that a user-friendly way to handle this scenario would be to use templates with parameters.

    Currently one template can be applied to a host only once. If I wanted to tests multiple sites (vhosts) at once, it would be cool if I could create a template that sets up the triggers and web scenarios for a given domain and then apply the template multiple times to the host, each time with a different domain/URL as a parameter
  • isaqueprofeta
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Aug 2020
    • 154

    #2
    There's something about Templates coming for AWS in 5.2 (if that's your case).

    Meanwhile, in 5.0 (And since 3.4 I think...) you can try a workaround using Dependant Item + HTTP Agent with some limitations:

    - Create a Master Item HTTPAgent based on a query on your VPS API that returns all sites you need to monitor.
    - Create a Dependant HTTPAgent item with some preprocessing based on this Master Item to check the availability.
    - Validating that it works, put it on an LLD, and create the prototype triggers.

    I say limitations because this way you don't have the Scenario's Steps feature.

    Another option is to mess around with the Zabbix API and make it create your items dynamically.

    Hope it helps meanwhile.

    Comment

    Working...