script for add graph_item
Moderators: Developers, Moderators
script for add graph_item
Hello all there,
I am trying to write a PHP script.
it should automatically adjust graphing when the network environment is changing.
For example, add a new line in an existing graph when a new entry in an snmp table is resulted by an snmp query.
Or add a new stack in an existing graph which e. g. accumulates some values of some devices, when a new device is added to Cacti.
Is there a possible or even a given way to do this within Cacti?
Do I have to insert data into some mysql tables from Cacti scheme or can i use the PHP API for that?
Thanks for any suggestions
i.
I am trying to write a PHP script.
it should automatically adjust graphing when the network environment is changing.
For example, add a new line in an existing graph when a new entry in an snmp table is resulted by an snmp query.
Or add a new stack in an existing graph which e. g. accumulates some values of some devices, when a new device is added to Cacti.
Is there a possible or even a given way to do this within Cacti?
Do I have to insert data into some mysql tables from Cacti scheme or can i use the PHP API for that?
Thanks for any suggestions
i.
Just jumpin in to say I'm going to be looking into this as well.
my goal is to script something (or find an existing script) that will "auto-magically" add a new graph to a device if a snmp query discovers that a new interface or a new rule has been created that isnt already being graphed under the device.
When you help manage thousands of devices that can change daily, its a bit difficult to update a device manually each time it changes... boo.
Might I add it seems this would be a useful optional function of cacti. "Auto update changes made to device. yes/no"
my goal is to script something (or find an existing script) that will "auto-magically" add a new graph to a device if a snmp query discovers that a new interface or a new rule has been created that isnt already being graphed under the device.
When you help manage thousands of devices that can change daily, its a bit difficult to update a device manually each time it changes... boo.
Might I add it seems this would be a useful optional function of cacti. "Auto update changes made to device. yes/no"
no, running the query just tells what graphs are possible.
i have the automatic graphs now
but What i don't understand enough is the relation between query result and graph template.
i used a host template with the associated query, and with some graph templates associated to that query.
do i have to associate the wanted graph template to that host template when using the discovery template?
i thought so, but in addition to the wanted graphs, one broken graph was created, missing the data source.
br
i.
i have the automatic graphs now
but What i don't understand enough is the relation between query result and graph template.
i used a host template with the associated query, and with some graph templates associated to that query.
do i have to associate the wanted graph template to that host template when using the discovery template?
i thought so, but in addition to the wanted graphs, one broken graph was created, missing the data source.
br
i.
In its present form it will not do that, but the internal function will if you use them in your own plugin. Instead of having it loop through a subnet, have it loop through the current devices and re-poll each one.bitgod wrote:Thank you, cigamit. Sounds like just the thing i needed.
edit: dang, i jumped the gun. This locates new devices on a subnet but I didn't read anywhere that it will discover new interfaces on an existing device.
Who is online
Users browsing this forum: No registered users and 1 guest