New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 1993854: add metrics for multi interface #50
Bug 1993854: add metrics for multi interface #50
Conversation
@aneeshkp: This pull request references Bugzilla bug 1993854, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (omarzian@redhat.com), skipping review request. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
just a few small comments
pkg/daemon/metrics.go
Outdated
} | ||
} | ||
|
||
func extractSummaryMetrics(processName, output string) (offsetFromMaster, maxOffsetFromMaster, frequencyAdjustment, delayFromMaster float64) { | ||
func extractSummaryMetrics(configName, processName, output string) (iface string, offsetFromMaster, maxOffsetFromMaster, frequencyAdjustment, delayFromMaster float64) { | ||
// remove everything before the rms string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this comment is not right any more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/cc @josephdrichard please have a look |
@SchSeba: GitHub didn't allow me to request PR reviews from the following users: josephdrichard. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
@josephdrichard: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm before we merge this one we need to open another PR under the ptp-operator to reflect this changes in the test if not it will break cnf-test https://github.com/openshift/ptp-operator/blob/master/test/conformance/ptp/ptp.go#L248 https://github.com/openshift-kni/cnf-features-deploy/blob/master/cnf-tests/testsuites/e2esuite/ptp/prometheus.go |
@SchSeba Do you have any information you can share on how to test those cases ? |
@SchSeba added frequency and delay from system metrics., |
ran cnf-test, passed for ptp metrics also the log is intact
` Summarizing 2 Failures: [Fail] ptp Test Offset PTP configuration verifications [It] PTP time diff between Grandmaster and Slave should be in range -100ms and 100ms [Fail] [ptp] PTP e2e tests PTP Interfaces discovery [It] PTP daemon apply match rule based on nodeLabel Ran 9 of 138 Specs in 376.831 seconds
|
/retest |
1 similar comment
/retest |
/test e2e-aws |
all cnf test passed for ptp-operator Ran 12 of 138 Specs in 460.530 seconds |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aneeshkp, josephdrichard, SchSeba The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
@aneeshkp: All pull requests linked via external trackers have merged: Bugzilla bug 1993854 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This PR fixes Prometheus metrics for multi interface and single interface case.
Last PR added config filename to the log instead of interface and and then extract metrics method signature was changed to send list of interfaces to parse and match the port id from the role to determine the interface role.
This PR uses those changes to update Prometheus metrics , by adding new metrics and updating existing now.
Introduced following metrics
openshift_ptp_clock_state{iface="master",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="ptp4l"}
openshift_ptp_ptp_interface_role{iface="ens5f1",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="ptp4l"} 1
openshift_ptp_delay_from_system{iface="ens7f1",node="cnfde7.ptp.lab.eng.bos.redhat.com",process="phc2sys"} 2720
Single interface Metrics
Faulty interface
but this will still stay locked as the known last state (will be more accurate with event frame aka sidecar)
Now for multi interface