This affects the following alerts:
- NodeFilesystemAlmostOutOfFiles
- NodeFilesystemSpaceFillingUp
- NodeFilesystemAlmostOutOfSpace
- NodeFilesystemFilesFillingUp
Each alert is actually two alerting rules, one for the warning level,
and one for the critical level. However, the critical one can be set to
emit as a warning by using $._config.nodeCriticalSeverity. When this is
true, both alerting rules will generate alerts with an identical set of
labels, which is an error when both alerts fire.
We add an extra label to these alerting rules in order to differentiate
between the two levels when $._config.nodeCriticalSeverity is set to
`warning`.
Signed-off-by: Justin Lei <lei.justin@gmail.com>
Drop superfluous and overly pedantic typecasting for values that fit
within 32 bits or where type comparison is already hinted.
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Ensure identical factory function name across arch-specific files so
that the common init() function in zfs.go works.
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Avoid Linux-specific code scattered in two places by moving it to the
already-existing zfs_linux.go.
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
We already support reading from multiple directories though only using globs. Now we can specify them outright.
Example use case is exporting both static info on a RO FS generated during image building and traditional uses of textfiles (e.g. for R/W service metrics files) without scripting a file copy.
* keep flag name for compatibility
* clarify flag help text
* add test case (replicating the glob one)
Signed-off-by: eduarrrd <eduarrrd@users.noreply.github.com>
node_exporter has reasonable defaults so it is able to start without explicit config.
Such a setup is common in /usr/-only images where /etc/ is an empty tmpfs upon boot.
Signed-off-by: Nils K <24257556+septatrix@users.noreply.github.com>
This PR adds a `exclude[]` URL parameter to exclude specific enabled collectors.
Compared to `collect[]` parameter, the `exclude[]` parameter results in a filtered list which equals enabled collectors minus excluded ones.
Signed-off-by: Siavash Safi <git@hosted.run>
In order to reduce cardinality of the interrupts collector add
filtering options
* Add include/exclude regexp filter flags.
* Add boolean flag to include zero values, enabled by default.
Signed-off-by: Ben Kochie <superq@gmail.com>
* collector/zfs: Prevent `procfs` integer underflow
Prevent integer underflow when parsing the `procfs` file as it used a
`ParseUint` to parse signed values.
Fixes: #2766
---------
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
* ref!: convert linux meminfo implementation to use procfs lib
Part of #2957
Prometheus' procfs lib supports collecting memory info and we're using a
new enough version of the lib that has it available, so this converts
the meminfo collector for Linux to use data from procfs lib instead. The
bits I've touched for darwin/openbsd/netbsd are with intent to preserve
the original struct implementation/backwards compatibility.
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
* fix: meminfo debug log unsupported value
Fixes:
```
ts=2024-06-11T19:04:55.591Z caller=meminfo.go:44 level=debug collector=meminfo msg="Set node_mem" memInfo="unsupported value type"
```
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
* fix: don't coerce nil Meminfo entries to 0, leave out if nil
Nil entries in procfs.Meminfo fields indicate that the value isn't
present on the system. Coercing those nil values to `0` introduces new
metrics on systems that should not be present and can break some
queries.
Addresses PR feedback:
https://github.com/prometheus/node_exporter/pull/3049#discussion_r1637581536https://github.com/prometheus/node_exporter/pull/3049#discussion_r1637584482
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
---------
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
Automatically add a uid to each dashboard.
This prevents changing URLs when restarting a grafana pod and
re-importing the dashboards via ConfigMaps.
Signed-off-by: Stefan Andres <sandres@anaconda.com>