
Re: Insert threshlod alert in another database
Anonymous wrote:
Hi, everybody...
We have an application that monitor all the servers in our datacenter, generating alerts of web server problems, sql server problems, etc, and we'd like to add network equipment alerts.
What i have to do is to insert a register in a database whenever thold generate a threshold pass alert, and modify this register when the alert is clear.
I have did it already using Cricket, but Cricket is very simpler than Cacti.
Where can I start? In which script may I insert my code?
Any help will be useful.
Thanks.
I'm sorry for my poor english... :oops:
You would want to put your code in check-thold.php. There are several different places that it would be needed in that file for different instances.
For starters you would probably put your "breached threshold" code right after the line
Code:
if ( $breach_up || $breach_down) {
and put the "back to normal" code right after the line
Code:
} else {
if ($alertstat != 0) {
if ($logset == 1) {
logger($desc, "ok", 0, $currentval, $trigger, $item["thold_fail_count"]);
}
if ($item["thold_fail_count"] >= $trigger) {
I hope that helps to get you started.