AppHarbor

Hosted Graphite provides a AppHarbor add-on! It’s easy to add Hosted Graphite as an add-on for Appharbor. Open your app, select Add-ons, in the catalog of add-ons click Hosted Graphite and click Install. You’ll be given an API key and can start sending metrics.

Provisioning the Hosted Graphite Add-on for AppHarbor

Provisioning the Hosted Graphite Add-on for AppHarbor

You can now begin to send metric messages (see: The Metric Data Format) to Hosted Graphite from your AppHarborapplication. For more information, check out the add-on documentation on AppHarbor.

Accessing the API Key within your app

Now that the add-on has been setup, the Hosted Graphite API Key will be available via the environment variable HOSTEDGRAPHITE_APIKEY. See the appropriate language snippet below for an example on how to access this variable in your app.

Ruby

apikey = ENV['HOSTEDGRAPHITE_APIKEY']

See also: Sending Metrics with Ruby

Python

apikey = os.environ['HOSTEDGRAPHITE_APIKEY']

See also: Sending Metrics with Python

Java

String apikey = System.getenv("HOSTEDGRAPHITE_APIKEY");

See also: Sending Metrics with Java

PHP

$apikey = getenv('HOSTEDGRAPHITE_APIKEY');

See also: Sending Metrics with PHP

Node.js

var apikey = process.env.HOSTEDGRAPHITE_APIKEY;

See also: Sending Metrics with Node.js

Troubleshooting

  • If I have trouble with my metrics, should I remove and re-add the Hosted Graphite plugin?
    No! Removing the Hosted Graphite plugin permanently deletes your metrics from Hosted Graphite. If you’re having trouble and can’t find help in these docs or our FAQ, then just get in touch. We’re happy to help.