Permalink
Browse files

Adding Hosted Graphite receive_push hook

  • Loading branch information...
1 parent b122069 commit 6d51f142c3ce2ecf0eb4e09f96a9538fa61aed93 @daveconcannon daveconcannon committed Oct 16, 2012
Showing with 25 additions and 0 deletions.
  1. +10 −0 docs/hostedgraphite
  2. +15 −0 services/hostedgraphite.rb
View
10 docs/hostedgraphite
@@ -0,0 +1,10 @@
+Hosted Graphite is a time-series database for application and performance monitoring.
+Integrating it with Github gives you a realtime view of the commits happening on your codebase.
+See http://www.hostedgraphite.com/ for more information.
+
+Install Notes
+-------------
+
+1. API Key - Add your API key from your Hosted Graphite account page, located at https://www.hostedgraphite.com/accounts/profile/
+2. Bingo! Github will send details of each commit to your Hosted Graphite account.
+
View
15 services/hostedgraphite.rb
@@ -0,0 +1,15 @@
+class Service::Hostedgraphite < Service
+ string :api_key
+
+ def receive_push
+ res = http_post "https://www.hostedgraphite.com/integrations/github/",
+ 'payload' => JSON.generate(payload),
+ 'api_key' => data['api_key']
+
+ if res.status != 200
+ raise_config_error
+ end
+
+ end
+end
+

0 comments on commit 6d51f14

Please sign in to comment.