Merge pull request #2003 from influxdb/more_stats

Set timestamp when writing monitoring stats
pull/2006/merge
Philip O'Toole 2015-03-18 13:09:04 -07:00
commit f622f78ea6
3 changed files with 6 additions and 4 deletions

View File

@ -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]

View File

@ -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)

View File

@ -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)