Commit Graph

95 Commits (e6aa5023eb4e54dbde7e8133ea426aec46fda9c2)

Author SHA1 Message Date
Jason Wilder c8ba179731 Batch up writes for monitor service
The monitor service was writing one big batch for all stats.  If this
batch was large, it causes some slower and more expensive write paths
to be taken that incur a lot of memory allocations.  This changes the
monitor service to write in batches of up to 5000 points which should
avoid the slower paths.
2017-08-16 13:09:25 -06:00
Stuart Carnie 2de52834f0 CQ statistics written to monitor database, addresses #8188
* off by default, enabled by `query-stats-enabled`
* writes to cq_query measurement of configured monitor database
* see CHANGELOG for schema of individual points
2017-06-10 09:20:38 +08:00
Mark Rushakoff 535cf597f1 Report subset of config values in SHOW DIAGNOSTICS
This includes hand-selected config settings that are safe to expose and
not expected to include any kind of secrets.

Fixes #7821
2017-03-14 11:34:19 -07:00
Mark Rushakoff 601cbcd084 Merge branch '1.2' into mr-merge-12 2017-02-17 16:14:22 -08:00
Jonathan A. Sternberg 2fe48d6781 Rename zap import back to github.com/uber-go/zap
They rebased a revision we were previously relying upon that allowed us
to use the vanity name so we are reverting back to an older version with
the old import path.
2017-02-17 17:17:22 -06:00
Edd Robinson fb7388cdfc Remove dead code from various pkgs 2017-01-17 09:47:34 -08:00
Mark Rushakoff 6a94d200c8 Merge remote-tracking branch 'influx/master' into mr-godoc 2017-01-04 13:27:36 -08:00
Mark Rushakoff 5a24cbffeb Require database name on monitor config 2017-01-03 15:21:25 -08:00
Mark Rushakoff 53d373b39e Update godoc for the monitor package 2016-12-30 18:03:01 -08:00
Jonathan A. Sternberg ec57108520 Use proper uber-go/zap import path
It looks like the real import path to the project is go.uber.org/zap
instead of github.com/uber-go/zap since the example in the project
references that path.
2016-12-15 08:54:14 -06:00
Jonathan A. Sternberg 21502a39e8 Switch logging to use structured logging everywhere
The logging library has been switched to use uber-go/zap. While the
logging has been changed to use structured logging, this commit does not
change any of the logging statements to take advantage of the new
structured log or new log levels. Those changes will come in future
commits.
2016-12-14 10:45:15 -06:00
Abdisamad Hashi 0ea807dce1 Make monitor golintable (#7652)
* added comment on top of the Reporter interface
* fixed a capitalisation typo which threw a linting error
* added comment on top of type Statistics
* Added a proper comment to Reporter interface
* Added a proper comment to type Statistics
* Update service.go
Changed wording 'list' to 'slice'.
2016-11-28 10:47:02 +00:00
Jonathan A. Sternberg 3afdf3cd94 Merge tag 'v1.0.1' 2016-09-27 17:53:33 -05:00
Jonathan A. Sternberg ab4bca8495 Report cmdline and memstats in /debug/vars
When we refactored expvar, the cmdline and memstats sections were not
readded to the output. This adds it back if they can be found inside of
`expvar`.

It also stops trying to sort the output of the statistics so they get
returned faster. JSON doesn't need them to be sorted and it causes
enough latency problems that sorting them hurts performance.
2016-09-09 14:32:43 -05:00
Jonathan A. Sternberg 23f2d50ecb Use defaults from `meta` package for `CREATE DATABASE`
Instead of having the parser set the defaults, the command will set the
defaults so that the constants for that are actually used. This way we
can also identify which things the user provided and which ones we are
filling with default values.

This allows the meta client to be able to make smarter decisions when
determining if the user requested a conflict or if the requested
capabilities match with what is currently available. If you just say
`CREATE DATABASE WITH NAME myrp`, the user doesn't really care what the
duration of the retention policy is and just wants to use the default.
Now, we can use that information to determine if an existing retention
policy would conflict with what the user requested rather than returning
an error if a default value ever gets changed since the meta client
command can communicate intent more easily.
2016-08-30 13:23:49 -05:00
rw 8d7d89d8ed Fix "nil map" panic in statistics collection. 2016-08-23 11:45:12 -07:00
Edd Robinson 90ff713f21 Fix base64 encoding issue in stats
Fixes #7177.
2016-08-22 15:21:31 +01:00
Ben Johnson 8aa224b22d
reduce memory allocations in index
This commit changes the index to point to index data in the shards
instead of keeping it in-memory on the heap.
2016-08-16 14:09:00 -06:00
Jonathan A. Sternberg 530b00bd76 Use defaults from `meta` package for `CREATE DATABASE`
Instead of having the parser set the defaults, the command will set the
defaults so that the constants for that are actually used. This way we
can also identify which things the user provided and which ones we are
filling with default values.

This allows the meta client to be able to make smarter decisions when
determining if the user requested a conflict or if the requested
capabilities match with what is currently available. If you just say
`CREATE DATABASE WITH NAME myrp`, the user doesn't really care what the
duration of the retention policy is and just wants to use the default.
Now, we can use that information to determine if an existing retention
policy would conflict with what the user requested rather than returning
an error if a default value ever gets changed since the meta client
command can communicate intent more easily.
2016-08-09 12:00:06 -05:00
Jonathan A. Sternberg 837a9804cf Refactoring the monitor service to avoid expvar
Truncate the time interval output of the monitor service to be on even
time intervals rather than on every minute based on the start time. This
normalizes the output from the monitor service.
2016-07-07 11:13:58 -05:00
Jonathan A. Sternberg 497db2a6d3 Removing dead code from every package except influxql
The tsdb package had a substantial amount of dead code related to the
old query engine still in there. It is no longer used, so it was removed
since it was left unmaintained. There is likely still more code that is
the same, but wasn't found as part of this code cleanup.

influxql has dead code show up because of the code generation so it is
not included in this pruning.
2016-06-20 22:41:07 -05:00
Jonathan A. Sternberg b8e22d9d79 Merge pull request #6586 from influxdata/js-3733-rename-default-retention-policy
Modify the default retention policy name and make it configurable
2016-06-06 15:05:29 -05:00
Edd Robinson 774e398612 Fix deadlock in monitor 2016-06-01 17:46:01 +01:00
Joe LeGasse 47942bc842 Update comment for SetPointsWriter in the monitoring service 2016-05-27 07:28:12 -04:00
Joe LeGasse 0317228487 Update monitor to allow setting the PointsWriter
The current code is very specific to clustering, which is no longer in
the open-source project. This changes the monitor service to allow for a
custom PointsWriter, rather than the remote-writing specific endpoint
that was there previously.
2016-05-26 12:36:44 -04:00
Jonathan A. Sternberg baaa782c95 Modify the default retention policy name and make it configurable
The default retention policy name is changed to "autogen" instead of
"default" since it ends up being ambiguous when we tell a user to check
the default retention policy, it is uncertain if we are referring to the
default retention policy (which can be changed) or the retention policy
with the name "default".

Now the automatically generated retention policy name is "autogen".

The default retention policy is now also configurable through the
configuration file so an administrator can customize what they think
should be the default.

Fixes #3733.
2016-05-24 09:51:23 -04:00
Edd Robinson 0b338dddd8 Add remote monitor writer 2016-05-05 11:08:35 +01:00
Edd Robinson 2ae6a43c36 Disable Monitor when running dataonly mode 2016-05-04 18:22:01 +01:00
Edd Robinson b2d5616662 Make Monitor safer; don't set clusterID 2016-05-04 18:22:01 +01:00
Edd Robinson 8ca6cffd12 Allow Monitor to be restarted 2016-04-29 19:08:00 +01:00
Stephen Gutekanst 9dc09c5257 Make logging output location more programmatically configurable (#6213)
This has various benefits:

- Users embedding InfluxDB within other Go programs can specify a different logger / prefix easily.
- More consistent with code used elsewhere in InfluxDB (e.g. services, other `run.Server.*` fields, etc).
- This is also more efficient, because it means `executeQuery` no longer allocates a single `*log.Logger` each time it is called.
2016-04-20 21:07:08 +01:00
Edd Robinson 08ca148724 Set the retention policy on the store 2016-02-23 11:32:07 +00:00
Ben Johnson e3b4b71c13 refactor query executor
This commit moves the `QueryExecutor` to the `cluster` package
and provides an interface to it inside the `influxql` package.
2016-02-17 15:13:56 -07:00
Mark Rushakoff 5a61bdad70 Move monitor.Diagnostics to its own package
I was trying to create a Diagnostics Client in the tsdb package, but
IIRC importing `monitor` caused an import cycle of:
tsdb -> monitor -> cluster -> tsdb.

Moving Diagnostics to its own package will allow further use of
diagnostics.Client without running into import cycles.
2016-02-13 14:56:15 -08:00
Ben Johnson d9a6a7340f add canonical paths 2016-02-10 11:30:52 -07:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Jason Wilder ef524b0539 Fix monitor tests 2016-01-21 15:28:34 -05:00
Paul Dix 7b71b66e31 Update meta service, meta client, and httpd handler
* Improve the ping endpoint so that it can optionally check for leader agreement across all meta servers
* Add Ping method to the meta client
* Fix ClusterID tests
* Remove WaitForLeader from meta client and remove unnecessary references to it
2016-01-21 15:28:33 -05:00
Paul Dix f385945058 Update Server to work with new metaservice/client 2016-01-21 15:28:33 -05:00
Cory LaNou 8d878fff91 buildable meta -> services/meta 2016-01-21 15:28:32 -05:00
Philip O'Toole ddb4039564 More precise error checking
This is due to currently brittle error "marshalling" in our system, so a
more precise compare is required.

Fixes issue #5037.
2015-12-08 06:47:52 -08:00
David Norton 657877dd94 make not found err messages more consistent 2015-12-03 08:04:09 -06:00
Edd Robinson 3e4d2a1fb0 golint monitor package. Supports #4098 2015-11-22 18:42:34 +00:00
Jason Wilder 0926b19e6b Prevent creating points with NaN float values
Float values are not supported in the existing engine and the tsm1
engines.  This changes NewPoint to return an error if a field value
contains a NaN field.  It also allows us to validate fields to prevent
other unsupported types from sneaking in through other input plugins.
2015-10-27 17:12:52 -06:00
Mark Bates 3cfe4e8da5 Added JSON tags to the Statistic struct 2015-10-20 11:40:42 -04:00
Philip O'Toole 90cc2cdce2 Export Statistic type 2015-10-19 14:06:14 -07:00
Charles Chan 456a9a8ab7 Fix typos.
* meaining --> meaning
* communcation --> communication
* deterimine --> determine
* mistmatch --> mistmatch
2015-10-17 07:50:45 -07:00
Jason Wilder 53cc8aaa31 Store monitor statistics with seconds precision
influx_inspect uncovered that the monitoring database was storing it's data with almost
no compression because it recorded points at nanosecond precision but spaced them 10s apart. This
still requires 8 bytes.

Instead, store the points at seconds precision which allows the timestamp data to be run-length
encoded.
2015-10-09 22:35:43 -06:00
Philip O'Toole dba286a2e8 Update CHANGELOG 2015-10-05 15:53:46 -07:00
Philip O'Toole 899e1cc070 Only attempt monitor storage creation on leader
Since only the leader can create it, the system might as well only
attempt creation on the leader.
2015-10-05 15:46:35 -07:00