Commit graph

747 commits

Author SHA1 Message Date
Fabian Reinartz d9f836e5b8 Merge pull request #1340 from prometheus/validate-externa-url
Validate URL parameters
2016-01-27 15:49:08 +01:00
beorn7 a2cd479058 Fix calculation of chunks to persist after restart
Since we are not overestimating the number of chunks to persist
anymore, this commit also adjusts the default value for
-storage.local.memory-chunks. Update of documentation will follow.
2016-01-25 19:33:51 +01:00
Tobias Schmidt 122d73858d Validate URL parameters 2016-01-25 00:37:09 -05:00
Julius Volz b150c5768c Add missing word in comment. 2016-01-21 01:37:08 +01:00
Fabian Reinartz 7e1b39c682 Fix startup/teardown order, add documentation 2016-01-18 17:34:25 +01:00
beorn7 4221c7de5c Improve handling of series file truncation
If only very few chunks are to be truncated from a very large series
file, the rewrite of the file is a lorge overhead. With this change, a
certain ratio of the file has to be dropped to make it happen. While
only causing disk overhead at about the same ratio (by default 10%),
it will cut down I/O by a lot in above scenario.
2016-01-11 16:42:10 +01:00
Fabian Reinartz 37d80c4b25 Fix premature rule evaluation
This commit prevents rule evaluation from starting until after
the storage is ready.
2016-01-08 17:51:22 +01:00
Richard Hartmann 7da42eee6e main.go: Remove warning about external_labels 2016-01-07 11:15:14 +01:00
Julius Volz 87d1831f12 Document INFLUXDB_PW env var in username flag
Fixes https://github.com/prometheus/prometheus/issues/1281
2016-01-04 00:18:41 +01:00
Fabian Reinartz 62075aa037 Reduce noisy no-alertmanager warning 2015-12-17 15:42:26 +01:00
Fabian Reinartz 52e5224f5a Refactor rules/ package 2015-12-17 15:42:25 +01:00
Fabian Reinartz 2c8a96ecdc Adjust notification handler flags 2015-12-11 15:17:32 +01:00
Fabian Reinartz e114ce0ff7 Refactor notification handler 2015-12-11 15:17:32 +01:00
Fabian Reinartz a542cc8609 Remove -web.use-local-assets 2015-11-11 17:58:03 +01:00
Corentin Chary a2e4439086 Add support for remote storage on Graphite
Allows to use graphite over tcp or udp. Metrics labels
and values are used to construct a valid Graphite path
in a way that will allow us to eventually read them back
and reconstruct the metrics.

For example, this metric:

model.Metric{
	model.MetricNameLabel: "test:metric",
	"testlabel":           "test:value",
	"testlabel2":           "test:value",
)

Will become:

test:metric.testlabel=test:value.testlabel2=test:value

escape.go takes care of escaping values to match Graphite
character set, it basically uses percent-encoding as a fallback
wich will work pretty will in the graphite/grafana world.

The remote storage module also has an optional 'prefix' parameter
to prefix all metrics with a path (for example, 'prometheus.').

Graphite URLs are simply in the form tcp://host:port or
udp://host:port.
2015-11-10 07:58:57 +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
Julius Volz 24d0d9190e Make -web.external-url help string more verbose. 2015-09-16 20:35:23 +02:00
Julius Volz eeb1da36ac Fix InfluxDB write support to work with InfluxDB 0.9.x.
Because the InfluxDB client library currently pulls in multiple MBs of
unnecessary dependencies, I have modified and cut up the vendored
version to only pull in the few pieces that are actually needed.

On InfluxDB's side, this dependency issue is tracked in:

https://github.com/influxdb/influxdb/issues/3447

Hopefully, it will be resolved soon.

If a password is needed for InfluxDB, it may be supplied via the
INFLUXDB_PW environment variable.
2015-09-16 17:40:03 +02:00
Julius Volz af513468eb Fix some dead code, missing error checks, shadowings.
I applied
https://medium.com/@jgautheron/quality-pipeline-for-go-projects-497e34d6567
and was greeted with a deluge of warnings, most of which were not
applicable or really fixable realistically. These are some of the first
ones I decided to fix.
2015-09-14 12:21:34 +02:00
Julius Volz d73c8a4f0b Remove notice about 0.14.x config file format change. 2015-09-11 16:43:04 +02:00
Jimmi Dyson ec04ba38a2 Kubernetes SD config check 2015-09-09 13:24:44 +01:00
Jimmi Dyson a1574aa2b3 Move TLS options to scrape config
Fixes #1013, fixes #989
2015-09-09 09:52:21 +01:00
Fabian Reinartz d839980fcb Merge pull request #1051 from prometheus/globallabels
Change global label handling
2015-09-03 16:52:59 +02:00
Fabian Reinartz 8fa719f778 Attach global labels to remote storage samples 2015-09-03 16:38:04 +02:00
Fabian Reinartz 5fed076a76 Attach global labels to outgoing alerts. 2015-09-03 16:38:04 +02:00
Fabian Reinartz 9bbd9264e2 Add global labels to federation 2015-09-03 16:38:03 +02:00
Silas Snider b2cb637f97 Add instrumentation around configuration reloads.
This commit enables automation (and alerting) around attempts to update prometheus
server configuration automatically.
2015-09-02 10:08:51 -07: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
Julius Volz 274e9d6955 Exit when web server encounters a startup error 2015-08-20 18:23:57 +02:00
Fabian Reinartz 18c0f347a3 Fix loop-reloading on shutdown 2015-08-14 16:29:34 +02:00
Jan Berktold 2bf7048dbb Add reload handler to web 2015-08-11 11:27:15 +02:00
Fabian Reinartz 73f1cc807d Check token and cert file existence in promtool 2015-08-10 11:42:29 +02:00
Fabian Reinartz 7a67472fc1 Resolve relative paths on configuration loading
This moves the concern of resolving the files relative to the config
file into the configuration loading itself.
It also fixes #921 which did not load the cert and token files relatively.
2015-08-05 18:08:04 +02:00
Fabian Reinartz 7e615dcdf0 cmd/promtool: resolve rule files relative to config file 2015-07-03 15:10:37 +02:00
Fabian Reinartz feb8a03503 rules: load rule files relative to a base dir 2015-07-03 15:10:37 +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 b201725d1c cmd/prometheus: fix remote storage fanout 2015-06-26 01:34:51 +02:00
Julius Volz 8887f1e1a2 Merge pull request #853 from prometheus/fabxc/help
cmd/prometheus: improve help output
2015-06-25 18:59:01 +02:00
Fabian Reinartz 525070419b cmd/prometheus: improve help output 2015-06-25 18:53:51 +02:00
Fabian Reinartz bcc8101d9e cmd/promtool: fix missing builddate in version info 2015-06-25 17:21:24 +02:00
Fabian Reinartz 23e77450ff main: cleanup initialization of remote storage. 2015-06-23 18:24:48 +02:00
Fabian Reinartz ccbc801d19 Merge pull request #816 from prometheus/fabxc/promctl
Create promtool command
2015-06-22 16:40:09 +02:00
Fabian Reinartz 890c1a7e74 cmd/promtool: add promtool command.
The promtool command should bundle multiple commands that help
in maintaining a running Prometheus server.
2015-06-22 16:06:18 +02:00
Fabian Reinartz f97db8d4e5 cmd/prometheus: fix version output 2015-06-18 12:53:00 +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 de66e32a4d cmd/prometheus: create new main package. 2015-06-15 19:01:06 +02:00