Commit graph

7832 commits

Author SHA1 Message Date
Julius Volz 8155cc4992
Expose lexer item types (#5358)
* Expose lexer item types

We have generally agreed to expose AST types / values that are necessary
to make sense of the AST outside of the promql package. Currently the
`UnaryExpr`, `BinaryExpr`, and `AggregateExpr` AST nodes store the lexer
item type to indicate the operator type, but since the individual item
types aren't exposed, an external user of the package cannot determine
the operator type. So this PR exposes them.

Although not all item types are required to make sense of the AST (some
are really only used in the lexer), I decided to expose them all here to
be somewhat more consistent. Another option would be to not use lexer
item types at all in AST nodes.

The concrete motivation is my work on the PromQL->Flux transpiler, but
this ought to be useful for other cases as well.

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

* Fix item type names in tests

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-03-14 20:53:55 +01:00
Tariq Ibrahim 985eaa8194 add go 1.12.x to the travis, circleci, and promu YAMLs (#5305)
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-14 16:40:57 +00:00
Mario Trangoni 5354ffff99 Fix some spelling issues (#5361)
See,
$ codespell -S './vendor/*,./.git*,./web/ui/static/vendor*' --ignore-words-list="uint,dur,ue,iff,te,wan"

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-03-14 14:38:54 +00:00
zhulongcheng b7cac504c9 Remove unused NewReader function (#547)
The `NewReader` function is not used anywhere.
2019-03-14 15:05:40 +02:00
Simon Pasquier 9f8e16248c
Makefile.common: run staticcheck for linux, freebsd and darwin only (#5331)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-14 09:47:36 +01:00
Simon Pasquier 84e51f7222 Update Makefile.common (#548)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-13 10:40:17 +02:00
Simon Pasquier b0be270958
Makefile.common: add deps target (#5339)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-13 08:58:11 +01:00
Tariq Ibrahim d6f0e14ac6 fix redundant err!=nil check in web.go (#5346)
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-12 16:25:46 +00:00
Simon Pasquier 67385f356f
discovery/openstack: pass context to the OpenStack client (#5231)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-12 13:53:03 +01:00
Ganesh Vernekar 7c8f0b0864
Update CHANGELOG (#5341)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-12 17:14:34 +05:30
Ganesh Vernekar 844af4c0b5
Merge pull request #5340 from codesome/release-2.8.0
Update CHANGELOG
2019-03-12 17:13:38 +05:30
Ganesh Vernekar 594626e8b5
Update CHANGELOG
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-12 17:06:42 +05:30
xjewer 0d1a69353e scrape: Add global jitter for HA server (#5181)
* scrape: Add global jitter for HA server

Covers issue in https://github.com/prometheus/prometheus/pull/4926#issuecomment-449039848
where the HA setup become a problem for targets unable to be scraped simultaneously.
The new jitter per server relies on the hostname and external labels which necessarily to be uniq.

As before, scrape offset will be calculated with regard the absolute time, so even
restart/reload doesn't change scrape time per scrape target + prometheus instance.

Use fqdn if possible, otherwise fall back to the hostname. It adds extra random seed
to calculate server hash to be distinguish on machines with the same hostname, but
different DC.

Signed-off-by: Aleksei Semiglazov <xjewer@gmail.com>
2019-03-12 10:46:15 +00:00
Callum Styan 83c46fd549 update Consul vendor code so that catalog.ServiceMultipleTags can be (#5151)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-03-12 10:31:27 +00:00
Julien Pivotto 04ce817c49 scrape: Rewrite scrape loop options as a struct (#5314)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-12 10:26:18 +00:00
Simon Pasquier 027d2ece14 config: resolve more file paths (#5284)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-12 10:24:15 +00:00
Daisy T 683fbc59ec exponentation operator to drop metric name in result of op operation (#5329)
Signed-off-by: Daisy T <daisyts@gmx.com>
2019-03-12 10:21:42 +00:00
Ganesh Vernekar 59369491cf
Merge pull request #5333 from codesome/release-2.8.0
*: cut 2.8.0
2019-03-12 09:39:20 +05:30
Ganesh Vernekar 6043e0e715
*: cut 2.8.0
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-12 09:16:26 +05:30
Ganesh Vernekar 2df0b5e837
Merge pull request #5335 from simonpasquier/debug-travis-ci-failures
.travis.yml: download modules in advance
2019-03-12 09:06:42 +05:30
Simon Pasquier 758a68a52f .travis.yml: download modules in advance
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-11 21:49:15 +01:00
Krasi Georgiev 9d96ada510 Display correct values for the retention in the flags web gui. (#5322)
* Display correct values for the retention in the flags web gui.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>

* adding a log entry

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>

* added the retention info to the runtime status page

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>

* simplify the retention display

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-03-11 22:48:57 +05:30
Ganesh Vernekar b61c8e30dc
Merge pull request #5320 from roidelapluie/exprsize
ui: Expand expression_select to 220px
2019-03-11 22:24:12 +05:30
Julien Pivotto 6152df44c2 ui: Expand expression_select to 220px
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-11 17:24:25 +01:00
Ganesh Vernekar 46e0587cb3
Merge pull request #5318 from roidelapluie/sdtag
ui: remove extra table tag in service discovery
2019-03-11 20:13:13 +05:30
Ganesh Vernekar 901b82d94c
Merge pull request #5319 from roidelapluie/border
ui: Remove time picker borders
2019-03-11 20:11:22 +05:30
Julien Pivotto 5a162dc1ab
ui: remove extra table tag in service discovery
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-09 11:02:14 +01:00
Julien Pivotto 981f9208fb
ui: Remove time picker borders
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-08 22:58:31 +01:00
Ganesh Vernekar d390497280
*: cut 2.8.0-rc.0 (#5287)
* Release 2.8.0-rc.0

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Mark tsdb/370 experimental and update flag.

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* 5290 as BUGFIX

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix review comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-06 21:35:44 +05:30
David 38fea83c1f Debounce input key press handling (#5309)
- input key handler causes 2 layout cycles on each keypress which can
clog up browser rendering when typing quickly
- this change adds a debounce to the key press handler of 500ms

Fixes #5308
Signed-off-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2019-03-06 16:16:55 +01:00
zhulongcheng 719b57db44 Remove obsolete FromData function (#540)
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-03-06 11:12:28 +02:00
Ganesh Vernekar 225bc77448
Merge pull request #5310 from codesome/vendor-tsdb
vendor: Update tsdb to 0.6.1
2019-03-05 22:39:54 +05:30
Ganesh Vernekar adbb57d5f0
Update tsdb to 0.6.1
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-05 22:15:22 +05:30
Ganesh Vernekar 8921f18eb3
Merge pull request #543 from codesome/v0.6.1
*:cut 0.6.1
2019-03-05 21:36:06 +05:30
Ganesh Vernekar fcfe312d99
Update CHANGELOG for v0.6.1
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-05 19:21:46 +05:30
Alec 0861a9b14f [bugfix] update 'last' variable in chunks.MergeOverlappingChunks() (#539)
* update

Signed-off-by: naivewong <867245430@qq.com>

* update comment

Signed-off-by: naivewong <867245430@qq.com>

* Update failing test.

Signed-off-by: naivewong <867245430@qq.com>

* Update comment

Signed-off-by: naivewong <867245430@qq.com>

* Add changelog entry.

Signed-off-by: naivewong <867245430@qq.com>

* Update CHANGELOG.md

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-03-05 19:18:55 +05:30
Ganesh Vernekar 25889d6be5
Merge pull request #5298 from prometheus/release-2.7
Merge 2.7.2 changelog forward
2019-03-05 19:16:16 +05:30
Tom Wilkie 2fa93595d6
More WAL remote_write tweaks. (#5300)
* Consistently pre-lookup the metrics for a given queue in queue manager.
* Don't open the WAL (for writing) in the remote_write code.
* Add some more logging.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2019-03-05 12:21:11 +00:00
Simon Pasquier 08af7bbf90 Add Go 1.12 to Travis CI (#538)
Also update to the latest version of Makefile.common.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-04 21:44:40 +02:00
Krasi Georgiev 1684dc750a
updated tsdb to 0.6.0 (#5292)
* updated tsdb to 0.6.0

as part of the update also added the new storage.tsdb.allow-overlapping-blocks flag and mark it as experimental.
2019-03-04 21:42:45 +02:00
Tariq Ibrahim 1adb91738d fix typo in recordType method of wal_watcher.go (#5297)
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-04 17:33:35 +01:00
Ganesh Vernekar cfb9135a41
Merge pull request #5290 from prometheus/scalar-crash
Fix panic when aggregator param is not a literal.
2019-03-04 21:51:14 +05:30
Tom Wilkie 38a9bbbec2 Loosen off PrometheusRemoteWriteBehind alert.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2019-03-04 12:47:24 +00:00
Brian Brazil 858c363e94 Fix panic when aggregator param is not a literal.
The return value for checkForSeriesSetExpansion
is always nil, simplify.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-03-04 12:00:05 +00:00
Björn Rabenstein 32130cbbfa
Merge pull request #5285 from prometheus/beorn7/cleanup
Cleanup .gitignore
2019-03-04 11:53:33 +01:00
Tariq Ibrahim 197e5ac597 docs: minor improvements to the service discovery README.md (#5296)
i) Increased the size of the Service Discovery Readme title
ii) Changed `TargetGroups` to "target groups" as it has been relocated and renamed to another package.

Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-03 19:48:03 +01:00
Tariq Ibrahim ab8e9b7423 fix typo in queue_manager.go comment (#5294)
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-03 11:35:29 +00:00
Goutham Veeramachaneni 82f98c825a
Merge pull request #5291 from gouthamve/sevenpointtwo
*: cut 2.7.2
2019-03-02 06:30:42 -08:00
Goutham Veeramachaneni 535e631621
*: cut 2.7.2
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2019-03-02 15:19:55 +01:00
Krasi Georgiev ab8476dd06
Release 0.6.0 (#537) 2019-03-02 15:54:49 +02:00