Fix uptime metric in passenger input plugin (#3871)
This commit is contained in:
committed by
Daniel Nelson
parent
e4ce057885
commit
f1c8abd68c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user