Ad Widget

Collapse

Array in User Macro ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StevenBrs
    Junior Member
    • Sep 2015
    • 11

    #1

    Array in User Macro ?

    Hi all,

    Is it possible to define a host user macro with multiple values in an array ?
    I want to create a list of processes for specific hosts that need to be checked if they are running.

    I know I can create the items and triggers directly, but I was hoping to create this in a generic way in a template...

    I'm using Zabbix 4.0.12

    Thanks for your advice
    Steven
    Last edited by StevenBrs; 01-10-2019, 15:53. Reason: Added Zabbix version
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    You can put as string in macro JSON table.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • StevenBrs
      Junior Member
      • Sep 2015
      • 11

      #3
      Sorry for the delayed answer, never got an e-mail with replies.

      Anyway; What I would like to do:
      Define a macro on a host: PROCESSES=service1,service2,service3
      and then check if those services are running.

      kloczek : do you mind explaining the JSON table more ? How can I check multiple SNMP values against the table ?

      In the mean time I'll try to write my own check script, see if I can get it working that way

      Comment

      Working...