PagerDuty::Agent version 0.02
[](
https://travis-ci.org/querry43/perl-pagerduty-agent)
[](LICENSE)
[](
https://metacpan.org/pod/PagerDuty::Agent)
SYNOPSIS
use PagerDuty::Agent;
my $agent = PagerDuty::Agent->new( routing_key => '3fcc9112463424b599f996f9e780dfc6' );
# trigger an event, then resolve it
my $dedup_key = $agent->trigger_event( 'something is terribly wrong!' );
if ( $dedup_key ) {
print "Event created, dedup_key = $dedup_key\n";
print "Event successfully resolved\n"
if $agent->resolve_event( $dedup_key );
} else {
warn "Failed to submit event: $@\n";
}
# additional context can be passed in
$agent->trigger_event(
summary => 'something is terribly wrong!',
severity => 'critical',
dedup_key => 'abc123',
);
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
Perl 5.10 or later.
COPYRIGHT AND LICENSE
Copyright (C) 2019 by Matt Harrington
The full text of this license can be found in the LICENSE file included with this module.