GithubHelp home page GithubHelp logo

redphone's Introduction

Redphone, the monitoring service ruby library

  • Pagerduty support (integration, incidents)
  • Pingdom support (checks, results, actions)
  • Loggly support (event, search, facets)
  • StatusPage support (incidents, components)

https://github.com/portertech/redphone/raw/master/redphone.jpg

  • All API request are done over SSL
  • Response bodies are returned as Ruby hashes

Getting started

gem install redphone

Examples

Pagerduty

require "redphone/pagerduty"
pagerduty = Redphone::Pagerduty.new(
  :service_key => SERVICE_KEY,
  :subdomain => SUBDOMAIN,
  :user => USER,
  :password => PASSWORD
)

Trigger an incident

pagerduty.trigger_incident(
  :description => "Testing Redphone Rubygem",
  :incident_key => "redphone/test"
)
# OR Redphone::Pagerduty.trigger_incident()

Resolve an incident

pagerduty.resolve_incident(:incident_key => "redphone/test")
# OR Redphone::Pagerduty.resolve_incident()

List/query current and past incidents

pagerduty.incidents(:incident_key => "redphone/test")

You can add the following options for a date range

:since => "2011-08-01",
:until => "2011-10-01"

Or if you only care about unresolved incidents

:status => "triggered,acknowledged"

Pingdom

require "redphone/pingdom"
pingdom = Redphone::Pingdom.new(
  :user => USER,
  :password => PASSWORD
)

Create a check

response = pingdom.create_check(
  :name => "redphone",
  :host => "www.amazon.ca",
  :type => "http"
)
check_id = response['check']['id']

Delete a check

pingdom.delete_check(:id => check_id)

Loggly

require "redphone/loggly"
loggly = Redphone::Loggly.new(
 :subdomain => SUBDOMAIN,
 :user => USER,
 :password => PASSWORD
)

Create an event

loggly.send_event(
  :input_key => INPUT_KEY,
  :input_type => "json",
  :event => {
    :service => "redphone",
    :message => "test"
  }
)
# OR Redphone::Loggly.send_event()

Search for previous event occurrences

loggly.search(:q => "json.service:redphone")

Faceted search results on date

loggly.facets(:q => "json.service:redphone")

Add an option for faceted search results on input name

:facet_type => "input"

Or on IP address

:facet_type => "ip"

You can add the following options for a date range

:from => "2011-08-01T12:00:00Z",
:until => "2011-10-01T12:00:00Z"

StatusPage.io

require "redphone/statuspage"
statuspage = Redphone::Statuspage.new(
  :page_id => PAGE_ID,
  :api_key => API_KEY
)

Create a realtime incident

response = statuspage.create_realtime_incident(
  :name => "testing",
  :status => "identified",
  :wants_twitter_update => "t",
  :message => "testing message"
)

Update an incident

incident_id = response["id"]
statuspage.update_incident(
  :name => "testing",
  :status => "resolved",
  :wants_twitter_update => "t"
  :incident_id => incident_id
)

Delete an incident

statuspage.delete_incident(
  :incident_id => incident_id
)

Update a component status

statuspage.update_component(
  :component_id => COMPONENT_ID,
  :status => "major_outage"
)

Contributors

redphone's People

Contributors

perryh avatar portertech avatar tabermike avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

redphone's Issues

Verification SMS doesn't work on Republic Wireless (VoIP+Sprint MVNO)

The SMS verification step keeps timing out. It's a well known issue that Republic cannot handle MMS messages. SMS messages directly to my number work correctly.

I speculate that the verification message may be MMS, and therefore not reach the RedPhone app on my phone.

I am interested in helping with the troubleshooting. What information can I provide that would be helpful?

trigger_incident with same :incident_key Fires a New Incident

Hello,
I'm trying to integrate puppet-pagerduty report processor into my Puppet deployment.

I'm getting a lot of incidents triggered for the same incident_key, event when the existing incident is already in TRIGGERED state.

Is this the expected behaviour? or should I call the incidents method and compare existing incidents keys with the 'new' incident key?

Thank you,
Yarden

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.