Commit graph

117 commits

Author SHA1 Message Date
Jimmi Dyson 6c8080607f
Kubernetes SD: Add node name and host IP to pod discovery 2016-07-20 12:00:54 +01:00
Fabian Reinartz 4591a2623b discovery/kubernetes: filter pod/container, service/endpoint
This change distinguishes and filters by pod/container and
service/endpoint in the respective sub-SDs.
2016-07-05 14:24:17 +02:00
Fabian Reinartz 0ff354341b discovery/kubernetes: remove unused channel 2016-07-05 14:22:12 +02:00
Fabian Reinartz 7221228843 discovery/kubernetes: select between discovery role
This adds `role` field to the Kubernetes SD config, which indicates
which type of Kubernetes SD should be run.
This no longer allows discovering pods and nodes with the same SD
configuration for example.
2016-07-05 14:22:12 +02:00
Fabian Reinartz e0f8caacd7 discovery/kubernetes: extract service endpoint discovery
This extract discovery of services and their endpoints into its own
type.
2016-07-05 10:26:23 +02:00
Fabian Reinartz fdbe28df85 discovery/kubernetes: extract node discovery
This change extracts node discovery into its own type.
2016-07-01 19:31:04 +02:00
Fabian Reinartz 8a97c211a8 discovery/kubernetes: extract pod discovery
This change extracts pod discovery into its own type.
2016-07-01 19:30:00 +02:00
Fabian Reinartz e03e138d34 discovery: consolidate constructors into single file 2016-07-01 19:30:00 +02:00
Fabian Reinartz 57333d1831 discovery/kubernetes: add missing locking 2016-07-01 17:07:13 +02:00
Fabian Reinartz 44036a08d0 Merge pull request #1725 from nicholascapo/use-consul-service-address
discovery: use consul service address if available
2016-06-30 09:30:14 +02:00
Nicholas Capo 84334a8410 discovery: use consul service address if available 2016-06-15 19:27:05 -05:00
Fabian Reinartz 4aeab798e8 Merge pull request #1738 from prometheus/release-0.19
Forward-merge 0.19 fixes into master
2016-06-14 18:11:47 +02:00
beorn7 03adbe57e4 discovery/marathon: Fix race conditions in test
The concurrency applied before is in most cases not even needed. With
a cap=1 channel, most tests are much cleaner.

TestMarathonSDRunAndStop was trickier. It could even have blocked
before.

