Given OAUTH credentials, this charm runs a daemon to take data from site24x7 and expose it to prometheus on port 9803.
- monitoring ›
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.
You will need to build the image by running
make docker (or
sudo make docker if you are still affected by this snap bug). Once that's done and you've pushed the image to your k8s image repo, you'll need to make the credentials your exporter will use.
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 https://api-console.zoho.com, https://api-console.zoho.eu, https://api-console.zoho.in, or perhaps some other site that did not exist at time of writing. Be sure you consistently use that hostname in all future steps.
- Set up a
Self Clientin the web interface (not any of the "Application" ones). This will provide you with the
- Go to your client's
Generate Codetab and create a temporary code with the
Site24x7.Reports.Readand an expiration of
10 minutes. You can put whatever you like in the comment field.
- Use this temporary code and the id and secret from the other tab to fill out a file called
grant_type=authorization_code& client_id=1000.DEADBEEFDEADBEEFDEADBEEFDEADBE& client_secret=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefde& code=1000.deadbeefdeadbeefdeadbeefdeadbeef.deadbeefdeadbeefdeadbeefdeadbeef
curl https://accounts.zoho.com/oauth/v2/token -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:
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'
curl http://10.1.14.19:9803/metrics based on your most recent unit's IP.
- (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. "registry.example.com/my_gunicorn_app:v1". 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.