Commit Graph

78 Commits

Author SHA1 Message Date
Julius Volz
93670aa129 Return API errors in JSON format. 2013-01-22 02:27:26 +01:00
Julius Volz
a20bf35997 Fix whitespace with "make format". 2013-01-22 02:27:26 +01:00
Julius Volz
86e5edc7fe Add CSS styles for graphing frontend. 2013-01-22 02:27:26 +01:00
Julius Volz
cbffb18748 General graphing improvements and frontend whitespace cleanups. 2013-01-22 02:27:26 +01:00
Julius Volz
c21450a089 Use correct label name for metric name in rule. 2013-01-22 02:27:26 +01:00
Julius Volz
6929c10acf Add case-statement for OR, which still needs to be implemented. 2013-01-22 02:27:26 +01:00
Julius Volz
a555ded2b3 Add "w" (weeks) as a valid timeunit. 2013-01-22 02:27:26 +01:00
Julius Volz
2c8595f96e First graphing support. 2013-01-22 02:27:26 +01:00
Julius Volz
ebabaa46f4 Serialize matrices correctly. 2013-01-22 02:27:26 +01:00
juliusv
39b2e72eb0 Merge pull request #37 from matttproud/julius-base-labels
Add support for configured job base labels.
2013-01-21 16:55:17 -08:00
juliusv
c0266128f4 Merge pull request #38 from matttproud/julius-metric-docstrings
Add preliminary metric docstrings and empty base labels.
2013-01-17 16:49:12 -08:00
Julius Volz
6f937ee032 Add preliminary metric docstrings and empty base labels. 2013-01-18 01:37:50 +01:00
Julius Volz
80cdb0121d Add support for configured job base labels. 2013-01-18 01:10:09 +01:00
juliusv
09d543de97 Merge pull request #35 from matttproud/fix/targetpool-and-manager-queueing
``TargetManager`` and ``TargetPool`` as pointers.
2013-01-15 08:27:52 -08:00
Matt T. Proud
190e4e3fa3 `TargetManager and TargetPool` ass pointers. 2013-01-15 17:06:17 +01:00
juliusv
a7ed7cae91 Merge pull request #32 from matttproud/refactor/wrap-target-as-interface
Refactor Target into Interface to Enhance Testability
2013-01-15 07:22:15 -08:00
Matt T. Proud
9752f1e61d Refactor Target as interface for testability.
Future tests around the ``TargetPool`` and ``TargetManager`` and
friends will be a lot easier when the concrete behaviors of
``Target`` can be extracted out.  Plus, each ``Target``, I suspect,
will have its own resolution and query strategy.
2013-01-15 16:19:51 +01:00
Matt T. Proud
9af0faaefb Get `TargetPool` test working again. 2013-01-13 20:12:38 +01:00
Matt T. Proud
d772c6c2b5 Refactor target scheduling to separate facility.
``Target`` will be refactored down the road to support various
nuanced endpoint types.  Thusly incorporating the scheduling
behavior within it will be problematic.  To that end, the scheduling
behavior has been moved into a separate assistance type to improve
conciseness and testability.

``make format`` was also run.
2013-01-13 20:12:38 +01:00
Matt T. Proud
f1a4f26d3b Merge pull request #30 from matttproud/fix/get-metrics-for-labelset-semantics
``GetFingerprintsForLabelSet`` uses intersection.
2013-01-13 11:10:41 -08:00
Matt T. Proud
d9b165220e `GetFingerprintsForLabelSet` uses intersection.
This implementation needs to be cleaned up considerably, but it
should hopefully provide some breathing room.  Ultimately this will
be extracted out of the storage layer---specifically the LevelDB
hierarchy---to interface with a generic set of abstractions for a
storage system, but this will be where it remains for now.
2013-01-13 17:14:30 +01:00
Matt T. Proud
af5b376459 Merge pull request #28 from matttproud/fix/validate/retrieval-queue-behavior
Refactor target scheduling to separate facility.
2013-01-13 01:45:51 -08:00
Matt T. Proud
efe61c18fa Refactor target scheduling to separate facility.
``Target`` will be refactored down the road to support various
nuanced endpoint types.  Thusly incorporating the scheduling
behavior within it will be problematic.  To that end, the scheduling
behavior has been moved into a separate assistance type to improve
conciseness and testability.

