add missing timestamp

This commit is contained in:
2024-04-21 15:26:00 +02:00
parent d4567abe7f
commit 05037f6f89

View File

@@ -7,6 +7,7 @@ import (
log "github.com/sirupsen/logrus"
"os/exec"
"strings"
"time"
)
type TF2Stat struct {
@@ -47,7 +48,7 @@ func main() {
escapedName = strings.ReplaceAll(escapedName, ",", `\,`)
escapedName = strings.ReplaceAll(escapedName, "=", `\=`)
// myMeasurement,tag1=value1,tag2=value2 fieldKey="fieldValue" 1556813561098000000
fmt.Printf("tf2server,address=%s,name=%s player=%di maxplayer=%di map=%q ping=%di\n", string(ip), escapedName, tStat.NumPlayers, tStat.MaxPlayers, tStat.Map, tStat.Ping)
fmt.Printf("tf2server,address=%s,name=%s player=%di maxplayer=%di map=%q ping=%di %d\n", string(ip), escapedName, tStat.NumPlayers, tStat.MaxPlayers, tStat.Map, tStat.Ping, time.Now().UnixMilli())
}
}