Commit graph

4482 commits

Author SHA1 Message Date
Brian Brazil 73049ba79d Make the choice of NaN values clearer.
Also switch stale nan value to one more suitable for expansion.
2017-05-16 18:33:51 +01:00
Brian Brazil 95162ebc16 Add log messages for out of order samples 2017-05-16 18:33:51 +01:00
Brian Brazil 3c45400130 Don't fail scrape if one sample violates ordering.
In Prometheus 1.x one sample that is out of order
or that has a duplicate timestamp is discarded, and
the rest of the scrape ingestion continues on.
This will now also be true for 2.0.
2017-05-16 18:33:51 +01:00
Brian Brazil fd5c5a50a3 Add stale markers on parse error.
If we fail to parse the result of a scrape,
we should treat that as a failed scrape and
add stale markers.
2017-05-16 18:33:51 +01:00
Brian Brazil c0c7e32e61 Treat a failed scrape as an empty scrape for staleness.
If a target has died but is still in SD, we want the previously
scraped values to go stale. This would also apply to brief blips.
2017-05-16 18:33:51 +01:00
Brian Brazil 850ea412ad If an explicit timestamp is provided, bypass staleness. 2017-05-16 18:33:51 +01:00
Brian Brazil a5cf25743c Move stalness check into a function 2017-05-16 18:33:51 +01:00
Brian Brazil 80b40e6d91 Add initial staleness handing to promql.
For instant vectors, if "stale" is the newest sample
ignore the timeseries.

For range vectors, filter out "stale" samples.

