Julius Volz
f63a899744
Change config regexes to full-string matches.
...
This anchors all regular expressions entered via the config to match a
full string vs. a substring.
THIS IS A BREAKING CHANGE!
Fixes part of https://github.com/prometheus/prometheus/issues/996
2015-09-01 15:46:41 +02: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
6664b77f36
Merge pull request #1021 from prometheus/appenders
...
move metric modifications into SampleAppenders
2015-08-25 17:47:55 +02:00
Fabian Reinartz
01834fa528
Move metric modifications into SampleAppenders
2015-08-25 15:32:37 +02:00
Fabian Reinartz
d6d88f8950
Add missing license headers
2015-08-24 19:19:21 +02:00
Julius Volz
d36a7f4e6f
Fix busylooping in case of no target providers.
...
merge() closes the channel that handleUpdates() reads from when there
are zero configured target providers in the configuration. In that case,
the for-select loop in handleUpdates() entered a busy loop. It should
exit when the upstream channel is closed.
2015-08-24 16:42:28 +02:00
Fabian Reinartz
3a0145c09e
Reenable blocked appending tests
2015-08-22 09:47:57 +02:00
Fabian Reinartz
438e232c9b
Fix grouping of import blocks
2015-08-22 09:42:45 +02:00
Fabian Reinartz
6d0f58dcf3
sanitize scrape health recording code
2015-08-21 23:01:08 +02:00
Fabian Reinartz
25bf5fdaf5
Timeout sample appends
2015-08-21 18:04:35 +02:00
Fabian Reinartz
11a577fcd0
Switch to common/expfmt for extraction
2015-08-21 13:33:38 +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
Fabian Reinartz
f592740bac
Only exit static target provider on done
2015-08-18 11:51:53 +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
Brian Brazil
e1d5eb52f2
retrieval: Don't include unmatched source of regex in replacement.
...
ReplaceAllString only replaces the matching part of the regex,
the unmatched bits around it are left in place. This is not the
expected or desired behaviour as the replacement string should
be everything.
This may break users dependant on this behaviour, but
what they're doing is still possible.
2015-08-17 00:31:56 +01: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
15b4115a25
Merge pull request #986 from prometheus/fabxc/tpdoc
...
Clarify docs of TargetProvider
2015-08-14 12:07:15 +02:00
Fabian Reinartz
625374ee36
Clarify docs of TargetProvider
2015-08-14 12:02:22 +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
Fabian Reinartz
b964da4b75
Merge pull request #905 from fabric8io/kubernetes-discovery
...
Kubernetes discovery
2015-08-13 15:08:32 +02:00
Fabian Reinartz
24e91720ad
Merge pull request #980 from prometheus/map-labels
...
Retrieval: Add relabel action to map labels names with a regex.
2015-08-13 14:36:59 +02:00
Brian Brazil
4e70a0a14e
Retrieval: Add relabel action to map label names with a regex.
...
The intended use case is where a user has tags/labels coming
from metadata in Kubernetes or EC2, and wants to make
some subset of them into target labels.
2015-08-13 13:19:11 +01:00
Jimmi Dyson
923f8111d4
Initial Kubernetes discovery
...
Fixes #904
2015-08-13 10:38:52 +01:00
Miek Gieben
caaa3de4ff
Make HashMod use MD5 instead of FNV
...
MD5 will will distribute the inputs more uniformly over the output
space than FNV; leading to more evenly balanced load when using HashMod.
2015-08-13 09:42:07 +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
Will Rouesnel
7810448dbe
Add proxy_url parameter to allow specifying per-job HTTP proxy servers
...
Allow scrape_configs to have an optional proxy_url option which specifies
a proxy to be used for all connections to hosts in that config.
Internally this modifies the various client functions to take a *url.URL pointer
which currently must point to an HTTP proxy (but has been left open-ended to
allow the url format to be extended to support others, such as maybe SOCKS if
needed).
2015-08-08 04:29:27 +10:00
Jimmi Dyson
da4c50a6cf
Make scheme relabelable via discovery
2015-08-06 12:00:33 +01:00
Jimmi Dyson
52cf6b3e6e
Configuration options for bearer tokens, client certs & CA certs
...
Fixes #918 , fixes #917
2015-08-04 17:18:46 +01:00
Florian Pfitzer
1fa0b0f253
fix consul port label
2015-07-31 16:20:17 +00:00
Brian Brazil
adf7f16d1a
Merge pull request #934 from prometheus/query-params
...
Retrieval: Make it possible to relabel query params
2015-07-31 11:01:45 +01:00
Brian Brazil
d8875d17d8
Retrieval: Make it possible to relabel query params
...
This only allows relabelling the first value
for a given parameter, this should be sufficient in practice.
2015-07-31 10:09:28 +01: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