Skip to content

Commit 793bcc8

Browse files
authored
Merge pull request #8 from neotel-at/log-process-state
Add state to processed process logging
2 parents 333689a + b763b6f commit 793bcc8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ func processBaseMetrics(prefix string, state c5StateResponse, attrs []MetricAttr
550550
}
551551
tmp := append(attrs, MetricAttribute{"version", version})
552552
tmp = append(tmp, MetricAttribute{"starttime", startupTime})
553+
tmp = append(tmp, MetricAttribute{"state", strings.TrimSpace(strings.Join([]string{state.ProxyState, state.QueueState, state.RegistrarState, state.NotificationServerState, state.CstaState}, " "))})
553554
logInfo("Processed", prefix, tmp)
554555
setMetricValue(buildMetricName(prefix, `info`, tmp), 1)
555556

0 commit comments

Comments
 (0)