Skip to content

Commit

Permalink
Fix timestamp bug and update changelog for release
Browse files Browse the repository at this point in the history
Signed-off-by: Nikki Attea <[email protected]>
  • Loading branch information
Nikki Attea committed May 16, 2018
1 parent a4b397d commit 996a0d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v1.1] - 2018-05-16
### Added
- `metrics.sh` script to `examples` directory

### Fixed
- Timestamp translating supports 10 digit int64 timestamps

## [v1.0] - 2018-05-14
### Added
- Initial release
1 change: 1 addition & 0 deletions examples/metrics.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cpu () {
echo $(hostname).cpu $(ps axo %cpu | awk '{ sum+=$1 } END { printf "%.1f\n", sum }' | tail -n 1) $(date +%s)
}

disk_io () {
iostat=($(iostat -K -d -c 1 disk0))
echo $(hostname).disk_io "${iostat[6]}" $(date +%s)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func sendMetrics(event *types.Event) error {
tagKey = "value"
}
fields := map[string]interface{}{tagKey: point.Value}
timestamp := time.Unix(0, point.Timestamp)
timestamp := time.Unix(point.Timestamp, 0)
tags := make(map[string]string)
for _, tag := range point.Tags {
tags[tag.Name] = tag.Value
Expand Down

0 comments on commit 996a0d2

Please sign in to comment.