Does anyone know any way to execute the same tholds code that runs the poller.php manually?.
This is because I've my own "poller.php".
Thanks!
tholds manual execution
Moderators: Developers, Moderators
Ouch!... thanks for your answer.cigamit wrote:Not really possible anymore, since thold now gets its data directly from Cacti's poller as it gets it from SNMP / a script. In the future, I am adding back in the ability to switch between the new method and the old method of polling the RRDs.
... but... is it possible, maybe coding in php and including the files needed from the plugin or cacti, do the same operations as the poller?
I'm not sure, but.. maybe some kind of storing the values in the table poller_output and then executing the needed steps from the function process_poller_output or maybe api_plugin_hook_function('poller_output', $rrd_update_array).
What do you think?
There are a hundred different ways to do it, its all up to how you want it done.
Easiest way. Update the threshold table with the current values from the rrd, or where ever you are getting the data, and then run the function to check all thresholds. Certainly not difficult, but there are a few small gotcha you will want to watch out for, but if you use most of the code from thold's function for grabbing it from the poller output, you should not have any problems with most of them.
Easiest way. Update the threshold table with the current values from the rrd, or where ever you are getting the data, and then run the function to check all thresholds. Certainly not difficult, but there are a few small gotcha you will want to watch out for, but if you use most of the code from thold's function for grabbing it from the poller output, you should not have any problems with most of them.
Granted, most of what I am saying pertains to the newest version that isn't released just yet (fairly soon), since that is the code I remember off the top of my head. In that version the thold_data table is updated, then at the end of the poller, it runs and does all the checks (to help alleviate the poller slow down).
I'm talking more about grabbing the current value, running it through the thold cdef function, then inserting it into the table. Then just running the check_all_thresholds function at the end.
Wait a few days and I should have the new version out, which will make it a lot easier for what you are attempting to do.
I'm talking more about grabbing the current value, running it through the thold cdef function, then inserting it into the table. Then just running the check_all_thresholds function at the end.
Wait a few days and I should have the new version out, which will make it a lot easier for what you are attempting to do.
Who is online
Users browsing this forum: No registered users and 5 guests