Commit ebd0e8f
committed
BUG/MINOR: promex: Skip resolvers metrics when there is no resolver section
By default, there is always at least on resolver section, the default one,
based on "/etc/resolv.conf" content. However, it is possible to have no
resolver at all if the file is empty or if any error occurred. Errors are
silently ignored at this stage.
In that case, there was a bug in the Prometheus exporter leading to a crash
because the resolver section list is empty. An invalid resolver entity was
used. To fix the issue we must only take care to not dump resolvers metrics
when there is no resolver.
Thanks to Aurelien to have spotted the offending commit.
This patch should fix the issue #2604. It must be backported to 3.0.
(cherry picked from commit 91fe085)
Signed-off-by: Christopher Faulet <[email protected]>1 parent abecd95 commit ebd0e8f
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3919 | 3919 | | |
3920 | 3920 | | |
3921 | 3921 | | |
3922 | | - | |
| 3922 | + | |
3923 | 3923 | | |
| 3924 | + | |
| 3925 | + | |
| 3926 | + | |
| 3927 | + | |
3924 | 3928 | | |
3925 | 3929 | | |
3926 | 3930 | | |
| |||
0 commit comments