Commit Graph

93 Commits

Author SHA1 Message Date
Tobias Schmidt
50079a85a1 Make time parameter optional in v1 query API
If no time paramter is provided, the current server timestamp is used.
2015-11-11 13:30:06 -08:00
Fabian Reinartz
a542cc8609 Remove -web.use-local-assets 2015-11-11 17:58:03 +01:00
Fabian Reinartz
e3b6ec9784 Switch to common/log 2015-10-03 10:21:43 +02:00
Julius Volz
dac26cef71 Rename global "labels" config option to "external_labels". 2015-09-29 20:54:20 +02:00
Fabian Reinartz
398bbf906b Switch to common/route package 2015-09-24 17:08:47 +02:00
Julius Volz
0179bbfe03 Fix / -> /graph redirect when using a path prefix. 2015-09-23 12:36:18 +02:00
Fabian Reinartz
171f50706a Fix unkeyed field errors. 2015-09-18 17:00:08 +02:00
Fabian Reinartz
d85cee0277 Remove compression from web interface 2015-09-17 16:33:14 +02:00
Fabian Reinartz
f8a25f6af7 Apply HTTP handler compression everywhere 2015-09-17 14:49:50 +02:00
Fabian Reinartz
896928ad00 Fix redirect path 2015-09-12 09:02:34 +02:00
Fabian Reinartz
d7b21f2fdb Merge pull request #1039 from prometheus/startpage
Change UI start page
2015-09-12 08:44:54 +02:00
Fabian Reinartz
87b1d47e2b Change UI start page 2015-09-12 08:40:46 +02:00
Fabian Reinartz
9bbd9264e2 Add global labels to federation 2015-09-03 16:38:03 +02:00
Julius Volz
da2499d5a5 Add POST handler for /debug to fix CPU profiling.
`go tool pprof` sends a POST request to enable CPU profiling, so we also
need to handle that method.
2015-08-26 17:42:25 +02:00
Julius Volz
995d3b831d Fix most golint warnings.
This is with `golint -min_confidence=0.5`.

I left several lint warnings untouched because they were either
incorrect or I felt it was better not to change them at the moment.
2015-08-26 12:44:46 +02:00
Fabian Reinartz
306e8468a0 Switch from client_golang/model to common/model 2015-08-21 13:33:38 +02:00
Julius Volz
274e9d6955 Exit when web server encounters a startup error 2015-08-20 18:23:57 +02:00
Jan Berktold
fa929a8345 Change /reload to /-/reload & and fix channel type 2015-08-11 12:26:41 +02:00
Jan Berktold
2bf7048dbb Add reload handler to web 2015-08-11 11:27:15 +02:00
Julius Volz
c5c7f92960 Fix /debug/pprof endpoint with new web router.
This got broken in
78047326b4
since it stopped using the DefaultServeMux.

This approach will defer pprof requests to the DefaultServeMux, which
may or may not have pprof enabled (in Prometheus, it gets it included in
main.go). An alternative approach would be to duplicate the four lines in
https://golang.org/src/net/http/pprof/pprof.go#L62. When choosing that
approach though, we would not automatically gain any new endpoints added
by net/http/pprof or other /debug endpoints in the future.
2015-07-22 12:28:46 +02:00
Brian Brazil
7b5a29fc8f web: Fix regression in .Path
.Path is documented as removing /consoles/,
recent changes added in a leading / which broke
the provided console templates menu system.
2015-07-10 10:31:35 +01:00
Julius Volz
fcff35b43e Consolidate external reachability flags into one.
Besides fixing https://github.com/prometheus/prometheus/issues/805 by
making the entire externally reachable server URL configurable, this
adds tests for the "globalURL" template function and makes it easier to
test other such functions in the future.

This breaks the `web.Hostname` flag (and introduces `web.external-url`).
This flag is likely only used by few users, so I hope that's
justifiable.

Fixes https://github.com/prometheus/prometheus/issues/805
2015-07-03 13:39:10 +02:00
Julius Volz
d7ea0397d4 Use templates.TemplateExpander for all page templates.
This will allow us to use all of our shiny templating functions in the
main page templates as well.
2015-06-23 17:53:06 +02:00
Fabian Reinartz
53b9d5917d web: improve target URL handling and display. 2015-06-23 13:45:15 +02:00
Fabian Reinartz
39a8254963 web: add basic federation support.
This commit adds a federation handler on /federate. It accepts `match[]`
query parameters containing vector selectors. Their intersection determines
the in-memory metrics that are returned in the same way as the
/metrics endpoint does (modulo sorting).
2015-06-23 13:45:15 +02:00
Fabian Reinartz
119801027f web: expose a version information endpoint 2015-06-17 14:49:31 +02:00
Fabian Reinartz
39edc2df7a version: move version information into separate package.
Version information is determined at build-time and thus there is
no need to pass it down from main. In its own package it can
be used from various other packages.
2015-06-16 14:48:29 +02:00
Fabian Reinartz
85d7c7640a web: remove flags, refactor handlers 2015-06-15 19:01:06 +02:00
Sindre Myren
a081c9436b Building without a Makefile (on Windows)
Main changes:

- Switched to using `go-bindata` in place of `scripts/embed-static.sh`.
- Support for building Prometheus without a `Makefile`.
- Minor typo fix to make Prometheus build on Windows (without Makefiles).

