ZABBIX Forums  

Go Back   ZABBIX Forums > Zabbix Discussions and Feedback > Zabbix Troubleshooting and Problems

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2017, 15:56
Arcocide Arcocide is offline
Member
 
Join Date: Apr 2015
Posts: 67
Default 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".

https://share.zabbix.com/operating-s...-discovery-lld


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.
Reply With Quote
  #2  
Old 04-12-2017, 23:47
volter volter is offline
Member
Zabbix certified specialist
 
Join Date: Dec 2011
Location: Vienna, Austria
Posts: 51
Default

The backslashes are the problem.
Reply With Quote
  #3  
Old 05-12-2017, 10:08
Arcocide Arcocide is offline
Member
 
Join Date: Apr 2015
Posts: 67
Default

Ok but I need it.

How I do modify my script ?
Reply With Quote
  #4  
Old 05-12-2017, 10:36
volter volter is offline
Member
Zabbix certified specialist
 
Join Date: Dec 2011
Location: Vienna, Austria
Posts: 51
Default

Read up about backslashes in JSON and how to escape them in whatever script you are using.
Reply With Quote
  #5  
Old 08-12-2017, 18:49
dimir dimir is offline
Zabbix developer
 
Join Date: Apr 2011
Location: Riga, Latvia
Posts: 48
Default

And make sure to vote for

https://support.zabbix.com/browse/ZBXNEXT-1595
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:41.