Skip to content

Invalid escape sequence in prometheus output #204

@dmazhar-cogniance

Description

@dmazhar-cogniance

Bug description

Getting an error from prometheus when trying to scrape scaphandre metrics: text format parsing error in line 46: invalid escape sequence '\u'
The line 46:

scaph_process_power_consumption_microwatts{exe="agetty",cmdline="/sbin/agetty-o-p -- \u--nocleartty1linux",pid="683"} 0

To Reproduce

Run scaphandre in prometheus mode and start a process with prometheus invalid escape sequence in the cmdline

Expected behavior

Prometheus consuming metrics

Screenshots

N/A

Environment

  • Linux distribution version: Debian GNU/Linux 11.4
  • Kernel version (output of uname -r): 5.10.0-16-amd64
  • Scaphandre build from dev, commit f0be7fec728bc1f52c6a36f0ceeebd699b1da8ce

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Previous releases

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions