Are you sure the admin user has the trigger Enabled (checkbox) ?
Because the trigger is not getting executed at all.
Javier
Tim Carr wrote:
Javier - thanks for the lead...that got us part of the way. Any
thoughts on what I still might be doing wrong? (php version 5.0.4)
Here's my current trigger log:
10:30:13================================================================
===
11:00:13================================================================
===
11:30:14================================================================
===
12:00:13================================================================
===
12:30:15================================================================
===
12:40:13================================================================
===
12:50:14================================================================
===
13:00:13================================================================
===
13:10:14================================================================
===
So it is getting triggers, but nothing is happening.
This line is in the consolidate log, referring to the last trigger
above:
13:30:28 New Alarm: 40807 := 2006-01-12 13:30:14 - 2006-01-12 14:00:44 -
111 - 12 - 3 - 303349 - 303349
This line is in the rrd_analyzer log:
13:30:14 New Event (303349): 2006-01-12 13:30:14 - 12 - 24 - C: - alert
- rrd_analizer_sla - Storage Used > 80%: 94.36 % - 9
My configuration:
- Under "User Triggers", the Admin user is setup for the trigger "Any
Event" that I defined.
- Under "Trigger Configuration", the "Any Event" trigger is a Type
"Match Events".
- The rules for "Any Event" are:
ID = 2
Position = 1
Field = Any
Operator = Is
Action = "makeaticket"
If Match = Stop This Trigger
Final Operator = and
- The Action Defitions are:
ID = 10002
Description = makeaticket
Command = makeaticket
Internal Parameters = <blank>
User Parameters = <blank>
- In the /opt/jffnms/engine/actions directory, I have the
"makeaticket.inc.php" file (owner is jffnms:jffnms), chmod to 777
This is the "makeaticket.inc.php" file (which just creates a text file):
<?
/* This file is part of JFFNMS
* Adapted by Tim Carr to generate CTS tickets
* Copyright (C) <2002-2005> Javier Szyszlican <[EMAIL PROTECTED]>
* This program is licensed under the GNU GPL, full terms in the LICENSE
file
*/
function action_makeaticket ($data) {
extract($data);
//debug ($data);
// ***Test code for output of all possible variables
$file = "/opt/jffnms/engine/actions/testoutput.txt";
$testdata = "event-date = $event[date]\n".
"event-type = $event[type]\n".
"event-host_name = $event[host_name]\n".
"event-text = $event[text]\n".
"alarm-date_start = $alarm[date_start]\n".
"alarm-type_description = $alarm[type_description]\n".
"alarm-state_description = $alarm[$state_description]\n".
"interface-type_description = $interface[type_descripton]\n".
"interface-host_name = $interface[host_name]\n".
"interface-interface = $interface[interface]\n".
"interface-description = $interface[description]\n";
$fp = fopen ("$file", "wb");
fwrite ($fp, $testdata);
fclose ($fp);
return $result;
}
Thanks,
Tim Carr
Buchanan Associates
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Javier
Szyszlican
Sent: Wednesday, January 11, 2006 8:01 PM
Cc: jffnms-users@lists.sourceforge.net
Subject: Re: [jffnms-users] PHP Error when Trigger/Action
You have enable that trigger for a user for it to be active.
Look into the triggers users menu.
Javier
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Javier Szyszlican, Project Leader, JFFNMS
[EMAIL PROTECTED]
I hope JFFNMS or I were helpful to you, if you
can, please donate at http://jffnms.org/donate
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users