Ad Widget

Collapse

Get data from UserParameter as JSON and parse with LLD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artyomtsybulkin
    Junior Member
    • Sep 2018
    • 3

    #1

    Get data from UserParameter as JSON and parse with LLD

    Hello! I'm beginning with Zabbix 4.0. I find many topics about LLD but nothing helps me. Documentation uses very simple examples with built-in key settings and nothing about customized LLD process.
    My scenario:
    1. I use remote Active agent behind the NAT.
    2. In agent config running this script:
    UserParameter=script.memory,powershell C:\Zabbix\Deploy\Example\x64\satellite.ps1 hardware memory
    3. I test it with zabbix_get:
    {
    "data": [
    {
    "{#SPEED}": 1600,
    "{#DEVICE}": "ChannelA-DIMM0",
    "{#CAPACITY}": 8589934592
    },
    {
    "{#SPEED}": 1600,
    "{#DEVICE}": "ChannelB-DIMM0",
    "{#CAPACITY}": 8589934592
    }
    ]
    }
    4. Next I want to create discovery rule that will make items from prototypes like this:
    1) Name=Speed for {#DEVICE}, Value=1600
    and
    2) Name={#DEVICE} capacity, Value=8589934592.

    5. In discovery rule i set key: script.memory, and filters {#SPEED} AND {#DEVICE} AND {#CAPACITY}.

    Questions: is my setup right or not? What settings I must implement in rule and item prototypes to complete this task?
    Thanks
    Last edited by artyomtsybulkin; 17-12-2018, 07:13.
  • simonuk1
    Member
    • Mar 2009
    • 66

    #2
    The discovery rule will bring back the associated jobs pairs. You the add discovery items using the discovery names is {#speed}.
    for every json key pair the discovery rule gets back it will create an item.

    Comment

    Working...