Commit graph

95 commits

Author SHA1 Message Date
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