Ad Widget

Collapse

Zabbix 2.2 - Automate web scenario for mass virtual hosting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alex92
    Junior Member
    • Jun 2012
    • 3

    #1

    Zabbix 2.2 - Automate web scenario for mass virtual hosting

    Hi,

    I'm trying to do a template containing web scenario to make a simple http test (homepage only) for each apache virtual host.
    All my vhost can be found on the target server by running this command :
    Code:
    for vhost in $(ls /etc/apache2/sites-enabled/*); do grep ServerName $vhost | awk '{print $2}'; done
    Now, i'd like this list to be stored in a macro ${VHOST} and the content of the macro would be iterated like this in the Template :
    1st scenario :
    name of scenario : scenario {1st element of $VHOST}
    step : http://{1st element of $VHOST}
    and so on ...
    The goal is to automate scenario creation when a new vhost is created. Perhaps Low Level Discovery should be used here ?

    Can you give me advice about how to achieve that ?

    Thanks
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    web scenarios are not supported for lld (only items, trigger and graphs are).

    if you want to automate this, the best approach might be a script that does this via the api
    Zabbix 3.0 Network Monitoring book

    Comment

    Working...