Ad Widget

Collapse

Item - Preprocessing - JSON Path ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RockerMan
    Junior Member
    • Feb 2019
    • 8

    #1

    Item - Preprocessing - JSON Path ?

    Hi

    I collect data with script (zbx-hpmsa) from HPE MSA 2040. Everything works fine, except for data that has "-". And there are many such parameters.
    Here is an example of JSON code:
    Code:
    {
    "A":
    {
    "health":"OK",
    "[B]health-num[/B]":"0",
    "status":"Operational",
    "[B]status-num[/B]":"0",
    "redundancy":"Redundant",
    "[B]redundancy-num[/B]":"2",
    "[B]cpu-load[/B]":"28",
    "iops":"634",
    "[B]sc-fw[/B]":"GLS225R03-01",
    "[B]flash-health[/B]":"OK",
    "[B]flash-health-num[/B]":"0",
    "[B]flash-status[/B]":"Installed",
    "[B]flash-status-num[/B]":"1"},
    "B":
    {
    "health":"OK",
    "[B]health-num[/B]":"0",
    "status":"Operational",
    "[B]status-num[/B]":"0",
    "redundancy":"Redundant",
    "[B]redundancy-num[/B]":"2",
    "[B]cpu-load[/B]":"1",
    "iops":"0",
    "[B]sc-fw[/B]":"GLS225R03-01",
    "[B]flash-health[/B]":"OK",
    "[B]flash-health-num[/B]":"0",
    "[B]flash-status[/B]":"Installed",
    "[B]flash-status-num[/B]":"1"
    }
    }
    The data, in the parameters of which there is no "-", parsing good.

    Tell me plz, how to properly format the parameter in the "JSON Path", with "-", to enable/work parsing?

    -
    With sincerely regards

    PS
    Sorry
    Code:
    # zabbix_server --version
    zabbix_server (Zabbix) 4.0.2
    # cat /etc/*release*
    CentOS Linux release 7.5.1804 (Core)
    Last edited by RockerMan; 19-04-2019, 07:43.
  • RockerMan
    Junior Member
    • Feb 2019
    • 8

    #2
    add
    the record as recommended in the documentation why it does not work
    Code:
    JSON Path  $['A']['cpu-load']

    Comment

    • RockerMan
      Junior Member
      • Feb 2019
      • 8

      #3
      mystic, work...
      although I have not changed the settings since yesterday
      Code:
      JSON Path $['A']['cpu-load']
      JSON Path $['B']['cpu-load']

      Comment

      Working...