Embed by graph ID number instead of widget ID
Currently, it is only possible to embed a graph by first manually adding it to a Dashboard which then assigns the graph ID a widget ID. This widget ID can be referenced in an iframe:
However, I do not want to have to manually add a graph to a dashboard. I would like to simply reference it by graph ID. This will allow me to easily integrate our logicmonitor graphs into our customer portal. If we could do this, we would add more hosts into LogicMonitor that we are currently not monitoring.
Additionally, it would be great to have the embedded graphs behave like they are on logicmonitor such that there is a magnifying glass that allows the user to go to a full screen view and search over a custom time period.
Benjamin_Chodro
Posted 11 years ago·Last reply 11 years ago
1 comment
Steve_Francis
·11 years agoYou can reference a graph without adding it to a dashboard by using the getGraphImage API call:
http://help.logicmonitor.com/developers-guide/download-data/#image
This let's you reference the graph by the combination of hostname, datasource-instance name, and graph name.
e.g.
to access a device shown as "Cisco 3560", for the CiscoCPU_ datasource, instance 0, to show the CPU graph:
https://ACCOUNT.logicmonitor.com/santaba/rpc/getGraphImage?hostDisplayedAs=Cisco%203560&dataSourceInstanceName=CiscoCPU-0&graphName=CPU
This provides a static image - not the zoomable/searchable versions. That's a good idea - I'll see if we can get that exposed, but hopefully this helps in the short term.