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.
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:
By default, this charm will use the image at https://hub.docker.com/r/site24x7exportercharmers/site24x7exporter, 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.
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'
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.