This also includes a general refactoring of the whole file.
2016-06-14 13:12:53 +02:00
Björn Rabenstein 2ea3a837c3 Merge pull request #1731 from prometheus/release-0.19
Forward-merge 0.19 fixes to master
2016-06-14 09:21:52 +02:00
rohit01 47dd5f74ba discovery/marathon: #1722 - ignore apps with zero ports 2016-06-14 04:44:00 +05:30
Jimmi Dyson 206bcfcdaa
Kubernetes SD: Remove kubeletPort config option 2016-06-07 12:34:55 +01:00
Jimmi Dyson d48297c904
Kubernetes SD: Add labels for all node addresses and discover node port if available 2016-06-07 12:34:49 +01:00
Fabian Reinartz 26b1c89469 Merge pull request #1702 from pdbogen/master
Initial local pods before using the pod list to initialize pod targets
2016-06-06 15:14:49 +02:00
Patrick Bogen 1e6770cdc5 Initial local pods before using the pod list to initialize pod targets; include more logging in pod target creation 2016-06-02 17:49:21 -07:00
Ali Reza c81b4e8a87 change config names to files for consistency 2016-05-30 07:47:58 +07:00
Tobias Schmidt 0c6ed9d437 Fix type usage in Kubernetes discovery
The event types have been recently changed to be exported types which
wasn't reflected in the new pod discovery.
2016-05-20 11:03:19 -04:00
Fabian Reinartz dec56838fc Merge pull request #1449 from pdbogen/master
k8s pod discovery
2016-05-20 05:45:09 -07:00
Patrick Bogen 89940eb48d Write tests to include testing determinancy of various slice orders; ensure that container order is deterministic 2016-05-19 10:57:23 -07:00
Patrick Bogen b3350d872a Add one label named for each port name, mapping it to port number; add corresponding tests; prefix port list label with a comma 2016-05-19 10:37:11 -07:00
beorn7 d43c0159aa Fix style issues in retrieval/... 2016-05-19 17:14:04 +02:00
Patrick Bogen ae413704e8 kubernetes pod-level discovery 2016-05-18 17:18:52 -07:00
Fabian Reinartz 2ca9ee7b0d Merge pull request #1612 from prometheus/stn-dns-mv
[discovery][dns] move dns to own package
2016-05-06 12:23:59 +02:00
stuart nelson d959d2b90a discovery/dns: Maintain argument order consistency 2016-05-06 11:14:26 +02:00
stuart nelson d02591814b discovery/dns: move dns to own package 2016-05-06 11:14:26 +02:00
Shawn Smith d7481f266e fix typo 2016-05-04 13:42:27 +09:00
Fabian Reinartz f94fc76608 Merge pull request #1592 from prometheus/fabxc-consul-ref
discovery: sanitize Consul service discovery
2016-04-30 21:18:33 +02:00
Fabian Reinartz 76076bfb47 discovery: simplify client initialization 2016-04-30 21:07:49 +02:00
Fabian Reinartz b5bfb502df discovery: properly check context on chan send 2016-04-30 11:57:20 +02:00
Fabian Reinartz 9f8feb9ff6 discovery: consolidate Marathon SD files 2016-04-30 11:56:11 +02:00
Fabian Reinartz 086f7caceb discovery: extract Consul shouldWatch logic 2016-04-30 11:50:19 +02:00
Fabian Reinartz e805e68c01 discovery: sanitize Consul service discovery
This commits simplifies the SD's structure and ensures that all
channel sends are checked against a canceled context.
2016-04-30 11:50:19 +02:00
Fabian Reinartz 5837e6a97f discovery: move consul SD into own package 2016-04-25 16:56:27 +02:00
Fabian Reinartz 585ab6b163 Merge pull request #1494 from iamseth/master
Add discovery capability for Microsoft Azure
2016-04-21 13:49:44 +02:00
Jonathan Boulle 38098f8c95 Add missing license headers
Prometheus is Apache 2 licensed, and most source files have the
appropriate copyright license header, but some were missing it without
apparent reason. Correct that by adding it.
2016-04-13 16:08:22 +02:00
Seth Miller 0988e3b937 Add support for Azure discovery
This change adds the ability to do target discovery with Microsoft's Azure platform.
2016-04-06 22:47:02 -05:00
Tobias Schmidt e82ef154ee Remove unused code leftovers 2016-04-02 20:20:55 -04:00
beorn7 d44b83690e Fix flaky file-sd test 2016-03-07 15:39:18 +01:00
Fabian Reinartz d15adfc917 Preserve target state across reloads.
This commit moves Scraper handling into a separate scrapePool type.
TargetSets only manage TargetProvider lifecycles and sync the
retrieved updates to the scrapePool.

TargetProviders are now expected to send a full initial target set
within 5 seconds. The scrapePools preserve target state across reloads
and only drop targets after the initial set was synced.
2016-03-01 13:48:36 +01:00
Fabian Reinartz 5b30bdb610 Change TargetProvider interface.
This commit changes the TargetProvider interface to use a
context.Context and send lists of TargetGroups, rather than
single ones.
2016-03-01 13:48:36 +01:00
Jimmi Dyson e59b7c15a3 Kubernetes SD: Fix node IP discovery 2016-03-01 12:24:52 +00:00
Julius Volz 9b6d69610a Fix various typos in comments.
Helpfully reported by
https://goreportcard.com/report/github.com/prometheus/prometheus :)
2016-02-10 03:47:00 +01:00
beorn7 a7408bfb47 Unify duration parsing
It's actually happening in several places (and for flags, we use the
standard Go time.Duration...). This at least reduces all our
home-grown parsing to one place (in model).
2016-01-29 15:41:50 +01:00
Jimmi Dyson 9faa7515c6 Kubernetes SD: Refactor to handle missing Kubernetes events 2016-01-19 20:49:58 +00:00
Julien Dehee 061fe2f364 Support AirBnB's Smartstack Nerve client for SD
nerve's registration format differs from serverset. With this commit
there is now a dedicated treecache file in util,
and two separate files for serverset and nerve.

Reference:
https://github.com/airbnb/nerve
2016-01-18 14:07:28 +01:00
Brian Brazil 6b7629be27 Merge pull request #1242 from tommyulfsparre/watcher-fix
Reduces watches in serverset
2015-12-10 10:43:57 +00:00