-
Notifications
You must be signed in to change notification settings - Fork 231
Monitoring for ironic-prometheus-exporter #340
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| {{if .usingBareMetal}} | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: Service | ||
| metadata: | ||
| name: metal3-baremetalhost-controller | ||
| namespace: openshift-machine-api | ||
| labels: | ||
| app: ironic-exporter | ||
| spec: | ||
| ports: | ||
| - name: http | ||
| protocol: TCP | ||
| port: 9608 | ||
| targetPort: 9608 | ||
| selector: | ||
| app: ironic-exporter | ||
| clusterIP: None | ||
| type: ClusterIP | ||
| sessionAffinity: None | ||
| status: | ||
| loadBalancer: {} | ||
| {{- end}} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| {{if .usingBareMetal}} | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: ServiceMonitor | ||
| metadata: | ||
| labels: | ||
| app: ironic-exporter | ||
| name: metal3-baremetalhost-controller | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| namespace: openshift-machine-api | ||
| spec: | ||
| endpoints: | ||
| - port: "9608-tcp" | ||
| scheme: http | ||
| path: /metrics | ||
| targetPort: 9608 | ||
| jobLabel: app | ||
| namespaceSelector: | ||
| matchNames: | ||
| - metal3-baremetalhost-controller | ||
| selector: | ||
| matchLabels: | ||
| app: ironic-exporter | ||
| {{- end}} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| {{if .usingBareMetal}} | ||
| apiVersion: monitoring.coreos.com/v1 | ||
| kind: PrometheusRule | ||
| metadata: | ||
| name: metal3-baremetalhost-controller | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| namespace: openshift-machine-api | ||
| spec: | ||
| groups: | ||
| - name: metal3-baremetalhost-controller | ||
| rules: | ||
| - alert: HighCPUTemperature | ||
| annotations: | ||
| summary: "The baremetal node {{ $labels.node_name }} CPU {{ $labels.entity_id }} is too high" | ||
| description: "The baremetal node {{ $labels.node_name }} CPU {{ $labels.entity_id }} was too high in the past 5 minutes. Last measurement {{ $value }}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wouldn't this trigger for non baremetal envs?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should porbably rename
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @enxebre I don't think it would trigger in non baremetal envs, check @simonpasquier comment. |
||
| expr: baremetal_temp_celsius > 96 | ||
| for: 5m | ||
| labels: | ||
| severity: warning | ||
| - alert: LowCPUTemperature | ||
| annotations: | ||
| summary: "The baremetal node {{ $labels.node_name }} CPU {{ $labels.entity_id }} is too low" | ||
| description: "The baremetal node {{ $labels.node_name }} CPU {{ $labels.entity_id }} was too low in the past 5 minutes. Last measurement {{ $value }}" | ||
| expr: baremetal_temp_celsius < 3 | ||
| for: 5m | ||
| labels: | ||
| severity: warning | ||
| {{- end}} | ||
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.
I am not sure what the "name" here should be. But, "metal3-baremetalhost-controller" is the name of the baremetal_operator controller. See https://github.com/metal3-io/baremetal-operator/blob/master/pkg/controller/baremetalhost/baremetalhost_controller.go#L105
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.
The name we are using for the deployment is "metal3". See https://github.com/openshift/machine-api-operator/blob/master/pkg/operator/baremetal_pod.go#L119.