Skip to content

(fleet/prometheusrule-foreman) add foreman.dev disk warning#1442

Draft
badenerb wants to merge 1 commit into
devfrom
IT-6681-Prom-Foreman-Dev-Disk
Draft

(fleet/prometheusrule-foreman) add foreman.dev disk warning#1442
badenerb wants to merge 1 commit into
devfrom
IT-6681-Prom-Foreman-Dev-Disk

Conversation

@badenerb

Copy link
Copy Markdown
Contributor

No description provided.

@badenerb badenerb self-assigned this Feb 12, 2026
@badenerb badenerb added the enhancement New feature or request label Feb 12, 2026
expr: |
(
node_filesystem_avail_bytes{
job="node-puppetdb",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constraining by the job name shouldn't be necessary.

device="/dev/mapper/almalinux-root"
}
/
node_filesystem_size_bytes{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified to node_filesystem_size_bytes as prometheus will automatically match the same labels.

rules:
- alert: ForemanRootDiskLowFreeSpace
annotations:
summary: Disk space warning on foreman.dev.lsst.org

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary: Disk space warning on foreman.dev.lsst.org
summary: 'Disk space warning on {{ $labels.instance }}'

annotations:
summary: Disk space warning on foreman.dev.lsst.org
description: >
Disk free space is below 10% on foreman.dev.lsst.org for device /dev/mapper/almalinux-root.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Disk free space is below 10% on foreman.dev.lsst.org for device /dev/mapper/almalinux-root.
Disk free space is below 10% on {{ $labels.instance }} for device {{ $labels.device }}.

} == 0
for: 5m
labels:
gnoc: "true"

@jhoblitt jhoblitt Feb 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to send this to the gnoc as it isn't something the other network operators need to know about.

labels:
gnoc: "true"
severity: warning
node_name: foreman.dev.lsst.org

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
node_name: foreman.dev.lsst.org
node_name: '{{ $labels.instance }}'

gnoc: "true"
severity: warning
node_name: foreman.dev.lsst.org
device: /dev/mapper/almalinux-root

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
device: /dev/mapper/almalinux-root
device: '{{ $labels.device }}'

severity: warning
node_name: foreman.dev.lsst.org
device: /dev/mapper/almalinux-root
service_name: null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This format is only required for gnoc alerts, so I would omit this label.

}
) < 0.10
and
node_filesystem_readonly{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The labels could also be omitted from this metric.

When would this mount be readonly while the prom exporter is running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants