Hi All,
I am doing a discovery of GUIDs which contain braces {}. While the JSON is valid (RFC 4627), it seems Zabbix doesn't agree (I receive invalid JSON error). Here is an example of JSON output when the script is run interactively on the zabbix app server as root;
./script.action <host> path/<host>/share
Am I correct in assuming that Zabbix is treating the {GUID} as a macro when attempting to "populate" the items? My guess is when it attempts the discovery, it tries to evaluate the contents of {GUID} as a value, instead of treating it as a literal string value.
These are the the two keys I have tried with the same error;
// Using macros to do templated discovery
script.action[{HOST.HOST},path/{HOST.HOST}/share]
// Statically defining parameters
script.action[host,path/host/share]
I am doing a discovery of GUIDs which contain braces {}. While the JSON is valid (RFC 4627), it seems Zabbix doesn't agree (I receive invalid JSON error). Here is an example of JSON output when the script is run interactively on the zabbix app server as root;
./script.action <host> path/<host>/share
Code:
{
"data":[
{"{#DIRECTORY}":"{049FA6AE-39F5-4E80-B7E0-BA6155C87C1D}"},
{"{#DIRECTORY}":"{FF71860A-DEAE-4325-BA62-276D59309ED4}"}
]
}
These are the the two keys I have tried with the same error;
// Using macros to do templated discovery
script.action[{HOST.HOST},path/{HOST.HOST}/share]
// Statically defining parameters
script.action[host,path/host/share]
The zabbix user is granted sudo NOPASSWD access, so zabbix should be able to execute properly. I don't believe it's a permissions issue. Indeed if I switch to the zabbix user and execute it returns as expected;
Comment