Bug 1929896 - Prometheus is failing to scrape /var/node_exporter/textfile/virt.prom due to escape character
Summary: Prometheus is failing to scrape /var/node_exporter/textfile/virt.prom due to ...
Keywords:
Status: CLOSED DUPLICATE of bug 1928073
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.6.z
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Sergiusz Urbaniak
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-17 20:49 UTC by David Critch
Modified: 2021-02-18 14:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-18 09:29:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Critch 2021-02-17 20:49:39 UTC
Description of problem:
After installing OpenShift on a cluster of Intel NUCs, the following alert starts firing:
NodeTextFileCollectorScrapeError: Node Exporter text file collector failed to scrape.

Version-Release number of selected component (if applicable):
4.6.16

How reproducible:
Always

Steps to Reproduce:
1. Install OpenShift on hardware that includes parentheses in the manufacturer's name
2. Observe alert in OpenShift console


Actual results:
The Prometheus pods are failing to scrape with the following error message:
level=error ts=2021-02-17T20:31:38.700Z caller=textfile.go:209 collector=textfile msg="failed to collect textfile data" file=virt.prom err="failed to parse textfile data from \"/var/node_exporter/textfile/virt.prom\": text format parsing error in line 3: invalid escape sequence '\\('"


Expected results:
Prometheus successfully scrapes the file

Additional info:
The file in question:
$ cat /var/node_exporter/textfile/virt.prom 
# HELP virt_platform reports one series per detected virtualization type. If no type is detected, the type is "none".
# TYPE virt_platform gauge
virt_platform{type="none",bios_vendor="Intel Corp.",bios_version="FNCML357.0046.2020.0928.1457",system_manufacturer="Intel\(R\) Client Systems",system_product_name="NUC10i7FNH",system_version="K61081-306",baseboard_manufacturer="Intel Corporation",baseboard_product_name="NUC10i7FNB"} 1

The ()s in "Intel (R)" is getting escaped, causing Prometheus to complain.

Comment 1 Junqi Zhao 2021-02-18 06:26:31 UTC
should be the same bug as bug 1928073

Comment 2 Lili Cosic 2021-02-18 09:29:14 UTC

*** This bug has been marked as a duplicate of bug 1928073 ***

Comment 3 David Critch 2021-02-18 14:21:30 UTC
Thanks folks!


Note You need to log in before you can comment on or make changes to this bug.