Commit graph

1721 commits

Author SHA1 Message Date
Julius Volz 44d2f7c9ba Merge pull request #664 from fabxc/gitignore
Add *.rules to ignored files.
2015-04-30 21:50:17 +02:00
Fabian Reinartz 049b8eaafb Add *.rules to ignored files. 2015-04-30 21:40:27 +02:00
Fabian Reinartz b5a8f7b8fa Cleanup, test, and document config. 2015-04-30 21:17:19 +02:00
Fabian Reinartz cb35b7d0e7 Merge pull request #657 from prometheus/fabxc/sd_relabel
Add relabelling to target management.
2015-04-30 19:43:15 +02:00
Fabian Reinartz 945c49a2dd Add relabelling to target management.
This commit adds a relabelling stage on the set of base
labels from which a target is created. It allows to drop
targets and rewrite any regular or internal label.
2015-04-30 18:46:33 +02:00
Fabian Reinartz 6649306e63 Merge pull request #660 from prometheus/fabxc/pql/parse-errs
Fix and improve parsing error output.
2015-04-30 13:31:13 +02:00
Fabian Reinartz 279831cdf1 Fix and improve parsing error output. 2015-04-30 12:19:39 +02:00
Julius Volz adba3b4daa Merge pull request #661 from prometheus/fabxc/pql/rule-stmts
Stop routing rule statements through the engine.
2015-04-29 22:55:53 +02:00
Fabian Reinartz fe935179cd Stop routing rule statements through the engine. 2015-04-29 18:01:43 +02:00
Fabian Reinartz 8d7c479fed Merge pull request #658 from prometheus/fabxc/pql/rules-manager
Rename RuleManager to Manager, remove interface.
2015-04-29 16:54:21 +02:00
Fabian Reinartz 43e291e978 Merge pull request #659 from prometheus/fabxc/pql/parse-err
Remove `name` arg from `Parse*` functions, enhance parsing errors.
2015-04-29 16:50:15 +02:00
Fabian Reinartz 479891c9be Rename RuleManager to Manager, remove interface.
This commits renames the RuleManager to Manager as the package
name is 'rules' now. The unused layer of abstraction of the
RuleManager interface is removed.
2015-04-29 16:42:10 +02:00
Fabian Reinartz 25cdff3527 Remove name arg from Parse* functions, enhance parsing errors. 2015-04-29 16:38:41 +02:00
Fabian Reinartz e668b361bc Merge pull request #654 from prometheus/fabxc/sd_cfg
Change JobConfig to ScrapeConfig.
2015-04-29 00:02:50 +02:00
Fabian Reinartz 0b619b46d6 Change JobConfig to ScrapeConfig.
This commit changes the configuration interface from job configs to scrape
configs. This includes allowing multiple ways of target definition at once
and moving DNS SD to its own config message. DNS SD can now contain multiple
DNS names per configured discovery.
2015-04-28 23:18:55 +02:00
Fabian Reinartz 95fbe51c50 Merge pull request #655 from prometheus/fabxc/promql_3
Switch Prometheus to promql package.
2015-04-28 17:56:49 +02:00
Fabian Reinartz 3ca11bcaf5 Switch Prometheus to promql package.
This commit removes all functionality from rules/ that is now handled in
promql/.
All parts of Prometheus are changed to use the promql/ package.
2015-04-28 16:19:23 +02:00
Fabian Reinartz 555b630b52 Merge pull request #650 from prometheus/fabxc/promql_2
Refactor query evaluation.
2015-04-28 14:23:19 +02:00
Fabian Reinartz 5602328c7c Refactor query evaluation.
This copies the evaluation logic from the current rules/ package.
The new engine handles the execution process from query string to final result.
It provides query timeout and cancellation and general flexibility for
future changes.

functions.go: Add evaluation implementation. Slight changes to in/out data but
	not to the processing logic.
quantile.go: No changes.
analyzer.go: No changes.
engine.go: Actually new part. Mainly consists of evaluation methods
	which were not changed.
setup_test.go: Copy of rules/helpers_test.go to setup test storage.
promql_test.go: Copy of rules/rules_test.go.
2015-04-28 14:19:05 +02:00
Julius Volz dad766e794 Merge pull request #645 from fabxc/fabxc/sd
Make target manager source based.
2015-04-27 18:30:33 +02:00
Johannes 'fish' Ziemke fb3b464f7d Write rule_checker to /bin/rule_checker 2015-04-24 17:29:42 +02:00
Johannes 'fish' Ziemke 166f492a0e Remove /etc/prometheus from volume definition 2015-04-24 16:12:31 +02:00
Johannes 'fish' Ziemke 2bb3efc69d Merge pull request #649 from sdurrheimer/master
Small size docker image refactoring
2015-04-24 16:07:03 +02:00
Fabian Reinartz 5015c2a0e8 Make target manager source based.
This commit shifts responsibility for maintaining targets from providers and
pools to the target manager. Target groups have a source name that identifies
them for updates.
2015-04-24 15:49:35 +02:00
Steve Durrheimer af99960974 Small size docker image refactoring
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-04-23 21:56:01 +02:00
Fabian Reinartz 089f019660 Merge pull request #639 from fabxc/fabxc/promql_1
Create promql package with lexer/parser.
2015-04-23 16:10:56 +02:00
Fabian Reinartz 32b7595c47 Create promql package with lexer/parser.
This commit creates a (so far unused) package. It contains the a custom
lexer/parser for the query language.

