Difference between revisions of "SendAlarmPointEvent"

From Request Tracker Wiki
Jump to navigation Jump to search
m (2 revisions imported)
 
m (Added syntaxhighlight)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Here's a [[Scrip]] that you can use to send an alert to [http://xmatters.com Alarm Point] if a ticket is new in a particular [[Queue]](s). This scrip will only run if a ticket is created. If this condition is met, then it will create the appropriate parameters, and pass them to the Alarm Point message queueing agent. This could be done globally, but we have implemented it on the two queues --of 10-- which need after hours alerts. This effectively eliminates the need for a shared pager.
Here's a [[scrip]] that you can use to send an alert to [http://xmatters.com Alarm Point] if a ticket is new in a particular [[queue]]. This scrip will only run if a ticket is created. If this condition is met, then it will create the appropriate parameters, and pass them to the Alarm Point message queueing agent. This could be done globally, but we have implemented it on the two queues --of 10-- which need after hours alerts. This effectively eliminates the need for a shared pager.


You must have an account with Alarm Point, have the appropriate groups and teams define there, have the queueing agent running on the same server as RT, and have https connectivity through a firewall.
You must have an account with Alarm Point, have the appropriate groups and teams define there, have the queueing agent running on the same server as RT, and have https connectivity through a firewall.


Condition: User Defined
;Condition: User Defined
;Action: User Defined
;Template: blank
;Applies to: Global


Custom Condition:
User Defined conditions and results


if ($self->TransactionObj->Type eq 'Create')  {
;Custom Condition:
      return (1);
}


Action: User Defined
<syntaxhighlight lang="perl" line="1" >
 
if ($self-&gt;TransactionObj-&gt;Type eq 'Create')  {
Custom action preparation code:
    return (1);
 
}
1;
</syntaxhighlight>
 
Custom action cleanup code:


{
;Custom action preparation code:
  my $myId      = $self-&gt;TicketObj-&gt;EffectiveId;
<syntaxhighlight lang="perl" line="1" >
  my $mySubject  = $self-&gt;TicketObj-&gt;Subject;
1;
</syntaxhighlight>
  my $binary = '/home/alarmpoint/alarmpointsystems/integrationagent/bin/APClient.bin';
; Custom action cleanup code:
  system($binary, '--map-data', 'vanderbilt', 'Cluster Group', $mySubject, 'RT', "RT $myId");
  1;


<syntaxhighlight lang="perl" line="1" >
{
    my $myId      = $self-&gt;TicketObj-&gt;EffectiveId;
    my $mySubject  = $self-&gt;TicketObj-&gt;Subject;
    my $binary = '/home/alarmpoint/alarmpointsystems/integrationagent/bin/APClient.bin';
    system($binary, '--map-data', 'vanderbilt', 'Cluster Group', $mySubject, 'RT', "RT $myId");
1;
}
}


Template: Global Template: Blank
</syntaxhighlight>


See also: [[ManualScrips]], [[WriteCustomAction]], [[WriteCustomCondition]]
See also: [[ManualScrips]], [[WriteCustomAction]], [[WriteCustomCondition]]

Latest revision as of 13:50, 2 September 2021

Here's a scrip that you can use to send an alert to Alarm Point if a ticket is new in a particular queue. This scrip will only run if a ticket is created. If this condition is met, then it will create the appropriate parameters, and pass them to the Alarm Point message queueing agent. This could be done globally, but we have implemented it on the two queues --of 10-- which need after hours alerts. This effectively eliminates the need for a shared pager.

You must have an account with Alarm Point, have the appropriate groups and teams define there, have the queueing agent running on the same server as RT, and have https connectivity through a firewall.

Condition
User Defined
Action
User Defined
Template
blank
Applies to
Global

User Defined conditions and results

Custom Condition
if ($self-&gt;TransactionObj-&gt;Type eq 'Create')  {
    return (1);
}
Custom action preparation code
1;
Custom action cleanup code
{
    my $myId       = $self-&gt;TicketObj-&gt;EffectiveId;
    my $mySubject  = $self-&gt;TicketObj-&gt;Subject;
    my $binary = '/home/alarmpoint/alarmpointsystems/integrationagent/bin/APClient.bin';
    system($binary, '--map-data', 'vanderbilt', 'Cluster Group', $mySubject, 'RT', "RT $myId");
1;
}

See also: ManualScrips, WriteCustomAction, WriteCustomCondition