Skip to content

Example of using prometheus discovery and scraping library

License

Notifications You must be signed in to change notification settings

jwilder/scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is some sample code that demonstrates using Prometheus Kubernetes discovery and scraping packages in a standalone binary.

There are other pieces not implemented, but this is useful for getting started.

The example is setup to run as a pod in Kubernetes and will discover all nodes, endpoints, services, pods, etc.. and try to scrape them using some hard-coded target options (/metrics).

Demo

You need a Kubernetes cluster available and setup so that kubectl works.

$ make run

You should see it discover various targets, scrape them and output the scraped values to the console.

Building


$ make
$ make run

License

MIT

About

Example of using prometheus discovery and scraping library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published