To install the add-on, issue the following command:
$ cctrlapp APP_NAME/DEP_NAME addon.add hostedgraphite.OPTION
Replace hostedgraphite.OPTION with a valid option, e.g. hostedgraphite.free.
When added, Hosted Graphite automatically creates a new user account with your email adress. You can manage the add-on within the web console by going to the specific deployment and clicking the link hostedgraphite.OPTION.
To upgrade from a smaller to a more powerful plan use:
$ cctrlapp APP_NAME/DEP_NAME addon.upgrade hostedgraphite.OPTION_OLD hostedgraphite.OPTION_NEW
To downgrade to a smaller plan use:
$ cctrlapp APP_NAME/DEP_NAME addon.downgrade hostedgraphite.OPTION_OLD hostedgraphite.OPTION_NEW
To remove the add-on, use:
$ cctrlapp APP_NAME/DEP_NAME addon.remove hostedgraphite.OPTION
For more information, check out the add-on documentation on cloudControl.
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.
apikey = ENV['HOSTEDGRAPHITE_APIKEY']
See also: Sending Metrics with Ruby
apikey = os.environ['HOSTEDGRAPHITE_APIKEY']
See also: Sending Metrics with Python
String apikey = System.getenv("HOSTEDGRAPHITE_APIKEY");
See also: Sending Metrics with Java
$apikey = getenv('HOSTEDGRAPHITE_APIKEY');
See also: Sending Metrics with PHP
var apikey = process.env.HOSTEDGRAPHITE_APIKEY;
See also: Sending Metrics with Node.js
- If I have trouble with my metrics, should I remove and re-add the Hosted Graphite plugin?