ast.go: New AST that interacts well with the parser.
lex.go: Custom lexer (new).
lex_test.go: Lexer tests (new).
parse.go: Custom parser (new).
parse_test.go: Parser tests (new).
functions.go: Changed function type, dummies for parser testing (barely changed/dummies).
printer.go: Adapted from rules/ and adjusted to new AST (mostly unchanged, few additions).
2015-04-23 16:04:50 +02:00
Julius Volz 16920f4666 Merge pull request #648 from cesanta/cesanta
Make prepare{Instant,Range}Query public
2015-04-23 14:24:11 +02:00
rojer a0c8b9abbe Make Prepare{Instant,Range}Query public
Useful for embedding the query engine.
2015-04-23 11:52:08 +01:00
Fabian Reinartz 9042b4f081 Merge pull request #644 from fabxc/fabxc/sdprep 2015-04-20 01:59:29 +02:00
Fabian Reinartz 4f8673aa88 Simplify update sync for targets, format config fixtures. 2015-04-19 10:36:26 +02:00
Julius Volz fa42ed0e7e Merge pull request #642 from brian-brazil/sort-nan
Sort NaN as the lowest value.
2015-04-17 17:11:15 +02:00
Brian Brazil 6c1689f0c6 Sort NaN as the lowest value.
Currently it ends up in a random position.
2015-04-17 15:54:06 +01:00
Julius Volz e681a57d73 Merge pull request #641 from prometheus/stddev
Add stddev and stdvar aggregation functions.
2015-04-17 01:36:44 +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
Julius Volz f35e5b54cc Merge pull request #640 from prometheus/pow
Add square root function
2015-04-17 00:23:33 +02:00
Brian Brazil 74aed55e55 Add square root function 2015-04-16 23:19:04 +01:00
Julius Volz 54f5c524e5 Merge pull request #637 from fabxc/fix/scrape_timeout
Fix scrape timeout in config.
2015-04-15 14:14:04 +02:00
Fabian Reinartz 0280d74167 Fix scrape timeout in config.
The scrape timeout helper was wrapping the scrape interval.
2015-04-15 13:46:27 +02:00
Björn Rabenstein ad7ef406d3 Merge pull request #635 from prometheus/beorn7/persistence
Improve chunk and chunkDesc loading.
2015-04-14 16:11:24 +02:00
Johannes 'fish' Ziemke defcafb33c Merge pull request #636 from sdurrheimer/master
Dockerfile improvements
2015-04-14 13:42:49 +02:00
beorn7 a052d32609 Comment improvement. 2015-04-14 10:49:43 +02:00
beorn7 66fc61f9b7 Make bufPool a member of the persistence struct. 2015-04-14 10:43:09 +02:00
Steve Durrheimer 77ddbad97f Duplicated packages already present in inherited images (mercurial => buildpack-deps:jessie-scm, gcc => golang:1.4)
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-04-14 10:01:28 +02:00
Steve Durrheimer 5a284257f0 Better package cache cleanup
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-04-14 09:36:34 +02:00
beorn7 b02d900e61 Improve chunk and chunkDesc loading.
Also, clean up some things in the code (especially introduction of the
chunkLenWithHeader constant to avoid the same expression all over the place).

Benchmark results:

BEFORE
BenchmarkLoadChunksSequentially     5000            283580 ns/op          152143 B/op        312 allocs/op
BenchmarkLoadChunksRandomly        20000             82936 ns/op           39310 B/op         99 allocs/op
BenchmarkLoadChunkDescs            10000            110833 ns/op           15092 B/op        345 allocs/op

AFTER
BenchmarkLoadChunksSequentially    10000            146785 ns/op          152285 B/op        315 allocs/op
BenchmarkLoadChunksRandomly        20000             67598 ns/op           39438 B/op        103 allocs/op
BenchmarkLoadChunkDescs            20000             99631 ns/op           12636 B/op        192 allocs/op

Note that everything is obviously loaded from the page cache (as the
benchmark runs thousands of times with very small series files). In a
real-world scenario, I expect a larger impact, as the disk operations
will more often actually hit the disk. To load ~50 sequential chunks,
this reduces the iops from 100 seeks and 100 reads to 1 seek and 1
read.
2015-04-13 21:06:04 +02:00
beorn7 c563398c68 Remove obsolete debug message. 2015-04-13 16:59:52 +02:00
Björn Rabenstein c44c81ebb0 Merge pull request #634 from fabxc/fix/dns-error
Show correct error on wrong DNS response.
2015-04-12 01:34:50 +02:00
Fabian Reinartz 36184f3530 Show correct error on wrong DNS response. 2015-04-11 16:14:38 +02:00
Björn Rabenstein 15cd8b3134 Merge pull request #633 from prometheus/beorn7/doc
Add warning about tarballs.
2015-04-10 14:57:52 +02:00