add exit code
This commit is contained in:
parent
ebc0e18687
commit
c9bb45384a
|
|
@ -321,8 +321,11 @@ func createPodContainerStatusLastTerminatedReasonFamilyGenerator() generator.Fam
|
|||
for _, cs := range p.Status.ContainerStatuses {
|
||||
if cs.LastTerminationState.Terminated != nil {
|
||||
ms = append(ms, &metric.Metric{
|
||||
LabelKeys: []string{"container", "reason"},
|
||||
LabelValues: []string{cs.Name, cs.LastTerminationState.Terminated.Reason},
|
||||
LabelKeys: []string{"container", "reason", "exitcode"},
|
||||
LabelValues: []string{
|
||||
cs.Name,
|
||||
cs.LastTerminationState.Terminated.Reason,
|
||||
strconv.Itoa(int(cs.LastTerminationState.Terminated.ExitCode))},
|
||||
Value: 1,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue