diff --git a/plugins/ptp_operator/metrics/logparser.go b/plugins/ptp_operator/metrics/logparser.go index c538328c..c9fb61f8 100644 --- a/plugins/ptp_operator/metrics/logparser.go +++ b/plugins/ptp_operator/metrics/logparser.go @@ -370,7 +370,6 @@ func (p *PTPEventManager) ParseGMLogs(processName, configName, output string, fi SyncState.With(map[string]string{"process": processName, "node": ptpNodeName, "iface": alias}).Set(GetSyncStateID(syncState)) // status metrics ptpStats[masterType].SetPtpDependentEventState(clockState, ptpStats.HasMetrics(processName), ptpStats.HasMetricHelp(processName)) - ptpStats[masterType].SetLastSyncState(clockState.State) ptpStats[masterType].SetAlias(alias) // If GM is locked/Freerun/Holdover then ptp state change event diff --git a/plugins/ptp_operator/metrics/metrics_test.go b/plugins/ptp_operator/metrics/metrics_test.go index 52058992..c0f528e1 100644 --- a/plugins/ptp_operator/metrics/metrics_test.go +++ b/plugins/ptp_operator/metrics/metrics_test.go @@ -280,6 +280,7 @@ var testCases = []TestCase{ expectedNmeaStatus: SKIP, expectedPpsStatus: SKIP, expectedClockClassMetrics: SKIP, + expectedEvent: ptp.PtpStateChange, }, { log: "gnss[1000000500]:[ts2phc.0.config] ens2f1 gnss_status 3 offset 5 s2",