[rt-users] Making RT and Altiris play nice

Jeremy Winder jwinder at logicalsi.com
Wed Jun 10 10:56:08 EDT 2009


I'm attempting to write a scrip to merge incoming tickets based off the
Altiris Incident number. I started by following the example here
http://wiki.bestpractical.com/view/AutoCloseOnNagiosRecoveryMessages But
I'm getting the following error in my logs:

[error]: Scrip 16 Commit failed: Can't call method "GetHeader" on an
undefined value at (eval 2220) line 11.

This is what I have in the Custom action cleanup code:

# If the subject of the ticket matches a pattern suggesting that it is
from
# Altiris AND there is an existing ticket with the same Incident number,
# merge this ticket into that ticket.
#
# Based on
http://wiki.bestpractical.com/view/AutoCloseOnNagiosRecoveryMessages
#

my $incident_number = undef;

my $transaction = $self->TransactionObj;
my $subject = $transaction->Attachments->First->GetHeader('Subject');
if ($subject =~ /Incident \#(\d+) has/) {
     # This looks like a Altiris incident message
     $incident_number = $1;

     $RT::Logger->debug("Found an Altiris Incident #:  
$incident_number");
} else {
     return 1;
}

Also, if it helps, I'm running RT 3.8.3.

Thanks of any help anyone can give me,

Jeremy




More information about the rt-users mailing list