Skip to Content
Hands-On Software Engineering with Golang
book

Hands-On Software Engineering with Golang

by Achilleas Anagnostopoulos
January 2020
Intermediate to advanced
640 pages
16h 56m
English
Packt Publishing
Content preview from Hands-On Software Engineering with Golang

Querying the underlying cloud provider

Out of the box, Prometheus can be configured to leverage the native APIs offered by cloud providers such as AWS, GCE, Azure, and OpenStack to detect provisioned compute node instances and make them available as targets for scraping.

Each node discovered by Prometheus is automatically annotated with a series of provider-specific meta labels. These labels can then be referenced by operator-defined match rules to filter out any nodes that the operator is not interested in scraping.

As an example, let's say that we only want to scrape the EC2 instances that contain a tag with the name scrape and the value true. We can use a configuration block such as the following one to achieve this:

ec2_sd_configs:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Software Architecture with Golang

Hands-On Software Architecture with Golang

Jyotiswarup Raiturkar

Publisher Resources

ISBN: 9781838554491Supplemental Content