Ad Widget

Collapse

Problem with Windows logical Disk : Value should be a JSON object.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arcocide
    Member
    • Apr 2015
    • 84

    #1

    Problem with Windows logical Disk : Value should be a JSON object.

    Hi,

    I would like to add a template for discover logical disk and physical disk.
    This template is "Template OS Windows Discovery".

    The Zabbix Team has collected all official Zabbix monitoring templates and integrations.



    In this template there is logical disk discovery, physical disk discovery and Network interface discovery. Everything works except logical disk discovery because I have this error : Value should be a JSON object.

    If I test since zabbix server with command it's ok :

    root@ENT-SC-ZBX01:/home/administrator# zabbix_get -s 192.168.110.20 -p 10050 -k windowsldisk.discovery
    {
    "data":[

    { "{#DISKNUMLET}" : "C:" },
    { "{#DISKNUMLET}" : "D:" },
    { "{#DISKNUMLET}" : "D:\ExchangeDB\Arbitration" },
    { "{#DISKNUMLET}" : "D:\ExchDB\ElvAutres_01_DB" },
    { "{#DISKNUMLET}" : "D:\ExchDB\ElvAutres_02_DB" },
    { "{#DISKNUMLET}" : "D:\ExchDB\ElvAutres_03_DB" },
    { "{#DISKNUMLET}" : "D:\ExchDB\PersEducNat_01_DB" },
    { "{#DISKNUMLET}" : "D:\ExchDB\PersEducNat_02_DB" },
    { "{#DISKNUMLET}" : "D:\ExchDB\PersEducNat_03_DB" },
    { "{#DISKNUMLET}" : "D:\ExchLOG\ElvAutres_01_LOG" },
    { "{#DISKNUMLET}" : "D:\ExchLOG\ElvAutres_02_LOG" },
    { "{#DISKNUMLET}" : "D:\ExchLOG\ElvAutres_03_LOG" },
    { "{#DISKNUMLET}" : "D:\ExchLOG\PersEducNat_01_LOG" },
    { "{#DISKNUMLET}" : "D:\ExchLOG\PersEducNat_02_LOG" },
    { "{#DISKNUMLET}" : "D:\ExchLOG\PersEducNat_03_LOG" }

    ]
    }

    But not since interface web.
  • volter
    Member
    Zabbix Certified Specialist
    • Dec 2011
    • 85

    #2
    The backslashes are the problem.

    Comment

    • Arcocide
      Member
      • Apr 2015
      • 84

      #3
      Ok but I need it.

      How I do modify my script ?

      Comment

      • volter
        Member
        Zabbix Certified Specialist
        • Dec 2011
        • 85

        #4
        Read up about backslashes in JSON and how to escape them in whatever script you are using.

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          And make sure to vote for

          Comment

          Working...