Skip to content

Commit

Permalink
Monitoring database should not be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Apr 3, 2015
1 parent 5df05d1 commit 84d590c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [#2163](https://github.com/influxdb/influxdb/pull/2163): Fix up paths for default data and run storage.
- [#2164](https://github.com/influxdb/influxdb/pull/2164): Append STDOUT/STDERR in initscript.
- [#2165](https://github.com/influxdb/influxdb/pull/2165): Better name for config section for stats and diags.
- [#2165](https://github.com/influxdb/influxdb/pull/2165): Monitoring database and retention policy are not configurable.

## v0.9.0-rc19 [2015-04-01]

Expand Down
8 changes: 2 additions & 6 deletions cmd/influxd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,8 @@ type Config struct {
} `toml:"logging"`

Monitoring struct {
Enabled bool `toml:"enabled"`
Database string `toml:"database"`
RetentionPolicy string `toml:"retention-policy"`
WriteInterval Duration `toml:"write-interval"`
Enabled bool `toml:"enabled"`
WriteInterval Duration `toml:"write-interval"`
} `toml:"monitoring"`

ContinuousQuery struct {
Expand Down Expand Up @@ -196,8 +194,6 @@ func NewConfig() (*Config, error) {
c.ReportingDisabled = false

c.Monitoring.Enabled = false
c.Monitoring.Database = "_internal"
c.Monitoring.RetentionPolicy = "default"
c.Monitoring.WriteInterval = Duration(1 * time.Minute)

// Detect hostname (or set to localhost).
Expand Down
4 changes: 1 addition & 3 deletions cmd/influxd/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ enabled = true
write-tracing = true
raft-tracing = true
[statistics]
[monitoring]
enabled = true
database = "_internal"
retention-policy = "default"
write-interval = "1m"
# Configure the admin server
Expand Down
4 changes: 3 additions & 1 deletion cmd/influxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ var (

// Various constants used by the main package.
const (
messagingClientFile string = "messaging"
messagingClientFile string = "messaging"
monitoringDatabase string = "_influxdb"
monitoringRetentionPolicy string = "default"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/influxd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ func Run(config *Config, join, version string) (*messaging.Broker, *influxdb.Ser

// Start up self-monitoring if enabled.
if config.Monitoring.Enabled {
database := config.Monitoring.Database
policy := config.Monitoring.RetentionPolicy
database := monitoringDatabase
policy := monitoringRetentionPolicy
interval := time.Duration(config.Monitoring.WriteInterval)

// Ensure database exists.
Expand Down
2 changes: 0 additions & 2 deletions etc/config.sample.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,4 @@ raft-tracing = false # If true, enables detailed logging of Raft consensus.
# queried like any other data.
[monitoring]
enabled = false
database = "_internal" # The database to which the data is written.
retention-policy = "default" # The retention policy within the database.
write-interval = "1m" # Period between writing the data.

0 comments on commit 84d590c

Please sign in to comment.