Make it possible to inject "stale" samples in promql tests.
2017-05-16 18:33:51 +01:00
Brian Brazil 5060a0fc51 Add unittests for ingestion stale NaNs 2017-05-16 18:33:51 +01:00
Brian Brazil 4f35952cf3 Inject a stale NaN when sample disappears between scrapes. 2017-05-16 18:33:51 +01:00
Brian Brazil beaa7d5a43 Move consistent NaN logic into the parser. 2017-05-16 18:33:51 +01:00
Brian Brazil 76acf7b9b1 Ensure all the NaNs we ingest have the same bit pattern. 2017-05-16 18:33:51 +01:00
Shashank Varanasi dea60bb553 Fix malformed uname string (#2727)
* Fix malformed uname string

* Make fix better

* Reformat code for simplicity
2017-05-16 18:44:11 +02:00
Fabian Reinartz 73e7ff1edd Merge pull request #2728 from prometheus/uptsdb
vendor: update prometheus/tsdb
2017-05-16 18:42:28 +02:00
Fabian Reinartz 06c2b76cd4 Merge branch 'master' into uptsdb 2017-05-16 16:48:37 +02:00
Fabian Reinartz fbb22ddd8f vendor: update prometheus/tsdb 2017-05-16 16:41:25 +02:00
Fabian Reinartz 24ce79f75d Merge pull request #2721 from prometheus/skipped-metric
Remove unused metric
2017-05-15 16:15:30 +02:00
Brian Brazil 0eabed8048 Remove unused metric 2017-05-15 15:06:54 +01:00
jswitzer 713fef292a vendor: upgrade govalidator to v6 (#2714)
* vendor: upgrade govalidator to v6

* Upgrade govalidator to latest in master.

* Run govalidator update through govendor
2017-05-15 14:35:57 +02:00
Alexey Palazhchenko b0e1ea7c6c Simplify code, fix typos. (#2719) 2017-05-15 09:56:09 +01:00
Shashank Varanasi 61235fd851 Print system information (uname) at Prometheus startup (#2709)
* Print uname on prom startup

* Make uname file linux-only

* Add missing license headers

Add missing license headers

* Print OS when uname is not available

* Print only OS name when uname not available

* Remove extra space, fix cmd/prometheus/main.go license header

* Add fix for int8 and uint8 systems

* Better formatting for build tags in cmd/prometheus/uname files

* Remove newline
2017-05-13 20:42:29 +02:00
Julius Volz ac203ef0ee Add externalURL template function (#2716)
This allows users to e.g. add links back to the generating Prometheus
right in their alert templates.
2017-05-13 15:47:04 +02:00
Fabian Reinartz cf4e19c1b0 Merge remote-tracking branch 'origin' into dev-2.0 2017-05-12 13:39:04 +02:00
Fabian Reinartz 6e804b3497 Merge branch 'master' into dev-2.0 2017-05-12 13:29:58 +02:00
Brian Brazil fcc88f0e1e query/query_range should return eval timestamp
Query and query_range should return the timestamp
at which an evaluation is performed, not the timestamp
of the data. This is as that's what query range asked
for, and we need to keep query consistent with that.

Query for a matrix remains unchanged, returning the literal
matrix.
2017-05-12 12:00:31 +01:00
Brian Brazil 517b81f927 Add timestamp() function.
Make the timestamp of instant vectors be the timestamp of the sample
rather than the evaluation. We were not using this anywhere, so this is
safe.

Add a function to return the timestamp of samples in an instant vector.

Fixes #1557
2017-05-12 12:00:31 +01:00
Fabian Reinartz d1d5c5c47d Merge pull request #2713 from brancz/max-block-duration-default
prometheus: default max-block-duration to 10% of retention
2017-05-12 12:07:09 +02:00
Frederic Branczyk c50a3eccce
prometheus: default max-block-duration to 10% of retention 2017-05-12 11:48:51 +02:00
Fabian Reinartz 0e0da989c5 Merge pull request #2712 from prometheus/vendor
vendor: remove leftover dependency
2017-05-12 09:19:15 +02:00
Fabian Reinartz 8d54499e97 vendor: remove leftover dependency 2017-05-12 09:14:44 +02:00
Fabian Reinartz 8e73bde650 Merge pull request #2710 from prometheus/fabxc-patch-1
retrieval: add missing scrape context cancelation
2017-05-11 20:30:33 +02:00
Julius Volz 1c72524870 Fix HTTP error handling in remote.Client.Store() (#2708)
Regression introduced in
e5d7bbfc3c
2017-05-11 18:40:10 +02:00
Fabian Reinartz 76b3378190 retrieval: add missing scrape context cancelation 2017-05-11 17:20:03 +02:00
Julius Volz f160f17a6f retrieval: fix missing scrape context cancellation (#2599) 2017-05-11 16:15:07 +02:00
Fabian Reinartz 0c3462762b Merge pull request #2707 from prometheus/merge16
Merge 1.6 into master
2017-05-11 15:06:15 +02:00
Fabian Reinartz 11aa049b05 Merge branch 'release-1.6' into merge16 2017-05-11 15:00:51 +02:00
Fabian Reinartz b38e977fd8 Merge pull request #2706 from prometheus/cut162
Cut 1.6.2
2017-05-11 14:56:43 +02:00
Fabian Reinartz b51cf7efcb *: cut 1.6.2 2017-05-11 14:50:39 +02:00
Fabian Reinartz ddbbd2b712 Merge branch 'release-1.5' into cut162 2017-05-11 14:29:49 +02:00
Fabian Reinartz 1edf99ce5d Merge pull request #2705 from prometheus/cut153
cut 1.5.3
2017-05-11 14:22:02 +02:00
Fabian Reinartz fc3214c7bf *: cut 1.5.3 2017-05-11 13:58:18 +02:00
Fabian Reinartz 2ff8855ae6 discovery/k8s: update client library 2017-05-11 13:53:12 +02:00
Fabian Reinartz a333c5612a Merge pull request #2678 from brancz/am-discovery-metrics
notifier: expose metric for number of discovered alertmanagers
2017-05-10 18:37:13 +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
Fabian Reinartz bf64d4efa8 Merge pull request #2703 from prometheus/alertmpl
ui: fix alert template
2017-05-10 15:42:14 +02:00
Fabian Reinartz 9a9211845e ui: fix alert template 2017-05-10 15:30:10 +02:00
Fabian Reinartz 373bec3784 Merge pull request #2700 from improbable-io/bugfix/2699-p2-sighup
Fixup sighup for P2 TSDB init #2699
2017-05-10 10:14:02 +02:00
Michal Witkowski 4177c35eba Fixup sighup for P2 TSDB init #2699 2017-05-09 17:00:54 +01:00
Fabian Reinartz ff0ee264ae Merge pull request #2695 from prometheus/nolock
Allow disabling of lock file for TSDB
2017-05-09 14:41:24 +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