Fix uptime metric in passenger input plugin (#3871)

This commit is contained in:
Dennis Schön
2018-03-08 19:52:58 +01:00
committed by Daniel Nelson
parent e4ce057885
commit f1c8abd68c
2 changed files with 4 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ func (p *process) getUptime() int64 {
uptime += value * (24 * 60 * 60)
}
case strings.HasSuffix(v, "h"):
iValue := strings.TrimSuffix(v, "y")
iValue := strings.TrimSuffix(v, "h")
value, err := strconv.ParseInt(iValue, 10, 64)
if err == nil {
uptime += value * (60 * 60)