We seek to process monitoring data of some particular items in the database, but filtering by itemid in the Trends or History table tells us that there is no data for that item, however when plotting that item from the zabbix web interface the graphic shows values from quite some time ago, so it must be stored somewhere, but we have not found where it can be. Also there are some items that do have their values in the tables of the database, only they are not the ones that interest us for the work we are doing. Please,any suggestions will be well received.
Ad Widget
Collapse
Obtaining values from zabbix database
Collapse
X
-
Obtaining values from zabbix database
We seek to process monitoring data of some particular items in the database, but filtering by itemid in the Trends or History table tells us that there is no data for that item, however when plotting that item from the zabbix web interface the graphic shows values from quite some time ago, so it must be stored somewhere, but we have not found where it can be. Also there are some items that do have their values in the tables of the database, only they are not the ones that interest us for the work we are doing. Please,any suggestions will be well received.Tags: None -
http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
https://kloczek.wordpress.com/
zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
My zabbix templates https://github.com/kloczek/zabbix-templates -
When trying to make any request it gives us the following error, both when doing it remotely and directly on the server, the version of zabbix that we are using is 3:{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}There is a possibility that with this API you will receive the data, even if they do not appear by directly surveying the database?
Comment
-
Error message is clear.
Your input json string has some syntax issue(s).http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
https://kloczek.wordpress.com/
zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
My zabbix templates https://github.com/kloczek/zabbix-templatesComment
-
Comment
-
params must be not the record ("{}"} but the array ("[]").Code:$ curl --silent -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"apiinfo.version","params":{"filter":{"params":[]}},"id":0}' http://localhost/api_jsonrpc.php; echo {"jsonrpc":"2.0","result":"3.4.9","id":0} $ curl --silent -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"apiinfo.version","params":{"filter":{"params":[]}},"auth":null,"id":0}' http://localhost/api_jsonrpc.php; echo {"jsonrpc":"2.0","result":"3.4.9","id":0}Last edited by kloczek; 17-05-2018, 08:59.http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
https://kloczek.wordpress.com/
zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
My zabbix templates https://github.com/kloczek/zabbix-templatesComment
-
the syntax error was fixed with that, but now the output of the command gives me: <p>The requested URL /api_jsonrpc.php was not found on this server.</p> it seems that the API is not available on my serverparams must be not the record ("{}"} but the array ("[]").Code:$ curl --silent -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"apiinfo.version","params":{"filter":{"params":[]}},"id":0}' http://localhost/api_jsonrpc.php; echo {"jsonrpc":"2.0","result":"3.4.9","id":0} $ curl --silent -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"apiinfo.version","params":{"filter":{"params":[]}},"auth":null,"id":0}' http://localhost/api_jsonrpc.php; echo {"jsonrpc":"2.0","result":"3.4.9","id":0}
Comment
Comment