Commit Graph

308 Commits

Author SHA1 Message Date
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
Fabian Reinartz
62b4e89b39 Restore legacy API scalar format 2015-07-16 20:19:18 +02:00
Brian Brazil
87b9813be4 Merge pull request #883 from brian-brazil/fix-menu
web: Fix regression in .Path
2015-07-10 10:38:30 +01: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
Fabian Reinartz
9e599976c4 web/js: fix display error for vectors in console 2015-07-10 00:43:43 +02:00
Fabian Reinartz
75ba840d88 web/js: adjust Javascript to new response format 2015-07-06 13:09:26 +02:00
Fabian Reinartz
3d67d75935 promql: implement JSON array format for scalar and string 2015-07-06 13:09:26 +02:00
Fabian Reinartz
77e8983221 promql: add MarshalJSON method for SamplePair 2015-07-06 10:29:59 +02:00
Julius Volz
0f57b403a9 Add tests for "globalURL" template function. 2015-07-03 14:47:52 +02: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
Fabian Reinartz
8f904d6a54 api/v1: fix response format tests 2015-07-02 14:12:26 +02:00
Fabian Reinartz
b36fa7ad61 api/v1: fix Content-Type in response 2015-07-01 22:47:25 +02:00
Fabian Reinartz
4db3eeb054 web: generate embedded assets. 2015-06-25 17:26:26 +02:00
Julius Volz
cf2a7a7ca9 Use v1 API for querying.
Also remove hidden input fields that are not used anymore, because the
query params are now passed as JSON to the AJAX function. This also has
the wonderful side effect that we're no longer sending all the other
non-hidden fields along to the query endpoints anymore.
2015-06-25 15:05:04 +02:00
Julius Volz
9607b8bbdb Merge pull request #840 from prometheus/fix-scrape-errors-ui
Fix blown-up scrape error display in web UI.
2015-06-24 17:55:01 +02:00
Julius Volz
bc1c789bab Disallow cross-origin DELETE and POST requests. 2015-06-24 17:26:49 +02:00
Julius Volz
c7039c3a73 Fix blown-up scrape error display in web UI. 2015-06-24 17:22:16 +02:00
Julius Volz
535a7f2640 Update web/blog/files.go with new web content. 2015-06-24 15:26:01 +02:00
Julius Volz
bbc8b8490e Switch human-readable times to UTC.
This fixes https://github.com/prometheus/prometheus/issues/829
2015-06-23 21:26:05 +02:00
Julius Volz
d868264bb8 Improve UI of /alerts page.
Changes to the UI:
- "Active Since" timestamps are now human-readable.
- Alerting rules are now pretty-printed better.
- Labels are no longer just strings, but alert bubbles (like we do on
  the status page for base labels).
- Alert states and target health states are now capitalized in the
  presentation layer rather than at the source.
2015-06-23 18:48:45 +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
1eff186555 Merge pull request #810 from prometheus/fabxc/lmatch
Match empty labels.
2015-06-22 15:45:50 +02:00
Fabian Reinartz
5b91ea9b36 storage: improve label matching and allow unset matching.
Matching of empty labels now also matches metrics where the label
was not explicitly set to the empty string.
2015-06-22 15:33:44 +02:00
Fabian Reinartz
94cd321be1 promql: error if all label matchers are empty. 2015-06-22 15:33:44 +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
Brian Brazil
27ef54263e Web: Format files.go when it is built.
This will avoid unrelated changes appearing
when you do a make fmt
2015-06-13 15:27:08 +01:00
Julius Volz
b9b20fd80e Always show selected range, regardless of returned data. 2015-06-12 17:22:06 +02:00
Julius Volz
395a0b3b11 Merge pull request #799 from prometheus/multiline-expr-input
Change expression input field to multi-line textarea.
2015-06-12 17:03:54 +02:00
Julius Volz
8bb578c1fe Change expression input field to multi-line textarea.
Also, rearrange and clean up some things to make this work.
The textarea starts as a single line, but auto-expands when entering
multiple lines (e.g. via Shift+Enter). Pressing just "Enter" still
executes the expression.
2015-06-12 16:59:38 +02:00
Fabian Reinartz
8d304d95e5 make: do not call go-bindata on building. 2015-06-12 09:29:37 +02:00
Fabian Reinartz
70e0be6295 Merge pull request #783 from prometheus/fabxc/api-v1-ext
/series endpoints for API v1 and scalar range queries
2015-06-11 14:06:04 +02:00
Fabian Reinartz
7bb7e565a4 web/api: add GET and DELETE /series endpoints 2015-06-11 12:24:57 +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
7be94ce962 web/api: improve errors, add tests 2015-06-10 18:36:02 +02:00
Fabian Reinartz
75b0b7420e web/api: replace /metrics/names with /label/:name/values endpoint. 2015-06-08 23:10:52 +02:00
Fabian Reinartz
ae01a5366d Merge pull request #774 from prometheus/fabxc/api-v1
Initial API v1 implementation
2015-06-08 19:14:25 +02:00
Fabian Reinartz
5b713911e3 web/api: enable running API legacy and v1 in parallel 2015-06-08 19:11:48 +02:00
Julius Volz
adf6850853 Improve display of target labels on status page.
Instead of a "{...}"-style list, show key/value pairs as Bootstrap
labels.
2015-06-08 16:12:58 +02:00
Julius Volz
51653e7890 Merge pull request #779 from prometheus/fabxc/rule-cleanup
rule cleanup
2015-06-08 15:12:47 +02:00
Brian Brazil
b8b1d3cbac Web: Add pre-relabel labels to status page.
Figuring out what's going on with the new service discovery
and labels is difficult. Add a popover with the labels
to the target table to make things simpler, and help
discovery of potentially useful labels.
2015-06-08 12:19:01 +01:00
Fabian Reinartz
ab9c98acac web/api: add initial API v1 implementation. 2015-06-06 21:47:36 +02:00
Fabian Reinartz
5e13880201 General cleanup of rules. 2015-06-06 21:40:52 +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
Fabian Reinartz
280d11dca8 main: exit on invalid rule files on startup. 2015-06-02 18:44:41 +02:00
Fabian Reinartz
0de6edbdfc Move pkg/ to util/ 2015-06-01 21:12:32 +02:00