site24x7 exporter #2

Supports: kubernetes

Deploy this charm on Kubernetes with the CLI. Find out how by reading the docs.


Given OAUTH credentials, this charm runs a daemon to take data from site24x7 and expose it to prometheus on port 9803.

Site24x7 Exporter


The Site24x7 service monitors your own services from multiple outside networks in multiple regions, and delivers notifications of outages. This charm runs a prometheus "exporter" which polls the Site24x7 database and exposes metrics in a format that prometheus can ingest.

This allows you to graph these events in grafana, and to refine your own prometheus alert queries to determine when to notify your SREs of an outage.


Generate Credentials

Your zoho account must have two-factor authentication turned on in order to create these credentials.

The process to generate site24x7 creds is a little indirect. You will create a temporary cred on the site that your account is bound to. It doesn't matter where you connect from, but your account will be hosted by either,,, or perhaps some other site that did not exist at time of writing. Be sure you consistently use that hostname in all future steps.

  1. Set up a Self Client in the web interface (not any of the "Application" ones). This will provide you with the client_id and client_secret configuration settings.
  2. Go to your client's Generate Code tab and create a temporary code with the Scope of Site24x7.Reports.Read and an expiration of 10 minutes. You can put whatever you like in the comment field.
  3. Use this temporary code and the id and secret from the other tab to fill out a file called curl-secrets:

Then run curl -X POST -d @curl-secrets (adjusting for your particular zoho TLD). You will get a field back called refresh_token which you'll combine with your client id and secret in the final step:

Build Image

By default, this charm will use the image at, but if you want to build your own you can run make docker (or sudo make docker if you are still affected by this snap bug). Once that's done, you can push the image to your k8s image repo, and set the image_path config option to point to it.

Deploy Charm.

Once you have credentials, you can deploy the charm:

juju deploy cs:~prometheus-site24x7-exporter-charmers/site24x7-exporter --config client_id='1000.DEADBEEFDEADBEEFDEADBEEFDEADBE' --config client_secret='deadbeefdeadbeefdeadbeefdeadbeefdeadbeefde' --config refresh_token='1000.c0defacec0defacec0defacec0deface.c0defacec0defacec0defacec0deface'

Or, if you'd like to use a local build of the charm and image:

juju deploy ./site24x7-exporter.charm --config image_path='localhost:32000/site24x7:latest' --config client_id='1000.DEADBEEFDEADBEEFDEADBEEFDEADBE' --config client_secret='deadbeefdeadbeefdeadbeefdeadbeefdeadbeefde' --config refresh_token='1000.c0defacec0defacec0defacec0deface.c0defacec0defacec0defacec0deface'


Run curl based on your most recent unit's IP.


Just run make test.


(string) The OAUTH 2.0 user ID for your ZohoCorp Site24x7 access. This setting is required.
(string) The OAUTH 2.0 secret for your ZohoCorp Site24x7 access. This setting is required.
(string) The URL to an outbound HTTPS proxy.
(string) The password associated with image_username for accessing the registry specified in image_path.
(string) The location of the image to use, e.g. "". This setting is required.
(string) The username for accessing the registry specified in image_path.
(string) The OAUTH 2.0 refresh token for your ZohoCorp Site24x7 access. This setting is required.