``make format`` was also run.
2013-01-13 10:43:37 +01:00
Julius Volz
cb6eb30182 Fix state cleanup bug between rule/config parser runs.
This fixes a bug that has been annoying me minorly for some time now:
sometimes, after parse errors, a subsequent parser run would fail.  The reason
is that yylex() modifies some global variables (yytext, yydata) during its run
to keep state. To make subsequent parser runs correct, these have to be reset
before each run.

Also, close files after reading them.
2013-01-12 02:35:40 +01:00
Julius Volz
ab746d068e Set correct Content-Type header based on output format. 2013-01-11 03:17:58 +01:00
Julius Volz
84dd62fb9b Add GoREST install to Makefile.TRAVIS. 2013-01-11 02:41:04 +01:00
juliusv
f546548097 Merge pull request #27 from matttproud/julius-api
Add REST API, expression browser, and text/JSON output formats.
2013-01-10 17:37:29 -08:00
Julius Volz
17a4a442b3 Add REST API, expression browser, and text/JSON output formats. 2013-01-11 02:27:03 +01:00
Julius Volz
06162180ad Implement matrix range and boundary fetching from metrics store. 2013-01-11 01:19:27 +01:00
Julius Volz
483bd81a44 Allow grammar to parse both rules and single expressions. 2013-01-11 01:17:37 +01:00
Julius Volz
c52b959fda Fix matrix interval time calculation. 2013-01-11 01:12:34 +01:00
Julius Volz
fdf9a3aab7 Fix node type checks in arithmetic expressions. 2013-01-11 01:09:31 +01:00
Julius Volz
c4a2358551 Set correct interval in MatrixLiteral.Eval(). 2013-01-11 01:08:47 +01:00
Julius Volz
429b66019c Exclude metric name in vector arithmetric label matching. 2013-01-11 01:07:48 +01:00
juliusv
c2c8b8ad87 Merge pull request #24 from matttproud/julius-config-and-rules
Add initial config and rule language implementation.
2013-01-07 15:40:21 -08:00
Julius Volz
56384bf42a Add initial config and rule language implementation. 2013-01-07 23:43:36 +01:00
juliusv
2e865c710e Merge pull request #22 from matttproud/fix/staleness-for-last-value
Fix Stale. Pol. support in GetValueAtTime.
2013-01-07 02:27:04 -08:00
juliusv
51bf3917df Merge pull request #23 from matttproud/feature/signal-handling
Improve interruption handling.
2013-01-07 02:25:35 -08:00
Matt T. Proud
ac438e51f6 Debug corner-case seeking anomaly. 2013-01-07 11:23:09 +01:00
Matt T. Proud
aa474d3623 Improve interruption handling. 2013-01-06 23:30:46 +01:00
Matt T. Proud
be9b7942c1 Fix Stale. Pol. support in GetValueAtTime. 2013-01-06 18:36:05 +01:00
juliusv
f19ca0e8a5 Merge pull request #20 from matttproud/feature/instrument-internals
Feature/instrument internals
2013-01-05 12:26:18 -08:00
Matt T. Proud
52f52a7ee2 Include nascent instrumentation of stack. 2013-01-04 23:32:46 +01:00
juliusv
8f010c9801 Merge pull request #5 from matttproud/feature/scraping-infrastructure
Full End-to-End Scraping Infrastructure
2013-01-04 08:36:36 -08:00
Matt T. Proud
2922def8d0 Use the `TargetManager` for targets. 2013-01-04 17:17:23 +01:00
Julius Volz
45a3e0a182 Rename Target Frequency -> Interval. 2013-01-04 13:03:32 +01:00
juliusv
64dcf046b5 Merge pull request #2 from matttproud/feature/scraping-infrastructure
Create ``TargetPool`` priority queue.
2013-01-04 03:59:29 -08:00
juliusv
65694bea90 Merge pull request #3 from matttproud/fix/reduce-stochastic-test-time
Reduce work level for stochastic tests.
2013-01-04 03:32:06 -08:00
Matt T. Proud
4f7adbbe7d Reduce work level for stochastic tests.
The LevelDB stochastic tests could take a long time.

