I think it would be more cleaner if we rename metrics name with _master, _sys, _phc suffix Something like this, use attribute openshift_ptp_offset{source="master" iface="ens5fx",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="ptp4l"} openshift_ptp_offset{source="phc" iface="CLOCK_REALTIME",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} openshift_ptp_offset{source="phc" iface="ens5f1",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} openshift_ptp_offset{source="sys" iface="ens5f2",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"}
The issue is verified according to the last comment #4 marzianor@localhost ptp]$ oc -n openshift-ptp exec linuxptp-daemon-vvr4b -c cloud-event-proxy -- curl 127.0.0.1:9091/metrics | grep "openshift_ptp_offset" # HELP openshift_ptp_offset_ns # TYPE openshift_ptp_offset_ns gauge openshift_ptp_offset_ns{from="master",iface="ens5fx",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="ptp4l"} -19 openshift_ptp_offset_ns{from="phc",iface="CLOCK_REALTIME",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} -12 openshift_ptp_offset_ns{from="phc",iface="ens5f1",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} -12 oc -n openshift-ptp exec linuxptp-daemon-vvr4b -c linuxptp-daemon-container -- curl 127.0.0.1:9091/metrics % Total % Received % Xferd Average Speed Time Time Time # HELP cne_api_events_published Metric to get number of events published by the rest api # TYPE cne_api_events_published gauge cne_api_events_published{address="/cluster/node/cnfde7.ptp.lab.eng.bos.redhat.com/ptp",status="success"} 3530 # HELP cne_api_publishers Metric to get number of publishers # TYPE cne_api_publishers gauge cne_api_publishers{status="active"} 1 # HELP cne_events_ack Metric to get number of events produced # TYPE cne_events_ack gauge cne_events_ack{status="success",type="/cluster/node/cnfde7.ptp.lab.eng.bos.redhat.com/ptp"} 3530 # HELP openshift_ptp_clock_state 0 = FREERUN, 1 = LOCKED, 2 = HOLDOVER # TYPE openshift_ptp_clock_state gauge openshift_ptp_clock_state{iface="CLOCK_REALTIME",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} 1 openshift_ptp_clock_state{iface="ens5f1",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} 1 openshift_ptp_clock_state{iface="ens5fx",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="ptp4l"} 1
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0056