[rt-users] Error when editing RegExp in RT::Extension::Nagios

2011-06-21 Thread Giuseppe Sollazzo

Hi,
I've edited the regular expression that is matched against subjects to 
look like
m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+(Service|Host) Alt: 
([^/]+)/?(.*)\s+is\s+(\w+)}i


which should match, provided I'm not wrong, something like
PROBLEM alert Service Alt: server/server_service is WARNING
RECOVERY alert Service Alt: server/server_service is OK

However, I see messages are not merged and by inspecting the log I get 
this error:
X-RT-Original-Encoding: utf-8 
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:659)
[Tue Jun 21 14:28:02 2011] [debug]: Removing deferred recipients from 
Bcc: line (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:682)
[Tue Jun 21 14:28:02 2011] [debug]: Setting deferred recipients for 
attribute creation (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:691)
[Tue Jun 21 14:28:02 2011] [debug]: No recipients found for deferred 
delivery on transaction #19182 
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:704)
[Tue Jun 21 14:28:02 2011] [info]: 
rt-4.0.0-8571-1308666481-267.103-4-0@SGUL #103/19182 - Scrip 4 On 
Create Notify AdminCcs (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)
[Tue Jun 21 14:28:02 2011] [info]: 
rt-4.0.0-8571-1308666481-267.103-4-0@SGUL No recipients found. Not 
sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:352)
[Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #11 on txn #19182 
of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
[Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #12 on txn #19182 
of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
[Tue Jun 21 14:28:02 2011] [info]: Extracted type, category, host, 
problem_type and problem_severity from
subject with values RECOVERY, Service, sambadev2, sambadev2_root and OK 
(/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:36)
[Tue Jun 21 14:28:02 2011] [error]: Scrip Commit 12 died. - Can't call 
method SetStatus on an undefined value at 
/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm 
line 79.


Stack:
  
[/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:79]

  [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
  [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
  [/opt/rt4/sbin/../lib/RT/Scrips.pm:189]
  [/opt/rt4/sbin/../lib/RT/Transaction.pm:198]
  [/opt/rt4/sbin/../lib/RT/Record.pm:1450]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:669]
  [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495]
  [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] 
(/opt/rt4/sbin/../lib/RT/Scrip.pm:483)
[Tue Jun 21 14:28:02 2011] [info]: Ticket 103 created in queue 'Nagios' 
by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681)
[Tue Jun 21 14:28:02 2011] [debug]: Found 0 scrips for TransactionBatch 
stage with applicable type(s) Create for txn #19182 on ticket #103 
(/opt/rt4/sbin/../lib/RT/Scrips.pm:367)


Any idea?

Thanks,
Giuseppe

--


Giuseppe Sollazzo
Senior Systems Analyst
Computing Services
Information Services
St. George's, University Of London
Cranmer Terrace
London SW17 0RE

Email: gsoll...@sgul.ac.uk
Direct Dial: +44 20 8725 5160
Fax: +44 20 8725 3583




2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Error when editing RegExp in RT::Extension::Nagios

2011-06-21 Thread sunnavy
Hi Giuseppe

you need to update the VALUE param of $tickets-LimitSubject() accordingly,
the code is below the regex about 12 lines.

best wishes
sunnavy

On 11-06-21 15:32, Giuseppe Sollazzo wrote:
 Hi,
 I've edited the regular expression that is matched against subjects
 to look like
 m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+(Service|Host) Alt:
 ([^/]+)/?(.*)\s+is\s+(\w+)}i
 
 which should match, provided I'm not wrong, something like
 PROBLEM alert Service Alt: server/server_service is WARNING
 RECOVERY alert Service Alt: server/server_service is OK
 
 However, I see messages are not merged and by inspecting the log I
 get this error:
 X-RT-Original-Encoding: utf-8
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:659)
 [Tue Jun 21 14:28:02 2011] [debug]: Removing deferred recipients
 from Bcc: line (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:682)
 [Tue Jun 21 14:28:02 2011] [debug]: Setting deferred recipients for
 attribute creation (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:691)
 [Tue Jun 21 14:28:02 2011] [debug]: No recipients found for deferred
 delivery on transaction #19182
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:704)
 [Tue Jun 21 14:28:02 2011] [info]:
 rt-4.0.0-8571-1308666481-267.103-4-0@SGUL #103/19182 - Scrip 4 On
 Create Notify AdminCcs
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)
 [Tue Jun 21 14:28:02 2011] [info]:
 rt-4.0.0-8571-1308666481-267.103-4-0@SGUL No recipients found. Not
 sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:352)
 [Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #11 on txn
 #19182 of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
 [Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #12 on txn
 #19182 of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
 [Tue Jun 21 14:28:02 2011] [info]: Extracted type, category, host,
 problem_type and problem_severity from
 subject with values RECOVERY, Service, sambadev2, sambadev2_root and
 OK 
 (/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:36)
 [Tue Jun 21 14:28:02 2011] [error]: Scrip Commit 12 died. - Can't
 call method SetStatus on an undefined value at 
 /opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm
 line 79.
 
 Stack:
 [/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:79]
   [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
   [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
   [/opt/rt4/sbin/../lib/RT/Scrips.pm:189]
   [/opt/rt4/sbin/../lib/RT/Transaction.pm:198]
   [/opt/rt4/sbin/../lib/RT/Record.pm:1450]
   [/opt/rt4/sbin/../lib/RT/Ticket.pm:669]
   [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495]
   [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
 (/opt/rt4/sbin/../lib/RT/Scrip.pm:483)
 [Tue Jun 21 14:28:02 2011] [info]: Ticket 103 created in queue
 'Nagios' by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681)
 [Tue Jun 21 14:28:02 2011] [debug]: Found 0 scrips for
 TransactionBatch stage with applicable type(s) Create for txn #19182
 on ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:367)
 
 Any idea?
 
 Thanks,
 Giuseppe
 
 -- 
 
 
 Giuseppe Sollazzo
 Senior Systems Analyst
 Computing Services
 Information Services
 St. George's, University Of London
 Cranmer Terrace
 London SW17 0RE
 
 Email: gsoll...@sgul.ac.uk
 Direct Dial: +44 20 8725 5160
 Fax: +44 20 8725 3583
 
 
 
 
 2011 Training: http://bestpractical.com/services/training.html


2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Error when editing RegExp in RT::Extension::Nagios

2011-06-21 Thread Giuseppe Sollazzo

Hi Sunnavy,
many thanks - it now makes sense :-) I had missed that bit of code.

Any plan to make the regexp customisable in future releases?

G

On 21/06/11 16:09, sunnavy wrote:

Hi Giuseppe

you need to update the VALUE param of $tickets-LimitSubject() accordingly,
the code is below the regex about 12 lines.

best wishes
sunnavy

On 11-06-21 15:32, Giuseppe Sollazzo wrote:

Hi,
I've edited the regular expression that is matched against subjects
to look like
m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+(Service|Host) Alt:
([^/]+)/?(.*)\s+is\s+(\w+)}i

which should match, provided I'm not wrong, something like
PROBLEM alert Service Alt: server/server_service is WARNING
RECOVERY alert Service Alt: server/server_service is OK

However, I see messages are not merged and by inspecting the log I
get this error:
X-RT-Original-Encoding: utf-8
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:659)
[Tue Jun 21 14:28:02 2011] [debug]: Removing deferred recipients
from Bcc: line (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:682)
[Tue Jun 21 14:28:02 2011] [debug]: Setting deferred recipients for
attribute creation (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:691)
[Tue Jun 21 14:28:02 2011] [debug]: No recipients found for deferred
delivery on transaction #19182
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:704)
[Tue Jun 21 14:28:02 2011] [info]:
rt-4.0.0-8571-1308666481-267.103-4-0@SGUL  #103/19182 - Scrip 4 On
Create Notify AdminCcs
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)
[Tue Jun 21 14:28:02 2011] [info]:
rt-4.0.0-8571-1308666481-267.103-4-0@SGUL  No recipients found. Not
sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:352)
[Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #11 on txn
#19182 of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
[Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #12 on txn
#19182 of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
[Tue Jun 21 14:28:02 2011] [info]: Extracted type, category, host,
problem_type and problem_severity from
subject with values RECOVERY, Service, sambadev2, sambadev2_root and
OK 
(/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:36)
[Tue Jun 21 14:28:02 2011] [error]: Scrip Commit 12 died. - Can't
call method SetStatus on an undefined value at 
/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm
line 79.

Stack:
[/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:79]
   [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
   [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
   [/opt/rt4/sbin/../lib/RT/Scrips.pm:189]
   [/opt/rt4/sbin/../lib/RT/Transaction.pm:198]
   [/opt/rt4/sbin/../lib/RT/Record.pm:1450]
   [/opt/rt4/sbin/../lib/RT/Ticket.pm:669]
   [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495]
   [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
(/opt/rt4/sbin/../lib/RT/Scrip.pm:483)
[Tue Jun 21 14:28:02 2011] [info]: Ticket 103 created in queue
'Nagios' by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681)
[Tue Jun 21 14:28:02 2011] [debug]: Found 0 scrips for
TransactionBatch stage with applicable type(s) Create for txn #19182
on ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:367)

Any idea?

Thanks,
Giuseppe

--


Giuseppe Sollazzo
Senior Systems Analyst
Computing Services
Information Services
St. George's, University Of London
Cranmer Terrace
London SW17 0RE

Email: gsoll...@sgul.ac.uk
Direct Dial: +44 20 8725 5160
Fax: +44 20 8725 3583




2011 Training: http://bestpractical.com/services/training.html


2011 Training: http://bestpractical.com/services/training.html



--


Giuseppe Sollazzo
Senior Systems Analyst
Computing Services
Information Services
St. George's, University Of London
Cranmer Terrace
London SW17 0RE

Email: gsoll...@sgul.ac.uk
Direct Dial: +44 20 8725 5160
Fax: +44 20 8725 3583




2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Error when editing RegExp in RT::Extension::Nagios

2011-06-21 Thread sunnavy
not yet, I'll think about that though.
thanks.

best wishes
sunnavy

On 11-06-21 16:22, Giuseppe Sollazzo wrote:
 Hi Sunnavy,
 many thanks - it now makes sense :-) I had missed that bit of code.
 
 Any plan to make the regexp customisable in future releases?
 
 G
 
 On 21/06/11 16:09, sunnavy wrote:
 Hi Giuseppe
 
 you need to update the VALUE param of $tickets-LimitSubject() accordingly,
 the code is below the regex about 12 lines.
 
 best wishes
 sunnavy
 
 On 11-06-21 15:32, Giuseppe Sollazzo wrote:
 Hi,
 I've edited the regular expression that is matched against subjects
 to look like
 m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+(Service|Host) Alt:
 ([^/]+)/?(.*)\s+is\s+(\w+)}i
 
 which should match, provided I'm not wrong, something like
 PROBLEM alert Service Alt: server/server_service is WARNING
 RECOVERY alert Service Alt: server/server_service is OK
 
 However, I see messages are not merged and by inspecting the log I
 get this error:
 X-RT-Original-Encoding: utf-8
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:659)
 [Tue Jun 21 14:28:02 2011] [debug]: Removing deferred recipients
 from Bcc: line (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:682)
 [Tue Jun 21 14:28:02 2011] [debug]: Setting deferred recipients for
 attribute creation (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:691)
 [Tue Jun 21 14:28:02 2011] [debug]: No recipients found for deferred
 delivery on transaction #19182
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:704)
 [Tue Jun 21 14:28:02 2011] [info]:
 rt-4.0.0-8571-1308666481-267.103-4-0@SGUL  #103/19182 - Scrip 4 On
 Create Notify AdminCcs
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)
 [Tue Jun 21 14:28:02 2011] [info]:
 rt-4.0.0-8571-1308666481-267.103-4-0@SGUL  No recipients found. Not
 sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:352)
 [Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #11 on txn
 #19182 of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
 [Tue Jun 21 14:28:02 2011] [debug]: Committing scrip #12 on txn
 #19182 of ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:183)
 [Tue Jun 21 14:28:02 2011] [info]: Extracted type, category, host,
 problem_type and problem_severity from
 subject with values RECOVERY, Service, sambadev2, sambadev2_root and
 OK 
 (/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:36)
 [Tue Jun 21 14:28:02 2011] [error]: Scrip Commit 12 died. - Can't
 call method SetStatus on an undefined value at 
 /opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm
 line 79.
 
 Stack:
 [/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:79]
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
[/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
[/opt/rt4/sbin/../lib/RT/Scrips.pm:189]
[/opt/rt4/sbin/../lib/RT/Transaction.pm:198]
[/opt/rt4/sbin/../lib/RT/Record.pm:1450]
[/opt/rt4/sbin/../lib/RT/Ticket.pm:669]
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495]
[/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
 (/opt/rt4/sbin/../lib/RT/Scrip.pm:483)
 [Tue Jun 21 14:28:02 2011] [info]: Ticket 103 created in queue
 'Nagios' by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681)
 [Tue Jun 21 14:28:02 2011] [debug]: Found 0 scrips for
 TransactionBatch stage with applicable type(s) Create for txn #19182
 on ticket #103 (/opt/rt4/sbin/../lib/RT/Scrips.pm:367)
 
 Any idea?
 
 Thanks,
 Giuseppe
 
 -- 
 
 
 Giuseppe Sollazzo
 Senior Systems Analyst
 Computing Services
 Information Services
 St. George's, University Of London
 Cranmer Terrace
 London SW17 0RE
 
 Email: gsoll...@sgul.ac.uk
 Direct Dial: +44 20 8725 5160
 Fax: +44 20 8725 3583
 
 
 
 
 2011 Training: http://bestpractical.com/services/training.html
 
 2011 Training: http://bestpractical.com/services/training.html
 
 
 -- 
 
 
 Giuseppe Sollazzo
 Senior Systems Analyst
 Computing Services
 Information Services
 St. George's, University Of London
 Cranmer Terrace
 London SW17 0RE
 
 Email: gsoll...@sgul.ac.uk
 Direct Dial: +44 20 8725 5160
 Fax: +44 20 8725 3583
 
 
 
 
 2011 Training: http://bestpractical.com/services/training.html


2011 Training: http://bestpractical.com/services/training.html