[rt-users] RT - DataDog Integration

Matt Wells matt.wells at mosaic451.com
Thu Jan 28 13:26:12 EST 2016


Hi all, so I have some things work on this.  I'm wondering if anyone can
help me with the last part.  I really can't thank you guys enough for any
help you can give.

So I have a custom scrip that's working if I run it maually but getting it
through RT is causing issues.  So this is what I've got.
Condition: On Create
Action: User defined
Template: Blank

Custom condition:
return 0;

Custom action preparation code:
my $ticket = $self->TicketObj;
my $subject = $Tickets->Subject;
my $name = $requestor;
my $queue = $queue
system('/usr/bin/perl /opt/rt4/lib/RT/Action/DataDogEvent.pm $name $ticket
"$subject" $ queue');
return 1;

Custom action commit code:
return 0;

The Script that's getting called.
/opt/rt4/lib/RT/Action/DataDogEvent.pm
#!/usr/bin/perl

use strict;
use warnings;

use WebService::DataDog;
use Try::Tiny;
use Data::Dumper;

my $datadog = WebService::DataDog->new(
        api_key         => '123apikey',
        application_key => '123appkey',
        verbose         => 0, # Enable this for debugging output
# verbose         => 1,
);

my $event = $datadog->build('Event');
my $event_list;

my $name   = $ARGV[0];
my $ticket = $ARGV[1];
my $subject = $ARGV[2];
my $queue = $ARGV[3];

# Post a new event to stream
$event->create(
title => "$name - $ticket",
text  => "$subject",
tags => ['NOCRT', "$queue"],

);


On Mon, Jan 25, 2016 at 1:32 PM, Matt Wells <matt.wells at mosaic451.com>
wrote:

> Has anyone ever attempted to integrate RT with DataDog and it's web api or
> configurations?
> I've seen some integrations with "SendNagiosAlert" but was wondering if
> anyone had done something similar with DataDog?  I'm starting to play with
> it now using this -
>
> http://search.cpan.org/~jpinkham/WebService-DataDog-0.9.0/lib/WebService/DataDog.pm
>
>


-- 
Matt Wells
Chief Systems Architect
RHCA, RHCVA - #110-000-353
(702) 808-0424
matt.wells at mosaic451.com
 Las Vegas | Phoenix | Portland Mosaic451.com
CONFIDENTIALITY NOTICE: This transmittal is a confidential communication or
may otherwise be privileged. If you are not intended recipient, you are
hereby notified that you have received this transmittal in error and that
any review, dissemination, distribution or copying of this transmittal is
strictly prohibited. If you have received this communication in error,
please notify this office, and immediately delete this message and all its
attachments, if any.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160128/b4fb7eac/attachment.html>


More information about the rt-users mailing list