awk warnings running prometheus-node-exporter-apt.service

Bug #1970422 reported by Mathieu Trudel-Lapierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
prometheus-node-exporter (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Triaged
Low
Mathieu Trudel-Lapierre

Bug Description

[Impact]
This bug has minimal impact to users. Warnings are being thrown by the service in its journal; but that seems to be the only issue -- valid results are still being returned by the prometheus collector in the number of packages that need updates for each repository; along with node_reboot_required.

The bug fix is to clean up the regex to avoid the warnings.

This is not applicable elsewhere than in focal; later releases have stopped installing the service and associated script.

[Test Plan]
1) Run /usr/share/prometheus-node-exporter-collectors/apt.sh
2) Validate that it returns without awk warnings.

[Where problems could occur]
- An invalid regex might cause repository stats to be returned in the wrong format for parsing by prometheus.
- Invalid regex would still show warnings or errors in awk.

---

Every time the prometheus-node-exporter-apt.service service runs; it comes out with awk warnings; the regex used is understood but misparsed:

Apr 25 12:06:25 s8mtl1-srs1-prd systemd[1]: Starting Collect apt metrics for prometheus-node-exporter...
Apr 25 12:06:25 s8mtl1-srs1-prd bash[1887195]: awk: cmd. line:1: warning: regexp escape sequence `\"' is not a known regexp operator
Apr 25 12:06:29 s8mtl1-srs1-prd systemd[1]: prometheus-node-exporter-apt.service: Succeeded.
Apr 25 12:06:29 s8mtl1-srs1-prd systemd[1]: Finished Collect apt metrics for prometheus-node-exporter.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2021-12-06 (140 days ago)
InstallationMedia: Ubuntu-Server 20.04.3 LTS "Focal Fossa" - Release amd64 (20210824)
Package: prometheus-node-exporter 0.18.1+ds-2
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.4.0-96.109-generic 5.4.157
Tags: focal
Uname: Linux 5.4.0-96-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: True
modified.conffile..etc.cron.daily.apport: [deleted]

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : Dependencies.txt

apport information

tags: added: apport-collected focal
description: updated
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : HookError_ubuntu.txt

apport information

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : ProcEnviron.txt

apport information

description: updated
description: updated
Changed in prometheus-node-exporter (Ubuntu):
status: New → Fix Released
Changed in prometheus-node-exporter (Ubuntu Focal):
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.