Commit graph

78 commits

Author SHA1 Message Date
Bernerd Schaefer aa96c7d141 Fix rules_test.go
This is smelly, but for now we copy a helper method from the metric
tests into rules.
2013-05-14 16:55:18 +02:00
Bernerd Schaefer 428d91c86f Rename test helper files to helpers_test.go
This ensures that these files are properly included only in testing.
2013-05-14 16:30:47 +02:00
Matt T. Proud 244a4a9cdb Update to go1.1.
This commit updates the documentation, Makefiles, formatting, and
code semantics to support the 1.1. runtime, which includes ...

1. ``make advice``,

2. ``make format``, and

3. ``go fix`` on various targets.
2013-05-14 12:39:08 +02:00
Matt T. Proud 161c8fbf9b Include deletion processor for long-tail values.
This commit extracts the model.Values truncation behavior into the actual
tiered storage, which uses it and behaves in a peculiar way—notably the
retention of previous elements if the chunk were to ever go empty.  This is
done to enable interpolation between sparse sample values in the evaluation
cycle.  Nothing necessarily new here—just an extraction.

Now, the model.Values TruncateBefore functionality would do what a user
would expect without any surprises, which is required for the
DeletionProcessor, which may decide to split a large chunk in two if it
determines that the chunk contains the cut-off time.
2013-05-10 12:19:12 +02:00
Julius Volz 0877680761 Implement a COUNT ... BY aggregation operator.
This also removes the now obsolete scalar count() function and corrects the
expressions test naming (broken in
2202cd71c9 (L6R59))
so that the expression tests will actually run.
2013-05-08 16:35:16 +02:00
Julius Volz 56324d8ce2 Make AST query storage non-global. 2013-05-07 13:15:10 +02:00
Matt T. Proud ce45787dbf Storage interface to TieredStorage.
This commit drops the Storage interface and just replaces it with a
publicized TieredStorage type.  Storage had been anticipated to be
used as a wrapper for testability but just was not used due to
practicality.  Merely overengineered.  My bad.  Anyway, we will
eventually instantiate the TieredStorage dependencies in main.go and
pass them in for more intelligent lifecycle management.

These changes will pave the way for managing the curators without
Law of Demeter violations.
2013-05-03 15:54:14 +02:00
Julius Volz 9cea5d9df8 Convert the Prometheus configuration to protocol buffers. 2013-04-30 22:26:00 +02:00
Julius Volz d8110fcd9c Send sample arrays instead of single samples over channels. 2013-04-29 17:24:17 +02:00
Julius Volz dcf2e82752 Cleanup and idiomaticize rule/expression dot graph output. 2013-04-29 12:57:34 +02:00
Matt T. Proud b3e34c6658 Implement batch database sample curator.
This commit introduces to Prometheus a batch database sample curator,
which corroborates the high watermarks for sample series against the
curation watermark table to see whether a curator of a given type
needs to be run.

The curator is an abstract executor, which runs various curation
strategies across the database.  It remarks the progress for each
type of curation processor that runs for a given sample series.

A curation procesor is responsible for effectuating the underlying
batch changes that are request.  In this commit, we introduce the
CompactionProcessor, which takes several bits of runtime metadata and
combine sparse sample entries in the database together to form larger
groups.  For instance, for a given series it would be possible to
have the curator effectuate the following grouping:

- Samples Older than Two Weeks: Grouped into Bunches of 10000
- Samples Older than One Week: Grouped into Bunches of 1000
- Samples Older than One Day: Grouped into Bunches of 100
- Samples Older than One Hour: Grouped into Bunches of 10

The benefits hereof of such a compaction are 1. a smaller search
space in the database keyspace, 2. better employment of compression
for repetious values, and 3. reduced seek times.
2013-04-27 17:38:18 +02:00
Julius Volz 2202cd71c9 Track alerts over time and write out alert timeseries. 2013-04-26 14:35:21 +02:00
Julius Volz c0601abf46 Implement initial no-op alert parsing and rule parsing tests. 2013-04-23 13:48:24 +02:00
Matt T. Proud f9e99bd08a Refresh SampleValue to 64-bit floating point.
We always knew that this needed to be fixed.
2013-04-21 20:31:50 +02:00
Julius Volz 99dcbe0f94 Integrate memory and disk layers in view rendering. 2013-04-19 16:01:27 +02:00
Julius Volz 63625bd244 Make view use memory persistence, remove obsolete code.
This makes the memory persistence the backing store for views and
adjusts the MetricPersistence interface accordingly. It also removes
unused Get* method implementations from the LevelDB persistence so they
don't need to be adapted to the new interface. In the future, we should
rethink these interfaces.

