Bug 1929896

Summary: Prometheus is failing to scrape /var/node_exporter/textfile/virt.prom due to escape character
Product: OpenShift Container Platform Reporter: David Critch <dcritch>
Component: MonitoringAssignee: Sergiusz Urbaniak <surbania>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.6.zCC: alegrand, anpicker, erooth, kakkoyun, lcosic, pkrupa, surbania
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-18 09:29:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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!