Commit graph

208 commits

Author SHA1 Message Date
Augustin Husson 97950a3fae remove group if the target is empty at adapter level
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2018-09-16 14:38:21 +02:00
Julius Volz 8fbe1b5133
Handle a bunch of unchecked errors (#4461)
There are many more (mostly finalizers like Close/Stop/etc.), but most of
the others seemed like one couldn't do much about them anyway.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-08-17 17:24:35 +02:00
Harsh Agarwal 6a464ae174 expose log.level for promlog for remote_storage_adapter (#4195)
* expose log.level for promlog for remote_storage_adapter

Signed-off-by: sipian <cs15btech11019@iith.ac.in>

* replace flag description

Signed-off-by: Harsh Agarwal <cs15btech11019@iith.ac.in>
2018-07-22 16:11:38 +05:30
Julius Volz d8153ac5d5
Update internal architecture diagram (#4398)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-07-18 22:10:23 +02:00
Julius Volz a215aed9b6
Document internal Prometheus server architecture (#4295)
* Document internal Prometheus server architecture

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Review fixups

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-07-18 10:06:41 +02:00
Peter Gallerani a9d5034add Fix missing 'msg' in remote storage adapter main.go .Log info message (#4377)
Signed-off-by: Peter Gallerani <peter.gallerani@gmail.com>
2018-07-12 20:54:21 +02:00
Callum Styan d0ee4da932 fix minor issues in custom SD example (#4278)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2018-06-18 16:08:02 +01:00
Callum Styan 03578d5df8 add example usage of SD adapter for converting unsupported SD type to filesd (#3720)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2018-05-30 13:14:34 +01:00
Bartek Plotka 03a9e7f72e example: Commented out annotation examples as they are meant only for example not as an idiomatic way of relabelling.
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2018-05-02 13:42:23 +01:00
Paul Gier 85a3c974b7 minor yaml indentation consistency fix in example configs (#3946) 2018-03-11 23:06:13 +00:00
ferhat elmas ffa673f7d8 General simplifications (#3887)
Another try as in #1516
2018-02-26 07:58:10 +00:00
Goutham Veeramachaneni 3de10e3b44
Add CleanTombstones API endpoint
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-11-30 19:51:44 +05:30
root 80e5867a87 Fixed RBAC Example, added ingress privileges; @brian-brazil 2017-11-21 11:04:07 +01:00
Matthew Pound e6dcc72f9a Fix instructions on updating prometheus.yml for Remote Write Adapter Example (#3422) 2017-11-07 20:02:43 +00:00
James Turnbull 4db6592d01 Removing external_labels from example conf file (#3409)
It's unclear why this is in the example configuration file. Probably best to keep that super simple, c.f. https://github.com/prometheus/docs/pull/895#discussion_r148924390
2017-11-06 16:11:04 +00:00
David e3b926c03b Fix typo in AM config field static_configs (#3415)
* typo in prometheus.yml field causes prometheus to throw an error

Fixes #3414
2017-11-06 09:46:09 +00:00
Krasi Georgiev 5d8f93a22a now using only github.com/gogo/protobuf
bumped all grpc-gateway packages to v1.2.2
updated and run  the denproto.sh script
2017-11-02 11:31:57 +00:00
Julien Pivotto 3382f39046 Explicitely add alertmanager to example config (#3383)
As alertmanager needs to be configured in the config file in Prometheus 2, I think it is useful to have it in the example config.

Also renamed the rules in the example config so they are explicitely yml files.
2017-10-31 22:02:08 +00:00
Julius Volz 099df0c5f0 Migrate "golang.org/x/net/context" -> "context" (#3333)
In some places, where ctxhttp or gRPC are concerned, we still need to use the
old contexts.
2017-10-24 21:21:42 -07:00
Fabian Reinartz abf7c975c9 Merge branch 'master' into dev-2.0 2017-10-07 13:37:21 +02:00
Jack Neely 128b31d058 Log failure to send NaN values to remote store as Debug (#3235)
This was a warning and can be a frequent occurrence.  Let's not fill up
logs unless we are asked to.
2017-10-06 11:22:55 +01:00
Goutham Veeramachaneni 3f0267c548 Merge branch 'dev-2.0' into go-kit/log
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-09-15 23:15:27 +05:30
Goutham Veeramachaneni f5aed810f9 logging: Port to common/promlog
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-09-15 12:40:50 +05:30
Fabian Reinartz e746282772 Merge branch 'master' into dev-2.0 2017-09-11 10:55:19 +02:00
Fabian Reinartz d21f149745 *: migrate to go-kit/log 2017-09-08 22:01:51 +05:30
Fabian Reinartz 87918f3097 Merge branch 'master' into dev-2.0 2017-09-04 14:09:21 +02:00
Johannes 'fish' Ziemke 70f3d1e9f9 k8s: Support discovery of ingresses (#3111)
* k8s: Support discovery of ingresses

* Move additional labels below allocation

This makes it more obvious why the additional elements are allocated.
Also fix allocation for node where we only set a single label.

* k8s: Remove port from ingress discovery

* k8s: Add comment to ingress discovery example
2017-09-04 13:10:44 +02:00
Julius Volz aa5cdcb11e Remove extra space in log output 2017-08-29 15:24:00 +02:00
gdmello 35c952e344 Added logging for remote storage adapter (#3106)
* Added logging for remote storage adapter on startup and on any error condition during /read or /write.

* CR feedback.
2017-08-29 15:22:56 +02:00
Fabian Reinartz 25f3e1c424 Merge branch 'master' into mergemaster 2017-08-10 17:04:25 +02:00
Felicity f30b10223a documentation: update Kubernetes example for 1.7 (#2918)
Kubernetes 1.7+ no longer exposes cAdvisor metrics on the Kubelet
metrics endpoint.  Update the example configuration to scrape cAdvisor
in addition to Kubelet.  The provided configuration works for 1.7.3+
and commented notes are given for 1.7.2 and earlier versions.

Also remove the comment about node (Kubelet) CA not matching the master
CA.  Since the example no longer connects directly to the nodes, it
doesn't matter what CA they're using.

References:

- https://github.com/kubernetes/kubernetes/issues/48483
- https://github.com/kubernetes/kubernetes/pull/49079
2017-07-21 14:10:02 +02:00
Tom Wilkie cf105f9d57 Update example remote adapters for change in proto location. 2017-07-19 16:39:02 +01:00
Fabian Reinartz 32226e30f5 Guard reload and quit endpoints by flag 2017-07-11 14:25:07 +02:00
Fabian Reinartz ccf9e62972 *: add admin grpc API 2017-07-10 09:14:14 +02:00
Julius Volz e0f046396a Fix InfluxDB retention policy usage in read adapter (#2781) 2017-05-29 16:24:24 +02:00
Tom Wilkie 3141a6b36b Compress remote storage requests and responses with unframed/raw snappy. (#2696)
* Compress remote storage requests and responses with unframed/raw snappy, for compatibility with other languages.

* Remove backwards compatibility code from remote_storage_adapter, update example_write_adapter

* Add /documentation/examples/remote_storage/example_write_adapter/example_writer_adapter to .gitignore
2017-05-10 16:42:59 +02:00
Jorrit Salverda 14d0604aba Kubernetes config scrape node via api proxy (#2641)
* scrape kubelet metrics via api node proxy

* add manifests to setup serviceaccount, clusterrole and clusterrolebinding to work with rbac

* removed .cluster.local and added newline to address comments
2017-05-09 13:57:49 +02:00
Svend Sorensen 94a3e863e4 Document what ports are scraped by default in k8s example
The Kubernetes pod SD creates a target for each declared port, as documented:

https://prometheus.io/docs/operating/configuration/#pod

> The pod role discovers all pods and exposes their containers as targets. For
> each declared port of a container, a single target is generated. If a
> container has no specified ports, a port-free target per container is created
> for manually adding a port via relabeling.

This results in the default port being the declared port, or no port if none are
declared.
2017-05-01 15:58:48 -07:00
Brian Brazil 0e0fc5a7f4 Correct example name to adapter. (#2590) 2017-04-10 17:24:53 +01:00
Brian Brazil c813c824d4 Separate out remote read responses.
Fixes #2574
2017-04-06 15:49:47 +01:00
Julius Volz 3581057ea4 Update remote storage bridge README.md 2017-04-03 01:42:49 +02:00
Julius Volz b391cbb808 Add InfluxDB read-back support to remote storage bridge 2017-04-03 01:42:43 +02:00
Julius Volz b5b0e00923 Merge pull request #2499 from prometheus/remote-read
Remote Read
2017-03-27 14:43:44 +02:00
Julius Volz 428e1ad42c Remove PromDash from architecture diagram 2017-03-23 13:11:05 +01:00
Julius Volz 815762a4ad Move retrieval.NewHTTPClient -> httputil.NewClientFromConfig 2017-03-20 14:17:04 +01:00
Stephen Soltesz 3f29324e04 Fix kubernetes host:port relabel regex.
This change corrects a bug introduced by PR
https://github.com/prometheus/prometheus/pull/2427

The regex uses three groups: the hostname, an optional port, and the
prefered port from a kubernetes annotation.

Previously, the second group should have been ignored if a :port was not
present in the input. However, making the port group optional with the
"?" had the unintended side-effect of allowing the hostname regex "(.+)"
to match greedily, which included the ":port" patterns up to the ";"
separating the hostname from the kubernetes port annotation.

This change updates the regex for the hostname to match any non-":"
characters. This forces the regex to stop if a ":port" is present and
allow the second group to match the optional port.
2017-02-16 14:46:04 -05:00
Stephen Soltesz 0b1790ee44 Match addresses with or without declared ports.
This change updates port relabeling for pod and service discovery so the
relabeling regex matches addresses with or without declared ports. As
well, this change uses a consistent style in the replacement pattern
for the two expressions.

Previously, for both services or pods that did not have declared ports, the
relabel config regex would fail to match:

    __meta_kubernetes_service_annotation_prometheus_io_port
    regex: (.+)(?::\d+);(\d+)

    __meta_kubernetes_pod_annotation_prometheus_io_port
    regex: (.+):(?:\d+);(\d+)

Both regexes expected a <host>:<port> pattern.

The new regex matches addresses with or without declared ports by making
the :<port> pattern optional.

    __meta_kubernetes_service_annotation_prometheus_io_port
    __meta_kubernetes_pod_annotation_prometheus_io_port
    regex: (.+)(?::\d+)?;(\d+)
2017-02-14 20:12:38 -05:00
Julius Volz beb3c4b389 Remove legacy remote storage implementations
This removes legacy support for specific remote storage systems in favor
of only offering the generic remote write protocol. An example bridge
application that translates from the generic protocol to each of those
legacy backends is still provided at:

documentation/examples/remote_storage/remote_storage_bridge

See also https://github.com/prometheus/prometheus/issues/10

The next step in the plan is to re-add support for multiple remote
storages.
2017-02-14 17:52:05 +01:00
Svend Sorensen 3a96d0e267 Kubernetes SD: Fix namespace meta label
Replace one more instance of `__meta_kubernetes_service_namespace` with
`__meta_kubernetes_namespace`.
2017-02-06 13:28:12 -08:00
Julius Volz b16371595d Add standalone remote storage bridge example
In preparation for removing specific remote storage implementations,
this offers an example of how to achieve the same in a separate process.
Rather than having three separate bridges for OpenTSDB, InfluxDB, and
Graphite, I decided to support all in one binary.

For now, this is in the example documenation directory, but perhaps we
will want to make a first-class project / repository out of it.
2017-02-01 13:22:41 +01:00
beorn7 5770d9e545 Kubernetes SD: More fixes to example config
- Avoid mentioning the `in_cluster` option. (It doesn't exist anymore.)
- Replace `__meta_kubernetes_service_namespace` and
  `__meta_kubernetes_pod_namespace` (which don't exist anymore) by
  `__meta_kubernetes_namespace`.
2016-11-29 18:42:35 +01:00
gambrose 52c762e9f1 The defaults stated in the example config where wrong (#2110)
* The stated defaults where wrong

* Update prometheus.yml
2016-11-21 09:53:59 +01:00
Jimmi Dyson 473dd5b89a
Kubernetes SD: Add endpoints role to API servers job to actually discover some API servers 2016-11-10 09:46:36 +00:00
Jimmi Dyson da23543f29
Kubernetes SD: Update example config to use endpoints role for API server discovery 2016-11-02 20:48:01 +00:00
Jimmi Dyson 4d37dca669
Kubernetes SD: Update config for discovery in 1.3 2016-11-02 15:06:20 +00:00
Julius Volz b5163351bf Simplify and fix remote write example
After removing gRPC, this can be simplified again. Also, the
configuration for the remote storage moved from flags to the config
file.
2016-10-05 17:53:01 +02:00
Tom Wilkie d83879210c Switch back to protos over HTTP, instead of GRPC.
My aim is to support the new grpc generic write path in Frankenstein.  On the surface this seems easy - however I've hit a number of problems that make me think it might be better to not use grpc just yet.

The explanation of the problems requires a little background.  At weave, traffic to frankenstein need to go through a couple of services first, for SSL and to be authenticated.  So traffic goes:

    internet -> frontend -> authfe -> frankenstein

- The frontend is Nginx, and adds/removes SSL.  Its done this way for legacy reasons, so the certs can be managed in one place, although eventually we imagine we'll merge it with authfe.  All traffic from frontend is sent to authfe.
- Authfe checks the auth tokens / cookie etc and then picks the service to forward the RPC to.
- Frankenstein accepts the reads and does the right thing with them.

First problem I hit was Nginx won't proxy http2 requests - it can accept them, but all calls downstream are http1 (see https://trac.nginx.org/nginx/ticket/923).  This wasn't such a big deal, so it now looks like:

    internet --(grpc/http2)--> frontend --(grpc/http1)--> authfe --(grpc/http1)--> frankenstein

Next problem was golang grpc server won't accept http1 requests (see https://groups.google.com/forum/#!topic/grpc-io/JnjCYGPMUms).  It is possible to link a grpc server in with a normal go http mux, as long as the mux server is serving over SSL, as the golang http client & server won't do http2 over anything other than an SSL connection.  This would require making all our service to service comms SSL.  So I had a go a writing a grpc http1 server, and got pretty far.  But is was a bit of a mess.

So finally I thought I'd make a separate grpc frontend for this, running in parallel with the frontend/authfe combo on a different port - and first up I'd need a grpc reverse proxy.  Ideally we'd have some nice, generic reverse proxy that only knew about a map from service names -> downstream service, and didn't need to decode & re-encode every request as it went through.  It seems like this can't be done with golang's grpc library - see https://github.com/mwitkow/grpc-proxy/issues/1.

And then I was surprised to find you can't do grpc from browsers! See http://www.grpc.io/faq/ - not important to us, but I'm starting to question why we decided to use grpc in the first place?

It would seem we could have most of the benefits of grpc with protos over HTTP, and this wouldn't preclude moving to grpc when its a bit more mature?  In fact, the grcp FAQ even admits as much:

> Why is gRPC better than any binary blob over HTTP/2?
> This is largely what gRPC is on the wire.
2016-09-15 23:21:54 +01:00
Julius Volz aa3f2b7216 Generic write cleanups and changes.
- fold metric name into labels
- return initialization errors back to main
- add snappy compression
- better context handling
- pre-allocation of labels
- remove generic naming
- other cleanups
2016-08-30 17:24:48 +02:00
Brian Brazil 36d2c4bd0b Add generic write path using grpc.
This uses a new proto format, with scope for multiple samples per
timeseries in future. This will allow users to pump samples out to
whatever they like without having to change the core Prometheus code.

There's also an example receiver to save users figuring out the
boilerplate themselves.
2016-08-30 17:19:18 +02:00
Fabian Reinartz 9a269b5507 Clarify comment on rule evaluation
Fixes #1866
2016-08-03 08:29:51 +02:00
Audun Fauchald Strand 50e044bb00 added path to pods scrape job 2016-07-27 15:13:53 +02:00
William Stewart f97cd29e47
Drop '__meta_kubernetes_role' since we have role in the config 2016-07-21 15:46:14 +02:00
William Stewart 599fafd2aa
Add node job 2016-07-21 15:45:42 +02:00
William Martin Stewart 58a3771e49 Add roles to prometheus kubernetes example
Needed with Prometheus 1.0
2016-07-21 13:16:23 +02:00
Jimmi Dyson 5733de0dfe
Kubernetes SD: Update example config with TLS options 2016-06-27 14:38:51 +01:00
beorn7 44aa7ec46d doc: Update scrape config in example prometheus.yml 2016-06-14 09:57:03 +02:00
Pieter Lange 427b322078 Minor typo 2016-05-24 11:12:42 +02:00
Patrick Bogen ae413704e8 kubernetes pod-level discovery 2016-05-18 17:18:52 -07:00
Julius Volz 657d65d6d6 Remove invalid scrape timeout from example config.
It can't be greater than the scrape interval. Let's just remove it.
2016-02-24 21:06:36 +01:00
Julius Volz e3baa35e9f Fix typo in documentation/examples/kubernetes-rabbitmq/README.md 2016-02-08 02:00:10 +01:00
Tiago Katcipis 73be7f63be Fix typos and moving example to the correct place 2016-01-23 16:38:24 -02:00
Tiago Katcipis b7ae20d3d8 fixing typos 2016-01-17 21:35:51 -02:00
Tiago Katcipis 53fb648849 adding README to explain the example 2016-01-17 15:57:49 -02:00
Tiago Katcipis bb4722d6b5 Adding RabbitMQ example as mentioned on #1312 2016-01-12 20:59:37 -02:00
Jimmi Dyson d3934345e9 Kubernetes Discovery: Ensure metrics path isn't overwritten in example relabeling 2016-01-12 21:06:32 +00:00
Jimmi Dyson c12fb447b8 Kubernetes SD: Use first TCP service port as target port & clean up
example config

Fixes #1256
2015-12-08 10:29:40 +00:00
Jimmi Dyson 042f18b07a Kubernetes SD: Fix metrics path relabeling in example config 2015-11-25 10:27:11 +00:00
Jimmi Dyson 645feba8cf KubernetesSD: Remove redundant defaults from example config 2015-11-18 14:24:30 +00:00
Jimmi Dyson 2cca07381b KubernetesSD: Create targets for services as well as service endpoints 2015-11-18 14:15:39 +00:00
Jimmi Dyson 104803e74e Kubernetes SD: Cleanup example config label regexps 2015-10-24 19:29:58 +01:00
Jimmi Dyson 87940ec213 Kubernetes SD: Rename masters to api_servers in config 2015-10-24 14:41:14 +01:00
Thach MAI 94f4430ff3 Fix example prometheus.yml to use "external_labels" instead of "labels". 2015-10-02 23:00:10 +02:00
Jimmi Dyson 1976dfe634 Add Kubernetes namespace & name labels to example config 2015-09-29 12:55:15 +01:00
Jimmi Dyson 0d61605526 Kubernetes SD example: separate out cluster level components & services 2015-09-29 11:22:18 +01:00
Jimmi Dyson e26fc5e73c Kubernetes SD config tidy & add labelmap action example 2015-09-29 08:59:35 +01:00
Keegan Carruthers-Smith e633b1dc8d Move InCluster auth in kubernetes example config
CA and Bearer Token are config of `kubernetes_sd_configs`, not the
`scrape_config`. Also updated misleading top-level comment and removed
unnecessary global config.
2015-09-29 09:05:21 +02:00
Fabian Reinartz 58c32f84ce Merge pull request #1055 from fabric8io/kubernetes-discovery
Move TLS options to scrape config
2015-09-09 11:24:29 +02:00
Jimmi Dyson a1574aa2b3 Move TLS options to scrape config
Fixes #1013, fixes #989
2015-09-09 09:52:21 +01:00
Fabian Reinartz e298463fd6 Merge pull request #1053 from prometheus/diag
Update architecture diagram
2015-09-07 15:08:14 +02:00
Fabian Reinartz e761f0d664 Update architecture diagram 2015-09-07 14:11:28 +02: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
Jimmi Dyson 923f8111d4 Initial Kubernetes discovery
Fixes #904
2015-08-13 10:38:52 +01:00
Fabian Reinartz a703241bf8 Adjust example config to naming changes 2015-05-19 18:12:58 +02:00
Fabian Reinartz 86087120dd Replace example config with new YAML format. 2015-05-11 18:14:07 +02:00
beorn7 33ef2e411b Remove hopelessly outdated tutorial. 2015-03-13 15:50:57 +01:00
Julius Volz 62b69b005d Update architecture diagram and include source file.
Change-Id: I2a793a5d1941dc0e945a9cfe25df5f5a79d2b10a
2014-12-23 14:04:58 +01:00
Julius Volz 9c43ed7b6d Update architecture diagram.
Include links to components and include the pushgateway.

Change-Id: I8edb246fac3ba6b2f97ef0d810e0d3bf163be5f7
2014-12-07 01:58:20 +01:00
Julius Volz 6717f6b2f4 Add architecture overview diagram.
Change-Id: I860a748be534b2b9b0b60a9dd2e4436b78cc3907
2014-12-07 01:22:03 +01:00
Julius Volz c35db9f080 Add Java implementation links to metric model docs.
Change-Id: If2a36aa305a0806ffdf490f78e85afb71da8c202
2014-02-27 15:08:44 +01:00
Julius Volz 688f4f43c3 Minor metric type documentation fixups.
Change-Id: Ib01ab728e9f0a6b15c23f1cde84161efe9f89e33
2014-02-25 15:29:04 +01:00
Julius Volz 91aebda74d Merge "Interim commit of metric model." 2014-02-25 15:24:17 +01:00
Julius Volz fceef4137c Fix /metrics endpoint in sample config.
Change-Id: I2daca6a31f536b87aa8e49a2190787ad9d803595
2013-10-28 08:03:58 +01:00
Conor Hennessy 2d2c434d48 More updates for first time users.
- Modified sample conf so it is useable by default, also added some
      comments from the 'hello world' configuration.
    - Updated README so there's a clear two step start for newbies.
    - Added extra vim swap files to gitignore.

Change-Id: I76203973db4a7b332014662fcfb2ce5e7d137bd8
2013-10-22 20:54:43 +02:00
Conor Hennessy 986adfa557 Update example config file from json to new protobuf format.
Change-Id: I38646c2be53b6993abe464d9cdd9b211678de496
2013-10-22 20:54:43 +02:00
Matt T. Proud 9dd3f95861 Interim commit of metric model.
Change-Id: I54c74d796bd175fe056353983043a10c03974185
2013-08-27 14:21:25 +02:00
Matt T. Proud d538b0382f Include long-tail data deletion mechanism.
This commit introduces the long-tail deletion mechanism, which will
automatically cull old sample values.  It is an acceptable
hold-over until we get a resampling pipeline implemented.

Kill legacy OS X documentation, too.
2013-05-13 10:54:36 +02:00
Julius Volz 06ace4941d Remove/replace last references to github.com/matttproud/... 2013-02-07 14:32:18 +01:00
Matt T. Proud 5d1c794b30 Move documentation examples to dedicated location. 2013-01-27 17:55:08 +01:00