Using the custom service discovery

To see for ourselves how a custom service discovery behaves, we'll rely on our test environment. The custom-sd binary, which recreates the Consul discovery integration as an example of a custom service discovery, is deployed alongside Prometheus and is ready to be used. Together with the Consul deployment, we have all the required components in the test environment to see how everything fits together.

custom-sd can be built on a machine with a Go development environment set up by issuing the following command: go get github.com/prometheus/prometheus/documentation/examples/custom-sd/adapter-usage.

First, we need to ensure that we are connected to the prometheus instance. We can use the following command: ...

Get Hands-On Infrastructure Monitoring with Prometheus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.