How to record Graph/Threshold manipulation by Hook API

Discussions on developing plugins for the Cacti Plugin Architecture

Moderators: Moderators, Developers

Post Reply
Posts: 3
Joined: Thu May 22, 2014 4:36 am

How to record Graph/Threshold manipulation by Hook API

#1 Post by hisarack » Wed Aug 27, 2014 1:51 am

Dear all,

Our cacti platform has many users.
In the beginning, we only release "Graph View" permission.
Our team centralized control all insert/update operations.
The reason is about we worry user create too many bad graphs.
It's will generates a lot of SNMP operation which is not working.

Now, we want to release insert/update operations to end user.
In order to management, we want to develop a plugin to record
Graph/Threshold manipulation, For example, who creates the CPU
threshold in this week? who creates new UDP traffic graph yesterday?

According to Hook API Reference:

I found "graph_items_remove" API, but i need some api like
"graph_items_add" or "graph_items_update". In addition, i
don't found any API can be used for record threshold manipulation.
Or, should i modify graphs_new.php or thold_add.php directly
(I think it's not good way)

Sorry for my bad english,
Thanks for any help or suggestion!!!

Post Reply