jgilmour / pagerdutyphp Goto Github PK
View Code? Open in Web Editor NEWThis project forked from lozzd/pagerdutyphp
A collection of PHP scripts to utilise Pagerduty.com's API
This project forked from lozzd/pagerdutyphp
A collection of PHP scripts to utilise Pagerduty.com's API
Pagerduty PHP - A PHP library of handy functions utilising the Pagerduty API. * What's included? pagerduty.php - The file which has all the functions that can be used. I say all, so far I only have two, and both relate to getting the current person on call. pagerdutycron.php - A script designed to run from cron that will either ping irccat or send an email (or both) when the person on call in your rotations changes. timeago.php - A support function provided by alex at nyoc dot net. * How do I use it? You need to enter some basic configuration information into pagerduty.php before you can use it, relating to your login and your schedules. After you've done this, you are free to include pagerduty.php and use the functions in the file. Keep reading for info on other files. * Using with irccat If you already use the IRC bot irccat (https://github.com/RJ/irccat) you can ask irccat who is on call for a given rotation by including it in your command handler like so: case 'opsoncall': include_once("pagerduty.php"); printPersonOnCallAt("ops", $allargs); break; This will allow anyone to query the Pagerduty schedule to find out who is on call now (no args) or at a specfied time (passed through string-to-time, so vaguely intelligent). For example: <laurie> ?opsoncall <irccat> Bob Robertson is on call from 2 days ago until 4 days from now <laurie> ?opsoncall next week <irccat> Dave Davidson is on call from 4 days from now until 11 days from now * pagerdutycron.php Setup is fairly simple; there are a few configuration options at the top of the file relating to whether you want to send an email, or send a message to irccat, or both, and where to send those messages. After you've done that, run it by hand once to ensure everything works as planned, and then set it up in cron to run as often as you please (for example, 1 minute). When it detects a change in rotation, it will perform your selected action to alert the relevant parties. For example, in IRC: <irccat> On call person for ops is now Dave Davidson until 7 days from now
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.