Original:
```
Matt:prometheus mtp$ make test
make -C model
protoc --go_out=generated/ data.proto
go build ./...
go test ./...
warning: building out-of-date packages:
	github.com/matttproud/golang_instrumentation/maths
	github.com/matttproud/golang_instrumentation/utility
	github.com/matttproud/golang_instrumentation/metrics
	github.com/matttproud/golang_instrumentation
installing these packages with 'go test -i ./...' will speed future tests.

?   	github.com/matttproud/prometheus	[no test files]
?   	github.com/matttproud/prometheus/coding	[no test files]
ok  	github.com/matttproud/prometheus/coding/indexable	0.012s
?   	github.com/matttproud/prometheus/model	[no test files]
?   	github.com/matttproud/prometheus/model/generated	[no test files]
?   	github.com/matttproud/prometheus/retrieval	[no test files]
?   	github.com/matttproud/prometheus/storage/metric	[no test files]
ok  	github.com/matttproud/prometheus/storage/metric/leveldb	70.800s
?   	github.com/matttproud/prometheus/storage/raw	[no test files]
?   	github.com/matttproud/prometheus/storage/raw/index	[no test files]
ok  	github.com/matttproud/prometheus/storage/raw/index/leveldb	0.012s
ok  	github.com/matttproud/prometheus/storage/raw/leveldb	0.016s
ok  	github.com/matttproud/prometheus/utility	0.012s
?   	github.com/matttproud/prometheus/utility/test	[no test files]
```

to

```
Matt:prometheus mtp$ make test
make -C model
protoc --go_out=generated/ data.proto
go build ./...
go test ./...
warning: building out-of-date packages:
	github.com/matttproud/golang_instrumentation/maths
	github.com/matttproud/golang_instrumentation/utility
	github.com/matttproud/golang_instrumentation/metrics
	github.com/matttproud/golang_instrumentation
installing these packages with 'go test -i ./...' will speed future tests.

?   	github.com/matttproud/prometheus	[no test files]
?   	github.com/matttproud/prometheus/coding	[no test files]
ok  	github.com/matttproud/prometheus/coding/indexable	0.011s
?   	github.com/matttproud/prometheus/model	[no test files]
?   	github.com/matttproud/prometheus/model/generated	[no test files]
?   	github.com/matttproud/prometheus/retrieval	[no test files]
?   	github.com/matttproud/prometheus/storage/metric	[no test files]
ok  	github.com/matttproud/prometheus/storage/metric/leveldb	2.158s
?   	github.com/matttproud/prometheus/storage/raw	[no test files]
?   	github.com/matttproud/prometheus/storage/raw/index	[no test files]
ok  	github.com/matttproud/prometheus/storage/raw/index/leveldb	0.013s
ok  	github.com/matttproud/prometheus/storage/raw/leveldb	0.013s
ok  	github.com/matttproud/prometheus/utility	0.013s
?   	github.com/matttproud/prometheus/utility/test	[no test files]
```
2013-01-04 12:27:57 +01:00
Matt T. Proud
7a9777b4b5 Create `TargetPool` priority queue.
``TargetPool`` is a pool of targets pending scraping.  For now, it
uses the ``heap.Interface`` from ``container/heap`` to provide a
priority queue for the system to scrape from the next target.

It is my supposition that we'll use a model whereby we create a
``TargetPool`` for each scrape interval, into which ``Target``
instances are registered.
2013-01-04 12:17:31 +01:00