performancecopilot / pcp

Performance Co-Pilot
https://pcp.io
Other
974 stars 237 forks source link

pmlogredact not removing hostname from archive. #2080

Closed orasagar closed 1 month ago

orasagar commented 2 months ago

Using pmdumlog -l on newly generated archive using pmlogredact ,we can still see the hostname in plain text.

kmcdonell commented 2 months ago

@orasagar sorry, I'll need more information here. It works for me ...

$ pmlogredact test2 eek
$ pmdumplog -L test2 | grep host
Performance metrics from host bozo.localdomain
$ pmdumplog -L eek | grep host
Performance metrics from host [redacted]
orasagar commented 2 months ago

[sagsagar-pcp-build-setup test]$ ls 20240910.10.18.0 20240910.10.18.index 20240910.10.18.meta [opc@sagsagar-pcp-build-setup test]$ pmlogredact 20240910.10.18 test [sagsagar-pcp-build-setup test]$ pmdumplog -l test Log Label (Log Format Version 2) Performance metrics from host sagsagar-pcp-build-setup commencing Tue Sep 10 10:18:04.731493 2024 ending Tue Sep 10 12:19:24.998891 2024 [sagsagar-pcp-build-setup test]$

I can see my host name still after doing pmlogredact .

kmcdonell commented 1 month ago

Hmm, that's very odd @orasagar .

Can you try a couple of things, please?

$ grep 'hostname ->' /var/lib/pcp/config/pmlogredact/*

And rerun the pmlogredact with -v on the command line.

For reference this what that looks like for me

$ grep 'hostname ->' /var/lib/pcp/config/pmlogredact/*
/var/lib/pcp/config/pmlogredact/network:global { hostname -> "[redacted]" }
$ pmlogredact -v bug_v2 eek
PCP Archive Rewrite Specifications Summary
Hostname:       sandpit -> [redacted]
orasagar commented 1 month ago

The "global { hostname -> "[redacted]" }" was commented out in my case .Fixed it and it's working.