Commit graph

541 commits

Author SHA1 Message Date
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 2ea2e89c97 Merge pull request #244 from prometheus/feature/database-statistics-exposition
Simplify compaction and expose database sizes.
2013-05-14 03:31:15 -07:00
Matt T. Proud b224251981 Simplify compaction and expose database sizes.
This commit simplifies the way that compactions across a database's
keyspace occur due to reading the LevelDB internals. Secondarily it
introduces the database size estimation mechanisms.

Include database health and help interfaces.

Add database statistics; remove status goroutines.

This commit kills the use of Go routines to expose status throughout
the web components of Prometheus. It also dumps raw LevelDB status
on a separate /databases endpoint.
2013-05-14 12:29:53 +02:00
juliusv 92ad65ff13 Merge pull request #232 from prometheus/optimize/granular-storage-locking
Synchronous memory appends and more fine-grained storage locks.
2013-05-13 10:11:57 -07:00
Matt T. Proud dad20c15e7 Merge pull request #243 from prometheus/feature/size-exposition
Simplify compaction and expose database sizes.
2013-05-13 04:19:28 -07:00
Matt T. Proud 1f7f89b4e3 Simplify compaction and expose database sizes.
This commit simplifies the way that compactions across a database's
keyspace occur due to reading the LevelDB internals.  Secondarily it
introduces the database size estimation mechanisms.
2013-05-13 13:15:35 +02:00
Matt T. Proud 5b183f6434 Merge pull request #242 from prometheus/feature/storage/long-tail-deletion
Include long-tail data deletion mechanism.
2013-05-13 02:05:44 -07:00
Matt T. Proud d538b0382f Include long-tail data deletion mechanism.
This commit introduces the long-tail deletion mechanism, which will
automatically cull old sample values.  It is an acceptable
hold-over until we get a resampling pipeline implemented.

Kill legacy OS X documentation, too.
2013-05-13 10:54:36 +02:00
Julius Volz ce1ee444f1 Synchronous memory appends and more fine-grained storage locks.
This does two things:

1) Make TieredStorage.AppendSamples() write directly to memory instead of
   buffering to a channel first. This is needed in cases where a rule might
   immediately need the data generated by a previous rule.

2) Replace the single storage mutex by two new ones:
   - memoryMutex - needs to be locked at any time that two concurrent
                   goroutines could be accessing (via read or write) the
                   TieredStorage memoryArena.
   - memoryDeleteMutex - used to prevent any deletion of samples from
                         memoryArena as long as renderView is running and
                         assembling data from it.
   The LevelDB disk storage does not need to be protected by a mutex when
   rendering a view since renderView works off a LevelDB snapshot.

The rationale against adding memoryMutex directly to the memory storage: taking
a mutex does come with a small inherent time cost, and taking it is only
required in few places. In fact, no locking is required for the memory storage
instance which is part of a view (and not the TieredStorage).
2013-05-10 17:15:52 +02:00
Matt T. Proud 2a047fe416 Merge pull request #236 from prometheus/feature/tools/compactor
Expose interfaces for pruner and make pruner tool.
2013-05-10 08:09:04 -07:00
Matt T. Proud fa6a1f97d0 Expose interfaces for pruner and make pruner tool.
In order to run database cleanups and diagnostics, we should have
a means for pruning a database---even if LevelDB does this for us.
2013-05-10 17:07:03 +02:00
juliusv 76521c3ff0 Merge pull request #234 from prometheus/feature/storage/long-tail-deletion
Include deletion processor for long-tail values.
2013-05-10 03:26:13 -07: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
juliusv 8d062ebb27 Merge pull request #219 from prometheus/refactor/version-protocol-buffer
Include generated Protocol Buffers artifacts.
2013-05-09 12:29:42 -07:00
juliusv 0dc15d28cb Merge pull request #233 from prometheus/feature/count-by
Implement a COUNT ... BY aggregation operator.
2013-05-09 12:26:31 -07:00
Matt T. Proud 38d839d810 Include generated Protocol Buffers artifacts.
This commit reduces the general compile time dependencies to omit
the Protocol Buffer compiler and the Go Protocol Buffer generator
tool.  The build steps to furnish them still remain, but they can
optionally be called if data.proto or config.proto are under work.
2013-05-08 21:16:39 +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
Bernerd Schaefer 1c9b5b6b8d Merge pull request #221 from prometheus/fix/race-conditions
Fix/document race conditions
2013-05-07 09:20:16 -07:00
Bernerd Schaefer a07b89d411 Document go-1.1 race detector with prometheus 2013-05-07 18:15:17 +02:00
Bernerd Schaefer cdde766f39 Embed mutex on web status handler 2013-05-07 18:15:17 +02:00
Bernerd Schaefer 7740167654 Add comments about potential race conditions 2013-05-07 18:15:17 +02:00
Bernerd Schaefer 9183302b1f Web handler returns 404 for favicon requests 2013-05-07 18:15:17 +02:00
Bernerd Schaefer b886a14cfc Remove race conditions from UncertaintyGroup 2013-05-07 18:15:16 +02:00
Matt T. Proud 7f548a4297 Merge pull request #228 from prometheus/feature/storage/compaction
Schedule the background compactors to run.
2013-05-07 08:50:01 -07:00
Matt Proud 7f0d816574 Schedule the background compactors to run.
This commit introduces three background compactors, which compact
sparse samples together.

