Jimmi Dyson
0d61605526
Kubernetes SD example: separate out cluster level components & services
2015-09-29 11:22:18 +01:00
Fabian Reinartz
1ce89a4a0b
Fix nil panic on consul error
2015-09-22 09:04:31 +02:00
Julius Volz
af513468eb
Fix some dead code, missing error checks, shadowings.
...
I applied
https://medium.com/@jgautheron/quality-pipeline-for-go-projects-497e34d6567
and was greeted with a deluge of warnings, most of which were not
applicable or really fixable realistically. These are some of the first
ones I decided to fix.
2015-09-14 12:21:34 +02:00
Jimmi Dyson
7ef9399920
Clean up kubernetes http response bodies
2015-09-11 11:44:28 +01:00
Jimmi Dyson
a1574aa2b3
Move TLS options to scrape config
...
Fixes #1013 , fixes #989
2015-09-09 09:52:21 +01:00
Jimmi Dyson
d7a7fd4589
Kubernetes SD improvements
...
* Support multiple masters with retries against each master as required.
* Scrape masters' metrics.
* Add role meta label for node/service/master to make it easier for relabeling.
2015-09-04 11:31:20 +01:00
Fabian Reinartz
542da6774e
Fix draining of file watcher events
2015-08-28 12:17:22 +02:00
Daniel Lundin
4abf54b747
serverset: extract shard number from serverset data
2015-08-27 16:26:00 +02:00
Julius Volz
29eaa8c7cf
Merge pull request #1030 from prometheus/fix-flakey-filesd
...
Fix flakey FileSD test.
2015-08-26 13:25:00 +02:00
Julius Volz
3fd5826589
Fix flakey FileSD test.
...
When the test ends, all files matching the watcher's glob are removed
via defer. In that moment, the draining goroutine may still be running
and then detect no files matching the configured glob just before the
test exits.
This is now solved by waiting for the draining goroutine to finish
before leaving the test function and thus causing the deferred file
removal.
2015-08-26 13:06:34 +02:00
Julius Volz
744d5d5a7a
Merge pull request #1029 from prometheus/vet-fixes
...
Fix "go vet" errors.
2015-08-26 12:50:18 +02:00
Julius Volz
995d3b831d
Fix most golint warnings.
...
This is with `golint -min_confidence=0.5`.
I left several lint warnings untouched because they were either
incorrect or I felt it was better not to change them at the moment.
2015-08-26 12:44:46 +02:00
Julius Volz
963ad82dcb
Fix "go vet" errors.
...
I ignored all errors of the type "composite literal uses unkeyed
fields". Most of them are wrong because of
https://github.com/golang/go/issues/9171 .
2015-08-26 02:05:04 +02:00
Fabian Reinartz
438e232c9b
Fix grouping of import blocks
2015-08-22 09:42:45 +02:00
Fabian Reinartz
306e8468a0
Switch from client_golang/model to common/model
2015-08-21 13:33:38 +02:00
Sharif Nassar
6cb519fe82
Add Consul ServiceID to the discovery meta labels.
2015-08-20 14:04:42 -07:00
Fabian Reinartz
0f5022c091
Add missing Kubernetes doc strings
2015-08-18 14:37:28 +02:00
Julius Volz
b4adf2723d
Merge pull request #994 from robbiet480/consul-datacenter-name
...
Pass through current agent Consul datacenter name
2015-08-18 01:09:24 +02:00
Robbie Trencheny
48e461f7db
Pass through current agent Consul datacenter name
...
Instead of only filling __meta_consul_dc when datacenter is set in
consul_sd_config this change fills the label based on what the agent
reports it's current data center is, if datacenter isn't manually set,
otherwise it uses whatever datacenter was set to.
2015-08-17 16:00:26 -07:00
Fabian Reinartz
d0a90964c1
Fix license header
2015-08-17 19:51:12 +02:00
Fabian Reinartz
eabbdc6603
Add missing license headers
2015-08-17 19:49:10 +02:00
Julius Volz
47a96bff1a
Update constant names in comments.
2015-08-17 15:05:06 +02:00
Fabian Reinartz
3c6dd161d7
Scrape all services on empty services list.
2015-08-14 17:39:41 +02:00
Fabian Reinartz
9b9ff66212
Merge pull request #977 from prometheus/fabxc/target-dedup
...
Improve target discovery pipeline
2015-08-14 16:38:16 +02:00
Fabian Reinartz
8fa9ec278b
Add application labels as meta labels
...
Removes built-in conditional scraping based on application's
'prometheus' label.
2015-08-14 15:34:02 +02:00
Fabian Reinartz
f269943950
Adjust Kubernetes SD to pipeline changes
2015-08-14 13:30:27 +02:00
Fabian Reinartz
4e84b86510
Improve target discovery pipeline
...
Replace the TargetProvider Stop method with done channels
that ensure properly broadcasted shutdown of the whole pipeline.
2015-08-14 13:30:27 +02:00
Fabian Reinartz
f7e3722388
Rename __meta_dns_srv_name to __meta_dns_name
...
This is change potentially breaking relabeling rules.
2015-08-13 17:02:56 +02:00
Jimmi Dyson
923f8111d4
Initial Kubernetes discovery
...
Fixes #904
2015-08-13 10:38:52 +01:00
Fabian Reinartz
0138d37458
Improve unique target group sources.
...
Include position of same SD mechanisms within the same scrape configuration.
Move unique prefixing out of SD implementations and target manager into
its own interface.
2015-08-10 11:29:09 +02:00
Fabian Reinartz
54202bc5a8
Merge pull request #902 from xperimental/feature/marathon-discovery
...
retrieval/discovery: Service discovery using marathon API
2015-08-10 01:43:37 +02:00
Robert Jacob
4d0f974c42
Add service discovery using Marathon API.
2015-08-10 01:36:24 +02:00
Florian Pfitzer
1fa0b0f253
fix consul port label
2015-07-31 16:20:17 +00:00
Johannes 'fish' Ziemke
6e7d743cd4
Merge pull request #946 from prometheus/add-sd-dns-a
...
Add support for A record based DNS SD
2015-07-30 16:01:47 +02:00
Johannes 'fish' Ziemke
9ab340e95e
Add support for A record based DNS SD
...
If using A records, the user needs to specify "port" and set "type" to
"A".
2015-07-30 15:55:38 +02:00
beorn7
645f6772e5
Add Consul Address, ServicePort, and ServiceAddress to the meta labels.
...
In setups where the ServiceAddress is the relevant address for
scraping, users can relabel the `__address__` label to ServiceAddress
+ ":" + ServicePort.
This needs to be documented, of course. Will do once this is LGTM'd.
2015-07-22 18:19:13 +02:00
Julius Volz
9d98910fca
Revert "Use Consul ServiceAddress instead of Address when set"
...
This reverts commit 0ac7e7217e
.
See discussion on https://github.com/prometheus/prometheus/pull/812 for
reasoning. While fixing one use case, it breaks others, and we need a
more generic way of handling this.
2015-07-22 13:04:29 +02:00
Brian Brazil
3d268d681e
retrieval: Handle serverset node not existing.
...
This stops configuration loading hanging if
the Znode doesn't exist, and retries until the
node does exist.
2015-07-01 13:56:31 +01:00
Fabian Reinartz
23862c92c4
retrieval/discovery: refresh services in Consul to recover from missing events.
2015-06-24 17:48:27 +02:00
Fabian Reinartz
459d18cf18
Merge pull request #812 from Marmelatze/consul_services
...
Use Consul ServiceAddress instead of Address when set
2015-06-17 20:10:52 +02:00
Florian Pfitzer
0ac7e7217e
Use Consul ServiceAddress instead of Address when set
2015-06-17 15:39:42 +02:00
Brian Brazil
4d895242f9
Add support for Zookeeper Serversets for SD.
...
It can discover an entire tree of serversets, or just one.
2015-06-16 11:02:08 +01:00
Fabian Reinartz
8214b4ee78
retrieval/discovery: surround __meta_consul_tags value with tag seperators.
2015-06-05 19:18:34 +02:00
Fabian Reinartz
e9b344abee
Fix discarding of labels in file target groups
2015-05-27 18:52:44 +02:00
Fabian Reinartz
efb39cfd4e
Fix file SD test
2015-05-23 21:20:39 +02:00
Julius Volz
267fd34156
Switch Prometheus to use github.com/prometheus/log.
...
This change is conceptually very simple, although the diff is large. It
switches logging from "github.com/golang/glog" to
"github.com/prometheus/log", while not actually changing any log
messages. V(1)-style logging has been changed to be log.Debug*().
2015-05-20 18:19:32 +02:00
Fabian Reinartz
7143dff02f
Add initial implementation for SD via Consul.
...
This commit adds service discovery using Consul's HTTP API and watches
(long polling) to retrieve target updates.
2015-05-20 11:46:24 +02:00
Fabian Reinartz
ff832d2e03
Attach __meta_filepath label to file SD targets.
2015-05-19 15:49:38 +02:00
Fabian Reinartz
9ca47869ed
Provide full SD configs to discovery constructors.
...
Some SD configs may have many options. To be readable and consistent, make
all discovery constructors receive the full config rather than the separate
arguments.
2015-05-15 14:54:29 +02:00
Fabian Reinartz
93548a8882
Add initial file based service discovery.
...
This commits adds file based service discovery which reads target
groups from specified files. It detects changes based on file watches
and regular refreshes.
2015-05-15 14:44:54 +02:00