Ad Widget

Collapse

LLD from json

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ermi
    Junior Member
    • Nov 2018
    • 2

    #1

    LLD from json

    I have json like so
    {
    "data": [
    {
    "{#HOST}": "host1",
    "{#STATUS}": "online"
    },
    {
    "{#HOST}": "host2",
    "{#STATUS}": "offline"
    }
    ]
    }

    Host1 & Host2 are not really host per se. I can get data only from json.
    Is it possible to use LLD to automatically create items (host 1 and host2) and associate values (offline or online) to it?
    I'm able to create items but never get any values.
    I have created file /etc/zabbix/zabbix_agentd.d/vpn.conf with content: UserParameter=vpn.host.check,curl -s -k <IP address>:8080/status
    If i run: zabbix_agentd -t vpn.host.check i can get taht json, so this part should be OK.
    I created Template, discovery rule and item prototype.
    I'm out of ideas. Help needed.
  • Hernandes Martins
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Apr 2011
    • 900

    #2
    Hi man,

    - Use zabbix 4
    - Create regular item
    After validate received json data
    - Create a dependent items with LLD

    __

    Att.
    Hernandes Martins - Zabbix Trainer

    Zabbix Brazil Partner - www.luniobr.com

    Zabbix Brazil Community - www.zabbixbrasil.org

    Blog: hernandesmartins.blogspot.com.br

    Skype: hernandss
    Telegram: @MrHernandes

    Español
    Facebook: facebook.com/groups/zabbixlatam
    Telegram: https://t.me/ZabbixEspañol

    Português
    Facebook: facebook.com/groups/zabbixbrasil/
    Telegram: https://t.me/ZabbixBrasil

    Comment

    Working...