-
Notifications
You must be signed in to change notification settings - Fork 114
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
[metrics 4/x] Metrics exporter rules #732
[metrics 4/x] Metrics exporter rules #732
Conversation
Thanks for your PR,
To skip the vendors CIs use one of:
|
e1551a6
to
86719de
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
86719de
to
0069e5e
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
0069e5e
to
fed3f8c
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
fed3f8c
to
5ba65f8
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
5ba65f8
to
5b085ea
Compare
Thanks for your PR,
To skip the vendors CIs use one of:
|
3eced4d
to
7b25cc6
Compare
7b25cc6
to
f004d91
Compare
Pull Request Test Coverage Report for Build 10903994186Details
💛 - Coveralls |
bindata/manifests/metrics-exporter/metrics-prometheus-rule.yaml
Outdated
Show resolved
Hide resolved
d8ce5ef
to
9493e50
Compare
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.
LGTM
@@ -29,6 +29,7 @@ rules: | |||
- monitoring.coreos.com | |||
resources: | |||
- servicemonitors | |||
- prometheusrules |
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.
Do we support deletion of prometheus objects ?
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.
For when sno is redeployed with prometheus disabled (e.g in helm chart)
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.
good point. we have to support object deletion as well. I handle it in
- metrics: Add permissions to remove monitor objects #769
but it's better to merge that changes into these PR.
@adrianchiris can we move this forward? |
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.
LGTM
PrometheusRules allow recording pre-defined queries. Use `sriov_kubepoddevice` metric to add `pod|namespace` pair to the sriov metrics. Feature is enabled via the `METRICS_EXPORTER_PROMETHEUS_DEPLOY_RULE` environment variable. Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
When the `metricsExporter` feature is turned off, deployed resources should be removed. These changes fix the error: ``` │ 2024-08-28T14:07:57.699760017Z ERROR controller/controller.go:266 Reconciler error {"controller": "sriovoperatorconfig", "controllerGroup": "sriovnetwork.openshift.io", "controllerKind": "SriovOperatorConfig", "SriovOperatorConfig": {"name":"default","namespace":"openshift-sriov-network-operator"}, │ │ "namespace": "openshift-sriov-network-operator", "name": "default", "reconcileID": "fa841c50-dbb8-4c4c-9ddd-b98624fd2a24", "error": "failed to delete object &{map[apiVersion:monitoring.coreos.com/v1 kind:ServiceMonitor metadata:map[name:sriov-network-metrics-exporter namespace:openshift-sriov-network-operator] │ │ spec:map[endpoints:[map[bearerTokenFile:/var/run/secrets/kubernetes.io/serviceaccount/token honorLabels:true interval:30s port:sriov-network-metrics scheme:https tlsConfig:map[caFile:/etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt insecureSkipVerify:false serverName:sriov-network-metrics-expor │ │ ter-service.openshift-sriov-network-operator.svc]]] namespaceSelector:map[matchNames:[openshift-sriov-network-operator]] selector:map[matchLabels:map[name:sriov-network-metrics-exporter-service]]]]} with err: could not delete object (monitoring.coreos.com/v1, Kind=ServiceMonitor) openshift-sriov-network-operato │ │ r/sriov-network-metrics-exporter: servicemonitors.monitoring.coreos.com \"sriov-network-metrics-exporter\" is forbidden: User \"system:serviceaccount:openshift-sriov-network-operator:sriov-network-operator\" cannot delete resource \"servicemonitors\" in API group \"monitoring.coreos.com\" in the namespace \"ope │ │ nshift-sriov-network-operator\""} ``` Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
504ce7d
to
b49cf15
Compare
Make the operator creating PrometheusRules to browse metrics in the Developer Console. refs: - k8snetworkplumbingwg/sriov-network-operator#732 Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Make the operator creating PrometheusRules to browse metrics in the Developer Console. refs: - k8snetworkplumbingwg/sriov-network-operator#732 Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
Make the operator creating PrometheusRules to browse metrics in the Developer Console. refs: - k8snetworkplumbingwg/sriov-network-operator#732 Signed-off-by: Andrea Panattoni <apanatto@redhat.com>
PrometheusRules allow recording pre-defined queries. Use
sriov_kubepoddevice
metric to addpod|namespace
pairto the sriov metrics.
Here is an example of the raw exported metrics:
Proposed prometheus rules allow to query the following new metrics:
network:sriov_vf_tx_packets
network:sriov_vf_rx_packets
network:sriov_vf_tx_bytes
network:sriov_vf_rx_bytes
network:sriov_vf_tx_dropped
network:sriov_vf_rx_dropped
network:sriov_vf_rx_broadcast
network:sriov_vf_rx_multicast