Commit Graph

492 Commits

Author SHA1 Message Date
Fabian Reinartz
c389193b37 Merge branch 'master' into dev-2.0 2017-03-17 16:27:07 +01:00
Bplotka
1823ae8bc4 Fixed int64 overflow for timestamp in v1/api parseDuration and parseTime (#2501)
* Fixed int64 overflow for timestamp in v1/api parseDuration and parseTime

This led to unexpected results on wrong query with "(...)&start=148966367200.372&end=1489667272.372"
That query is wrong because of `start > end` but actually internal int64 overflow caused start to be something around MinInt64 (huge negative value) and was passing validation.

BTW: Not sure if negative timestamp makes sense even.. But model.Earliest is actually MinInt64, can someone explain me why?

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* Added missing trailing periods on comments.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>

* MOved to only `<` and `>`. Removed equal.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2017-03-16 15:16:20 +01:00
Fabian Reinartz
de1e4322d7 Merge pull request #2474 from Gouthamve/custom-timeouts-1399
Support Custom Timeout for Queries
2017-03-12 14:20:59 +01:00
Erdem Agaoglu
90625b0400 Use revision as cachebuster 2017-03-07 18:03:52 +03:00
Goutham Veeramachaneni
4b0270290b
Fix comments to match convention 2017-03-06 23:21:27 +05:30
Goutham Veeramachaneni
c6b329c55b
Support Custom Timeouts for Queries 2017-03-06 23:02:21 +05:30
Goutham Veeramachaneni
6634984a38
Comments and Typo Fixes 2017-03-06 17:16:37 +05:30
Erdem Agaoglu
241da87f7f Adding version to names of static files
to prevent browsers using old files in local caches after an upgrade.
2017-03-03 23:36:06 +03:00
Fabian Reinartz
9304179ef7 Merge branch 'master' into dev-2.0 2017-03-02 08:16:58 +01:00
Derek Marcotte
0a7fb56b16 Expose PromConsole.Graph.buildQueryUrl, refactor dispatch to use (#2461)
Expose buildQueryUrl, refactor dispatch to use

buildQueryUrl will allow users to execute queries over the range of an
existing graph.  This will be helpful to select data series they wish to
annotate the graph with, for example.
2017-03-01 22:37:50 +00:00
Julius Volz
7e14533b32 Merge pull request #2396 from lightpriest/fuzzy-fix-lookup
Fix fuzzy search lookup issues
2017-02-28 19:06:30 +01:00
Derek Marcotte
74a3b1051a Add rickshawGraph proerty to the Graph object. (#2438)
Add rickshawGraph property to the Graph object.

This allows further changes to be made to the graph, for example,
annotations.
2017-02-18 10:03:32 +00:00
Or Cohen
93d20d2d2b Improve fuzzy search
The fuzzy library didn't try to find a "best match", but settled on the
first fuzzy match that exists. This patch includes a modified version of
the fuzzy library, which recursivley tries on the rest of the search
string to find a better match. If found, returns that one.

Another small modification is that if a pattern fully matches, it
skips the lookup entirley and returns the highest score possible for
that match.
2017-02-05 17:38:05 +02:00
Or Cohen
81d37a04aa Fix autocomplete misses certain queries
For some of the queries, the fuzzy lookup was not filtering properly.
The problem is due to the "replace" beind made on the query itself. It
accidently removes only the first underscore. This patch changes it so
that it removes all of the whitespaces, letting the fuzzy algorithm do
its magic, also fixing this problem.

Originally, the underscore were replaced by a space for this specific
reason, to let the user type a space and have the lookup treat it as the
word break.

Fixes #2380
2017-02-05 16:20:52 +02:00
Fabian Reinartz
87bea50b85 web: fix /targets for new label types 2017-02-02 13:18:17 +01:00
Fabian Reinartz
1d3cdd0d67 Merge branch 'master' into dev-2.0-rebase 2017-01-30 17:43:01 +01:00
Fabian Reinartz
d80a3de235 pkg/textparse: add documentation 2017-01-17 08:16:47 +01:00
Fabian Reinartz
157e698958 web/api: fix min/max timestamps to valid range 2017-01-16 14:09:59 +01:00
Frederic Branczyk
bd92571bdd
web/api: make target and alertmanager api responses consistent 2017-01-16 11:53:00 +01:00
Frederic Branczyk
389c6d0043
web/api: add alertmanager api 2017-01-13 15:30:20 +01:00
beorn7
767c0709b1 Retrieval: Avoid copying Target
retreival.Target contains a mutex. It was copied in the Targets()
call. This potentially can wreak a lot of havoc.

It might even have caused the issues reported as #2266 and #2262 .
2017-01-06 18:43:41 +01:00
Fabian Reinartz
c9f4aea8e2 Merge pull request #2305 from alicebob/favicon
Add a favicon to the web GUI
2017-01-04 10:15:27 +01:00
Fabian Reinartz
bc20d93f0a storage: rename iterator value getters to At() 2017-01-02 13:33:37 +01:00
Fabian Reinartz
61bd698143 web: implement federation for new storage 2016-12-30 19:34:45 +01:00
Fabian Reinartz
28f547bcc7 api/v1: fix tests, restore series queries 2016-12-30 10:43:44 +01:00
Fabian Reinartz
f8fc1f5bb2 *: migrate ingestion to new batch Appender 2016-12-29 11:03:56 +01:00
Ed Schouten
b3a39ccd8a Use lexicographic order to sort alerts by name.
Right now the /alerts page of Prometheus sorts alerts by severity
(firing, pending, inactive). Once multiple alerts have the same
severity, their order seems to correlate to how they are placed in the
configuration files, but not always. Looking at the code, we make use of
sort.Sort(), which is documented not to provide a stable sort. The
Less() function also only takes the alert state into account.

This change extends the Less() function to provide a lexicographic order
on both the alert state and the name. This means I can finally find the
alerts I'm looking for without using my browser's search feature.
2016-12-27 14:28:44 +01:00
Harmen
135d32ea22 make assets 2016-12-27 13:59:20 +01:00
Harmen
dfa4f79bcd add favicon 2016-12-27 13:58:51 +01:00
Fabian Reinartz
5817cb5bde *: migrate from model.* to promql.* types 2016-12-25 00:37:46 +01:00
Brian Brazil
bed4635802 Use irate consistently in console template examples. (#2296)
I must have forgotten my 'g' when switching these.
2016-12-21 13:19:23 +00:00
Brian Brazil
2e3b42ad6c Correctly handle the end time being 0 in the URL. (#2290) 2016-12-18 19:30:52 +00:00
Fabian Reinartz
9ecea36ef9 Merge pull request #2259 from prometheus/federationerr
web: don't return federation errors over HTTP
2016-12-06 16:18:03 +01:00
Fabian Reinartz
cef2e04aa3 web: add error counter for federation responses 2016-12-06 16:09:50 +01:00
Fabian Reinartz
0ea0a19848 Merge pull request #2240 from agaoglu/read-timeout
Set read-timeout for http.Server
2016-12-06 16:01:45 +01:00
Fabian Reinartz
9d68e81b32 web: don't return federation errors over HTTP
We are writing federation responses streaming. So after
the first byte we wrote, the status header is fixed. We cannot
return an HTTP error for intermediate error but should just abort
and log instead.
2016-12-06 15:52:50 +01:00
Erdem Agaoglu
e487477a17 LimitListener to limit max number of connections
This also drops tcp keep-alive in ListenAndServe but it's no longer
necessary since we now close idle connections long before that.
2016-12-06 12:45:59 +03:00
Morten Siebuhr
c5b17263a6 web: Display current working directory on status-page 2016-12-05 19:46:41 +01:00
Frederic Branczyk
33b583d50e
web/api: add targets endpoint 2016-12-05 13:13:21 +01:00
Frederic Branczyk
8f8cea4fbd
retrieval: refactor TargetManager to return flat list of Targets 2016-12-02 13:28:58 +01:00
Erdem Agaoglu
9986b28380 Set read-timeout for http.Server
This also specifies a timeout for idle client connections, which may
cause "too many open files" errors.
See #2238
2016-12-01 16:29:45 +03:00
Fabian Reinartz
d4deb8bbf2 web: show discovered Alertmanagers in UI 2016-11-24 15:06:50 +01:00
Martín Ferrari
4298d91a9c Update bindata.go 2016-11-17 02:33:31 +00:00
Martín Ferrari
fe83ea511f Replace handlebars with the simpler and saner mustache library. 2016-11-17 02:33:12 +00:00
Martín Ferrari
0a6972b6a3 Replace datetimepicker library with a more maintained version.
Adds also the moment.js library, which is a dependency of it.

Following conventions in the web/ui directory, I am not including the original
sources or LICENSE files.
2016-11-17 02:29:08 +00:00
Brian Brazil
79f8514c9c Point user to POST if they try to GET /-/reload (#2172) 2016-11-07 15:14:22 +00:00
Fabian Reinartz
30af47535d Merge remote-tracking branch 'origin/release-1.2' 2016-11-01 15:42:13 +01:00
Anders Daljord Morken
5c025a2f41 query_range: Validate that start comes before end 2016-11-01 15:28:28 +01:00
beorn7
5b16d6bd6e Merge branch 'release-1.2' 2016-10-31 00:06:23 +01:00
beorn7
f0acde7721 Regenerate assets after cherry-pick 2016-10-28 14:16:48 +02:00