The trigger I'm using is:
- If Type not equal to Administrative; and
- If State not equal to OK
The relevant parts of my php trigger script (I'm using a copy of your
mail script and put this in here) are:
// *** Create system variables
$CatID = '"'.$interface[interface].'"';
$ItemID = '"'.$alarm[type_description].' for '.$event[host_name].'"';
$AlertInfo = '"On '.$event[date].', host '.$event[host_name].'
('.$interface[description].') generated this event: '.$event[text].'"';
// *** Replace %'s in variables
CatID = ereg_replace("%", " percent", $CatID);
$ItemID = ereg_replace("%", " percent", $ItemID);
$AlertInfo = ereg_replace("%", " percent", $AlertInfo);
$command = "/opt/jffnms/engine/actions/makeaticket.pl -12 ".$CatID." -14
".$ItemID." -16 ".$AlertInfo." -preprod";
exec("$command", $result);
Thanks,
Tim Carr
Buchanan Associates
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Javier
Szyszlican
Sent: Sunday, October 16, 2005 6:11 PM
Cc: [email protected]
Subject: Re: [jffnms-users] Problem with Output during Trigger
Processing
Are you matching by Alarms or Event?
If its alarm then you better do a var_dump or debug of the variables
because we
include 2 events in the parameter the start and the stop, and you may
not be
asking for the correct one.
Javier
Tim Carr wrote:
> I've got a question about the output of text when triggers are being
> processed. Specifically, the text that is coming out of the trigger,
> when an event is closing, does not match the text that is showing up
in
> the event log in the JFF browser view. This is relating to the
> $event[text] field.
>
>
>
> For example, when an interface goes down, the browser view of what the
> event is states:
>
>
>
> TCP/UDP Service Port 80 1 closed (Unknown Customer http)
>
>
>
> The output from the $event[text] processing in the trigger I created
is:
>
>
>
> TCP/UDP Service Port 80 1 closed (Unknown Customer http)
>
>
>
> Those two match up. But...when that interface comes back up, the
browser
> view of what the event is states:
>
>
>
> TCP/UDP Service Port 80 1 open (Unknown Customer http)
>
>
>
> But the output from the $event[text] processing in the trigger is:
>
>
>
> TCP/UDP Service Port 80 1 closed (Unknown Customer http)
>
>
>
> It looks like the "everything is now ok" event still shows the
interface
> to be down. Is this expected behavior?
>
>
>
> Thanks,
>
> Tim Carr
>
> Buchanan Associates
>
>
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users