Skip to content

Commit

Permalink
Fixed a bug in splunkpump's handling of timestamps
Browse files Browse the repository at this point in the history
- Fixed a bug with timestamp processing in splunkpump due to an ongoing issue with go. See golang/go#20555
- Updated debugging with a technique for running stopped containers
- Moved overview to images folder

Signed-off-by: Grant Curell <[email protected]>
  • Loading branch information
grantcurell committed Mar 1, 2022
1 parent 834d829 commit 910f687
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions DEBUGGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ Go into the docker-compose file you are using to run the container and change th
tail -f /dev/null
```

### Run a Stopped Container with a Command

First create a new container with `docker commit $CONTAINER_ID somename`

Next start with a new entrypoint `docker run -ti --entrypoint=something somename`

### View Anonymous Containers

If you want to view what volumes are in use when not directly specifying a volume mount you can use `docker inspect -f {{.Volumes}} <CONTAINER_ID>`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

PowerEdge Telemetry reference toolset collects the metric reports from various devices at the PowerEdge compute and outlines a reference design to integrate with external big databases for downstream analytics and visualization.

![Screenshot](overview.png)
![Screenshot](images/overview.png)

PowerEdge servers with iDRAC9 version 4.00 or higher and Datacenter license can stream server telemetry data out for downstream analytics and consumption. iDRAC telemetry data simply put is a timestamped metrics that represent various datapoints about the server components and is streamed out in a format defined by the DMTF Telemetry Redfish standard. This datapoints includes information from various sensors, storage and networking subsystem and helps IT administrators better understand health and necessary details about their server infrastructure.

Expand Down
10 changes: 8 additions & 2 deletions cmd/splunkpump/splunkpump.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,14 @@ func handleGroups(groupsChan chan *databus.DataGroup) {
for index, value := range group.Values {
timestamp, err := time.Parse(time.RFC3339, value.Timestamp)
if err != nil {
log.Printf("Error parsing timestamp for point %s: (%s) %v", value.Context+"_"+value.ID, value.Timestamp, err)
continue
// For why we do this see https://datatracker.ietf.org/doc/html/rfc3339#section-4.3
// Go does not handle time properly. See https://github.com/golang/go/issues/20555
value.Timestamp = strings.ReplaceAll(value.Timestamp, "+0000", "Z")
timestamp, err = time.Parse(time.RFC3339, value.Timestamp)
if err != nil {
log.Printf("Error parsing timestamp for point %s: (%s) %v", value.Context+"_"+value.ID, value.Timestamp, err)
continue
}
}
event := new(SplunkEvent)
event.Time = timestamp.Unix()
Expand Down
File renamed without changes

0 comments on commit 910f687

Please sign in to comment.