Commit graph

200 commits

Author SHA1 Message Date
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
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
Fabian Reinartz d53cc7935d retrieval: avoid race conditions 2015-07-08 21:27:52 +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 080e067601 Merge pull request #832 from prometheus/fabxc/target-test
retrieval: double timeout in target scrape test.
2015-06-25 17:23:52 +02:00
Brian Brazil 52859b8033 Merge pull request #836 from prometheus/shard
Add 'hashmod' relabel action.
2015-06-24 21:40:10 +01:00
Brian Brazil 682f949ab1 Add 'hashmod' relabel action.
This takes the modulus of a hash of some labels.
Combined with a keep relabel action, this allows
for sharding of targets across multiple prometheus
servers.
2015-06-24 21:14:53 +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 c292979374 retrieval: double timeout in target scrape test. 2015-06-23 21:59:55 +02:00
Julius Volz d868264bb8 Improve UI of /alerts page.
Changes to the UI:
- "Active Since" timestamps are now human-readable.
- Alerting rules are now pretty-printed better.
- Labels are no longer just strings, but alert bubbles (like we do on
  the status page for base labels).
- Alert states and target health states are now capitalized in the
  presentation layer rather than at the source.
2015-06-23 18:48:45 +02:00
Fabian Reinartz 53b9d5917d web: improve target URL handling and display. 2015-06-23 13:45:15 +02:00
Fabian Reinartz dc7d27ab9a retrieval: add honor label handling and parametrized querying.
This commit adds the honor_labels and params arguments to the scrape
config. This allows to specify query parameters used by the scrapers
and handling scraped labels with precedence.
2015-06-23 13:45:14 +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
Brian Brazil 0dbae36d36 Allow ingested metrics to be relabeled.
The main purpose of this is to allow for blacklisting
of expensive metrics as a tactical option.
It could also find uses for renaming and removing labels
from federation.
2015-06-13 15:18:27 +01:00
Brian Brazil 58ceae82bc Revert "Allow ingested metrics to be relabeled."
This reverts commit f2f26ca08f.

Was accidentally pushed to master instead of a branch for PR.
2015-06-12 22:12:26 +01:00
Brian Brazil f2f26ca08f Allow ingested metrics to be relabeled.
The main purpose of this is to allow for blacklisting
of expensive metrics as a tactical option.
It could also find uses for renaming and removing labels
from federation.
2015-06-12 22:06:30 +01:00
Fabian Reinartz b5fe2e9afe Merge pull request #773 from prometheus/fabxc/simple-cfg
config: simplify default config handling.
2015-06-08 16:22:06 +02:00
Brian Brazil b8b1d3cbac Web: Add pre-relabel labels to status page.
Figuring out what's going on with the new service discovery
and labels is difficult. Add a popover with the labels
to the target table to make things simpler, and help
discovery of potentially useful labels.
2015-06-08 12:19:01 +01:00
Fabian Reinartz 0af1cff8af config: simplify default config handling. 2015-06-06 09:04:04 +02:00
Fabian Reinartz 8214b4ee78 retrieval/discovery: surround __meta_consul_tags value with tag seperators. 2015-06-05 19:18:34 +02:00
Fabian Reinartz 280d11dca8 main: exit on invalid rule files on startup. 2015-06-02 18:44:41 +02:00
Fabian Reinartz 0de6edbdfc Move pkg/ to util/ 2015-06-01 21:12:32 +02:00
Fabian Reinartz dfaf31a1da Move web/httputils to pkg/httputil and add DeadlineClient to it 2015-06-01 21:12:31 +02:00