@@ -29,6 +29,30 @@ dashboards for most purposes other than debugging.
# How-to
## Adding metrics for users
If you want your service to be monitored by Prometheus, you need to
[write](https://prometheus.io/docs/instrumenting/writing_exporters/) or [reuse an existing exporter](https://prometheus.io/docs/instrumenting/exporters/). [Writing an
exporter](https://prometheus.io/docs/instrumenting/writing_exporters/) is more involved, but still fairly easy and might be
necessary if you are the maintainer of an application not already
instrumented for Prometheus.
Once you have an exporter endpoint (say at
`http://example.com:9090/metrics`), make sure it works:
curl http://example.com:9090/metrics
This should return a number of metrics that change (or not) at each
call. From there on, provide that endpoint to the sysadmins, which
will follow the next procedure to add the metric to Prometheus.
## Adding metrics for admins
TODO: talk about `scrape_jobs` for in-puppet configurations.
TODO: show how to hook a custom scrape job, and on where server to put