Summary
In this chapter, we looked at service discovery in Prometheus. It’s a key feature that differentiates Prometheus and makes it well-suited to the cloud-native world. First, we looked at how service discovery works by evaluating its usage in the Prometheus environment we set up in Chapter 2. Next, we saw how cloud providers can implement service discovery providers in the upstream Prometheus code base by looking at how it’s done for Linode. Finally, we got our hands dirty by looking at generic HTTP-based service discovery and building an endpoint for it.
In the next chapter, we’ll look at how alerting works in Prometheus and dip back into the world of PromQL to see how we can make our alerts better through advanced queries.