1. Older than five minutes is grouped together into chunks of 50 every 30
   minutes.

2. Older than 60 minutes is grouped together into chunks of 250 every 50
   minutes.

3. Older than one day is grouped together into chunks of 5000 every 70
   minutes.
2013-05-07 17:14:04 +02:00
juliusv 6551356af4 Merge pull request #227 from prometheus/fix/build-errors
Fix build errors and add default build step to "make".
2013-05-07 06:55:05 -07:00
Julius Volz af7920126c Fix build errors and add default build step to "make". 2013-05-07 15:54:41 +02:00
juliusv 984fd7c184 Merge pull request #226 from prometheus/refactor/repointerize-tiered-storage
Repointerize TieredStorage method receiver types.
2013-05-07 06:21:33 -07:00
Julius Volz caab131ada Repointerize TieredStorage method receiver types. 2013-05-07 15:12:33 +02:00
juliusv f1a634f580 Merge pull request #224 from prometheus/refactor/non-global-storage
Make AST query storage non-global.
2013-05-07 04:27:41 -07:00
juliusv 89de116ea9 Merge pull request #225 from prometheus/refactor/fmt-cleanups
Slice expression simplifications.
2013-05-07 04:27:27 -07:00
Julius Volz 05afa970d2 Slice expression simplifications. 2013-05-07 13:22:29 +02:00
Julius Volz 56324d8ce2 Make AST query storage non-global. 2013-05-07 13:15:10 +02:00
Matt T. Proud 76dad4307d Merge pull request #223 from prometheus/feature/refactor/storage-exposition
Expose TieredStorage.DiskStorage.
2013-05-07 03:35:01 -07:00
Matt T. Proud f897164bcf Expose TieredStorage.DiskStorage. 2013-05-07 10:26:28 +02:00
Matt T. Proud 4872ec7577 Merge pull request #218 from prometheus/refactor/directory-structure
Make Web Serving Stack's Dependencies Concrete
2013-05-06 02:15:41 -07:00
Matt T. Proud 3b9b1c6ab4 Define dependencies for web. stack concretely.
This commit destroys the use of AppState, which makes passing
concrete state along to various serving components onerous.
2013-05-06 11:13:12 +02:00
juliusv cfc3b1053d Merge pull request #212 from prometheus/ui/smaller-navigation-links
Restyle navigation a bit, align content elements with it
2013-05-03 07:00:09 -07:00
Matt T. Proud ad74232f49 Merge pull request #215 from prometheus/refactor/storage/publicization
Storage interface to TieredStorage.
2013-05-03 06:58:56 -07:00
juliusv 2935476818 Merge pull request #211 from prometheus/feature/reorder-hud-elements
Move build info to the top of the status HUD.
2013-05-03 06:56:45 -07:00
Julius Volz 04e661c28f Move build info to the top of the status HUD. 2013-05-03 15:54:32 +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 f3cf8eae7e Restyle navigation a bit, align content elements with it. 2013-05-03 15:49:08 +02:00
Bernerd Schaefer 59e5ddeed3 Merge pull request #213 from prometheus/fix/goroutine-leak-in-append-samples
Fix goroutine leak in leveldb.AppendSamples
2013-05-03 03:31:18 -07:00
Bernerd Schaefer 5eb9840ed7 Fix goroutine leak in leveldb.AppendSamples
The error channels in AppendSamples need to be buffered, since in the
presence of errors their values may not be consumed.
2013-05-03 12:13:05 +02:00
Johannes 'fish' Ziemke c5e507cd9c Never submit empty queries. 2013-05-02 16:55:47 +02:00
Matt T. Proud 5a07e8a7c6 Merge pull request #210 from prometheus/refactor/storage/publicization
Publicize a few storage components for curation.
2013-05-02 04:30:37 -07:00
Matt T. Proud a3f1d81e24 Publicize a few storage components for curation.
This commit introduces the publicization of Stop and other
components, which the compaction curator shall take advantage
of.
2013-05-02 13:16:04 +02:00
juliusv 2b9ba56d61 Merge pull request #208 from prometheus/feature/toggle-console
Add the console to the main/graph ui.
2013-05-02 04:05:53 -07:00
Matt T. Proud 4298bab2b0 Publicize Curator and Processors.
This commit publicizes the curation and processor frameworks for
purposes of making them available in the main processor loop.
2013-05-02 12:37:24 +02:00