All staleness and interpolation handling is now removed from the storage
layer and will be handled only by the query layer in the future.
2013-04-18 22:26:29 +02:00
Julius Volz 1eb586db7d Fix rule evaluation closure. 2013-04-17 15:11:21 +02:00
Julius Volz 5f5ea03105 Run "make format". 2013-04-16 17:23:59 +02:00
Julius Volz 1cff4f3d91 Fix rate() per-second adjustment.
This got broken during the depointerization of the Vector type.
2013-04-15 14:41:34 +02:00
juliusv 62f33f1fc2 Merge pull request #138 from prometheus/julius-fix-aliasing
Correct delta()/rate() intervals and temporal aliasing.
2013-04-15 05:38:48 -07:00
Matt T. Proud 167504efd6 Merge pull request #142 from prometheus/julius-lowercase-by
Allow lower-case BY operator.
2013-04-15 05:13:35 -07:00
Julius Volz d53b8cf956 Correct delta()/rate() intervals and temporal aliasing. 2013-04-15 12:30:46 +02:00
Julius Volz 000f6a2e23 Allow lower-case BY operator. 2013-04-15 11:56:23 +02:00
Julius Volz a0d311c9e6 Constantize job name label. 2013-04-15 11:47:54 +02:00
Julius Volz 1bc83e1b65 Also allow lower-cased aggregation ops. 2013-04-11 18:25:22 +02:00
juliusv f9c291120f Merge pull request #123 from prometheus/julius-propagate-rule-errors
Propagate more errors during rule evaluation.
2013-04-11 06:38:33 -07:00
Julius Volz 9a81b9838f Make expression parser goroutine-safe.
See https://github.com/prometheus/prometheus/issues/127
2013-04-10 19:17:28 +02:00
Julius Volz 6cb3c51d24 Add sort() and sort_desc() expression language functions. 2013-04-10 18:05:45 +02:00
Julius Volz c4d0969c00 Propagate more errors during rule evaluation. 2013-04-09 13:47:20 +02:00
Julius Volz e31591e6fe Allow single-letter identifiers (metric and label names). 2013-03-28 18:37:54 +01:00
Julius Volz ec413459fa Depointerize Matrix/Vector types as well as time.Time arguments. 2013-03-28 18:07:12 +01:00
Julius Volz 676845afaf Implement sample interpolation in query layer. 2013-03-28 16:41:51 +01:00
Matt T. Proud c53a72a894 Test data for the curator. 2013-03-27 18:13:43 +01:00
Julius Volz b836066c71 Eliminate need to get fingerprints during query execution time. 2013-03-27 14:42:03 +01:00
Julius Volz 55ca65aa6e More userfriendly output when we fail to create the tiered storage. 2013-03-27 11:25:05 +01:00
Matt T. Proud c4e971d7d9 Merge pull request #101 from prometheus/refactor/test/directory-extraction
Create temporary directory handler.
2013-03-26 10:46:28 -07:00
Matt T. Proud b86b0ea41a Create temporary directory handler. 2013-03-26 18:09:25 +01:00
Julius Volz 2b8f0b2cc7 Constantize metric name label name. 2013-03-26 16:20:23 +01:00
Julius Volz 3880a86c9c In case of empty query results, return an empty matrix. 2013-03-25 12:14:48 +01:00
Julius Volz 8e4c5b0cea Use AST query analyzer and views with tiered storage. 2013-03-21 18:16:52 +01:00
Julius Volz 2f814d0e6d AST persistence adapter simplifications after storage changes. 2013-03-21 18:11:03 +01:00
Julius Volz 6001d22f87 Change Get* methods to receive fingerprints instead of metrics. 2013-03-21 18:11:03 +01:00
Matt T. Proud 5959cd9e53 Include Julius' feedback. 2013-03-21 18:08:48 +01:00
Matt T. Proud a70ee43ad3 Niladic `ToString() to idiomatic String()`. 2013-03-21 18:08:47 +01:00
Matt T. Proud 41068c2e84 Checkpoint. 2013-03-21 18:06:51 +01:00
Matt T. Proud 13ae29b304 Initial in-memory arena implementation.
It is unbounded, and nothing uses it except for a gating flag in main.
2013-02-18 09:38:14 -06:00
Julius Volz c3d31febd6 Move durationToString to common place and cleanup error handling. 2013-02-14 19:02:23 +01:00
Matt T. Proud efbe0e8a12 Interface simplification.
GetMetricForFingerprint(model.Fingerprint) (*Metric, error) ->
GetMetricForFingerprint(model.Fingerprint) (Metric, error)
2013-02-14 08:43:02 -08:00
Matt T. Proud e8a733b525 Interface simplifications.
GetFingerprintsForLabelSet ([]*Fingerprint, error) ->
GetFingerprintsForLabelSet ([]Fingerprint, error)
2013-02-14 08:07:59 -08:00
Matt T. Proud f03091b139 Interface simplifications: GetRangeValues
From pointers to copies.
2013-02-13 21:11:23 -08:00