Hi all,
I'm using the 4.4 appliance to test out a UserParameter. I've downloaded and installed the "speedtest" executable from OOKLA (https://www.speedtest.net/apps/cli) onto the Zabbix server, which incidentally is running in VMWare Workstation 15.
Here's the entry I've created in my zabbix_agentd.conf:
I then tested the UserParamer using
Which worked well, indicating to me that the key and script in the UserParameter were working fine.
The next step was to to setup an item. As you might guess from the actual UserParameter, the output I get is in JSON format so I'm going to do some preprocessing to get real values.....

So nothing too contentious there.
As far as preprocessing goes, I'm trying to keep it simple;

If I then try and test by using zabbix_get (which I understand uses the item definition rather than just running the UserParameter script), I get the below message;
Can anyone help me diagnose the cause of this message? I get the following message in the server log file as well;
I'm pretty sure that the error message in the server log is down to Zabbix trying to preprocess the error message rather than the output I'd expected.
As always, all advice and guidance is gratefully received.
Dave
I'm using the 4.4 appliance to test out a UserParameter. I've downloaded and installed the "speedtest" executable from OOKLA (https://www.speedtest.net/apps/cli) onto the Zabbix server, which incidentally is running in VMWare Workstation 15.
Here's the entry I've created in my zabbix_agentd.conf:
Code:
UserParameter=internet.speedtest,speedtest -f json
Code:
zabbix_agentd -t internet.speedtest
The next step was to to setup an item. As you might guess from the actual UserParameter, the output I get is in JSON format so I'm going to do some preprocessing to get real values.....
So nothing too contentious there.
As far as preprocessing goes, I'm trying to keep it simple;
If I then try and test by using zabbix_get (which I understand uses the item definition rather than just running the UserParameter script), I get the below message;
Code:
root@zabbix:/etc/zabbix# zabbix_get -s 127.0.0.1 -k internet.speedtest terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Aborted root@zabbix:/etc/zabbix#
Code:
root@zabbix:/var/log/zabbix# tail -f zabbix_server.log
16197:20191202:225017.194 server #39 started [preprocessing worker #3]
16179:20191202:225034.306 enabling Zabbix agent checks on host "Zabbix server": host became available
16153:20191202:225722.646 forced reloading of the configuration cache
16161:20191202:230141.185 error reason for "Zabbix server:internet.speedtest" changed: Preprocessing failed for: terminate called after throwing an instance of 'std::logic_error'. what(): basic_string::_M_con...
1. Failed: cannot extract value from json by path "$.ping.latency": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted'
As always, all advice and guidance is gratefully received.
Dave
1:37","isVpn":false,"externalIp":"31.48.90.99"},"s erver":{"id":17629,"name":"Exascale Limited","location":"Manchester","country":"United Kingdom","host":"speedtest.man0.uk.as61049.net","p ort":8080,"ip":"185.195.119.42"},"result":{"id":"9 0fa34ee-1512-4ce4-b499-983324c6918a","url":"https://www.speedtest.net/result/c/90fa34ee-1512-4ce4-b499-983324c6918a"}}]
Comment