Skip to content

Commit

Permalink
Merge pull request #2003 from influxdb/more_stats
Browse files Browse the repository at this point in the history
Set timestamp when writing monitoring stats
  • Loading branch information
otoolep committed Mar 18, 2015
2 parents 060066a + bed1bdb commit f622f78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Bugfixes
- [#2001](https://github.com/influxdb/influxdb/pull/2001): Ensure measurement not found returns status code 200.
- [#1985](https://github.com/influxdb/influxdb/pull/1985): Set content-type JSON header before actually writing header. Thanks @dstrek.
- [#2003](https://github.com/influxdb/influxdb/pull/2003): Set timestamp when writing monitoring stats.

## v0.9.0-rc14 [2015-03-18]

Expand Down
2 changes: 1 addition & 1 deletion cmd/influxd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func NewConfig() *Config {
c.ReportingDisabled = false

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

Expand Down
7 changes: 4 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,10 @@ func (s *Server) StartSelfMonitoring(database, retention string, interval time.D

// Create the data point and write it.
point := Point{
Name: s.stats.Name(),
Tags: map[string]string{"raftID": strconv.FormatUint(s.id, 10)},
Fields: make(map[string]interface{}),
Timestamp: time.Now(),
Name: s.stats.Name(),
Tags: map[string]string{"raftID": strconv.FormatUint(s.id, 10)},
Fields: make(map[string]interface{}),
}
s.stats.Walk(func(k string, v int64) {
point.Fields[k] = int(v)
Expand Down

0 comments on commit f622f78

Please sign in to comment.