pagerduty / pagerduty-nagios-pl Goto Github PK
View Code? Open in Web Editor NEWNagios Integration for PagerDuty via Perl Wrapper
Nagios Integration for PagerDuty via Perl Wrapper
Hi,
the lockfile is created in lock_and_flush_queue
, but never gets cleaned up afterwards.
This way only the first user that uses the script can run it succesfully, all other users get a "Permission Denied" error.
Take into account that Nagios wrappers like OMD and Check_MK will use different environment variable prefixes. Unfortunately, I don't have this information handy.
I am not sure if this is the best place for this, but I have installed pagerduty-nagios.pl on a brand new Nagios 4 server. When its run I get a permission denied error. Here is the info on the OS and versions of perl.
Software Versions:
/etc/redhat-release CentOS release 6.4 (Final)
uname -a 2.6.32-358.11.1.el6.x86_64
perl.x86_64 4:5.10.1-131.el6_4
perl-Crypt-SSLeay.x86_64 0.57-16.el6
perl-libwww-perl.noarch 5.833-2.el6
[1380667243] SERVICE NOTIFICATION: pagerduty;colorado;Total Processes;CRITICAL;notify-service-by-pagerduty;PROCS CRITICAL: 108 processes
[1380667243] wproc: NOTIFY job 38 from worker Core Worker 20364 is a non-check helper but exited with return code 13
[1380667243] wproc: command: /usr/local/nagios/bin/pagerduty_nagios.pl enqueue -f pd_nagios_object=service
[1380667243] wproc: host=colorado; service=Total Processes; contact=pagerduty
[1380667243] wproc: early_timeout=0; exited_ok=1; wait_status=3328; error_code=0;
[1380667243] wproc: stderr line 01: Permission denied at /usr/local/nagios/bin/pagerduty_nagios.pl line 239.
Hi,
it'd be nice to have a callback mechanism every time an event is pulled off the queue, say a process that gets forked (with a timeout) and the result from the API passed somehow (say stdin).
This way it would be possible to chain the pagerduty queue with other systems, case in point I'd like to integrate PD with JIRA and have the two linked, however when I enqueue to pagerduty-nagios I don't know the incident ID and thus can't link that to the JIRA issue I am going to create.
I could use both HTTP APIs directly but that would mean giving up on pagerduty-nagios which has proven quite reliable.
thanks!
If the host running nagios ends up with the pagerduty_queue directory in a read-only state, the "enqueue" action just dies upon failure to open and write the alert details into the queue.
I would suggest that it should have a fallback routine of trying to directly send an alert to the pagerduty API that the queue is not writable before dying on line 247.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.