Please note that this does not mean that prometheus will work on Windows.
There are still failing tests!
2015-06-10 20:43:59 +02:00
Fabian Reinartz
5b713911e3 web/api: enable running API legacy and v1 in parallel 2015-06-08 19:11:48 +02:00
Fabian Reinartz
e88e5f680b web: simplify prefix handling using util/route package. 2015-06-03 15:53:04 +02:00
Fabian Reinartz
78047326b4 web: cleanup initialization of web service. 2015-06-03 08:45:43 +02:00
Julius Volz
09fcf505f5 Fix slash position in MustBuildServerURL(). 2015-06-01 12:54:19 +02:00
Julius Volz
d7c015c149 Convert pathPrefix to not have trailing slash. 2015-06-01 12:43:17 +02:00
Julius Volz
837ffcea29 Merge pull request #726 from prometheus/improve-redirections
Improve web redirection and 404 behavior.
2015-05-23 16:16:26 +02:00
Tobias Gesellchen
84d42f48e5 allow to override the default os.Hostname() when creating PrometheusURLs 2015-05-23 12:59:38 +02:00
Julius Volz
fcd33bbfd8 Improve web redirection and 404 behavior.
Previously we redirected any non-existent path to the root (or path
prefix).

The new behavior:

With no path prefix:

- "" -> "/"
- "/biz" -> 404

With path prefix of "/foo/bar":

- "" -> "/foo/bar/"
- "/" -> "/foo/bar/"
- "/foo/bar" -> "/foo/bar/"
- "/biz" -> /foo/bar/biz"
  (anything not starting with the path prefix gets the prefix prepended)
- "/foo/bar/biz" -> 404
2015-05-23 12:46:16 +02:00
Julius Volz
267fd34156 Switch Prometheus to use github.com/prometheus/log.
This change is conceptually very simple, although the diff is large. It
switches logging from "github.com/golang/glog" to
"github.com/prometheus/log", while not actually changing any log
messages. V(1)-style logging has been changed to be log.Debug*().
2015-05-20 18:19:32 +02:00
Fabian Reinartz
a216b1cb27 Merge pull request #704 from prometheus/fabxc/cfg_check
Clean storage shutdown on startup errors, require initial config
2015-05-19 16:50:05 +02:00
Fabian Reinartz
5d3024fd3e Restructure component initialization 2015-05-19 14:41:47 +02:00
Fabian Reinartz
385919a65a Avoid inter-component blocking if ingestion/scraping blocks.
Appending to the storage can block for a long time. Timing out
scrapes can also cause longer blocks. This commit avoids that those
blocks affect other compnents than the target itself.
Also the Target interface was removed.
2015-05-18 17:58:51 +02:00
Fabian Reinartz
1a2d57b45c Move template functionality out of target.
The target implementation and interface contain methods only serving a
specific purpose of the templates. They were moved to the template
as they operate on more fundamental target data.
2015-05-18 13:35:43 +02:00
Brian Brazil
c3a2b63fe9 Add stddev and stdvar aggregation functions.
This adds the population standard deviation and
variance as aggregation functions, useful for
spotting how many standard deviations some samples
are from the mean.
2015-04-17 00:30:03 +01:00
Ceesjan Luiten
6f5f33bd4d #625 Fix incorrect consoles URL 2015-04-06 17:30:13 +02:00
Ceesjan Luiten
0e18784c64 Make all paths absolute to support proxies 2015-04-02 20:36:47 +02:00
beorn7
be11cb2b07 Remove the sample ingestion channel.
The one central sample ingestion channel has caused a variety of
trouble. This commit removes it. Targets and rule evaluation call an
Append method directly now. To incorporate multiple storage backends
(like OpenTSDB), storage.Tee forks the Append into two different
appenders.

Note that the tsdb queue manager had its own queue anyway. It was a
queue after a queue... Much queue, so overhead...

Targets have their own little buffer (implemented as a channel) to
avoid stalling during an http scrape. But a new scrape will only be
started once the old one is fully ingested.

The contraption of three pipelined ingesters was removed. A Target is
an ingester itself now. Despite more logic in Target, things should be
less confusing now.

Also, remove lint and vet warnings in ast.go.
2015-03-15 14:08:22 +01:00
Julius Volz
989bc86bcb Make flag names consistent across projects. 2015-02-08 23:29:57 +01:00
Bjoern Rabenstein
5859b74f1b Clean up license issues.
- Move CONTRIBUTORS.md to the more common AUTHORS.
- Added the required NOTICE file.
- Changed "Prometheus Team" to "The Prometheus Authors".
- Reverted the erroneous changes to the Apache License.
2015-01-21 20:07:45 +01:00
Bjoern Rabenstein
b1e4956142 Apply a giant code cleanup.
Essentially:

- Remove unused code.

- Make it 'go vet' clean. The only remaining warnings are in generated code.

- Make it 'golint' clean. The only remaining warnings are in gerenated code.

- Smoothed out same minor things.

Change-Id: I3fe5c1fbead27b0e7a9c247fee2f5a45bc2d42c6
2014-12-10 16:16:49 +01:00
Bjoern Rabenstein
14bda4180c Changes after pair code review.
Change-Id: Ib72d40f8e9027818cfbbd32a7a7201eebda07455
2014-11-25 17:12:59 +01:00