hi,
I was wondering if i could import a graph from zabbix in my extranet to give some view to my customer of some static graph so i started searching a little. At first i would think a simple curl to the graph url will do it but i got a problem in linking the url to the server.
Ie if i have a server01.myserver.com and a graph name cpuload how could i build the url to retreive the graph ?
It seems the url is made of the database id of the host and the graph but i see no way in the api to retreive the image of the graph. So i guess there is no way to use it for that i must build the url by hand , authenticate and retreive the graph. Seems a little hard to do and automate. Si the way would be:
- API call to http://www.zabbix.com/documentation/.../api/graph/get with a filter on graph name and hostname to get the graph id that seems unique even in templated graphs.
- use curl to connect to the frontend
- build the url /chart2.php?graphid=XXX&sid=f2054851b316800e&width= 600&period=YYYYY&stime=UNIXTIME
- get the image
- logout
Do anyone knows of a an easier way ?
I was wondering if i could import a graph from zabbix in my extranet to give some view to my customer of some static graph so i started searching a little. At first i would think a simple curl to the graph url will do it but i got a problem in linking the url to the server.
Ie if i have a server01.myserver.com and a graph name cpuload how could i build the url to retreive the graph ?
It seems the url is made of the database id of the host and the graph but i see no way in the api to retreive the image of the graph. So i guess there is no way to use it for that i must build the url by hand , authenticate and retreive the graph. Seems a little hard to do and automate. Si the way would be:
- API call to http://www.zabbix.com/documentation/.../api/graph/get with a filter on graph name and hostname to get the graph id that seems unique even in templated graphs.
- use curl to connect to the frontend
- build the url /chart2.php?graphid=XXX&sid=f2054851b316800e&width= 600&period=YYYYY&stime=UNIXTIME
- get the image
- logout
Do anyone knows of a an easier way ?

Comment