Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove composite_key duplication in nrpe_lookup table #60

Open
lucabello opened this issue Apr 5, 2023 · 0 comments
Open

remove composite_key duplication in nrpe_lookup table #60

lucabello opened this issue Apr 5, 2023 · 0 comments

Comments

@lucabello
Copy link
Contributor

Bug Description

Once vector is started when relating to nrpe (either after #59 is resolved or by additionally deploying filebeat), the file /etc/vector/nrpe_lookup.csv contains duplicate lines for composite keys.

If you juju ssh cos-proxy/0 you would see that

ubuntu@juju-142d1e-0:~$ cat /etc/vector/nrpe_lookup.csv
composite_key,juju_application,juju_unit,command,ipaddr
10.211.43.179_check_conntrack,ubuntu,ubuntu/0,check_conntrack,10.211.43.179
10.211.43.179_check_systemd_scopes,ubuntu,ubuntu/0,check_systemd_scopes,10.211.43.179
10.211.43.179_check_reboot,ubuntu,ubuntu/0,check_reboot,10.211.43.179
10.211.43.179_check_conntrack,ubuntu,ubuntu/0,check_conntrack,10.211.43.179
10.211.43.179_check_systemd_scopes,ubuntu,ubuntu/0,check_systemd_scopes,10.211.43.179
10.211.43.179_check_reboot,ubuntu,ubuntu/0,check_reboot,10.211.43.179

This duplication causes the log format to be weird and to not be correctly parsed from Grafana when using the Loki datasource.
The code responsible for this duplication should be here.

To Reproduce

machine model

  1. juju deploy ubuntu
  2. juju deploy nrpe
  3. juju deploy cos-proxy
  4. juju relate nrpe ubuntu
  5. juju relate cos-proxy nrpe

k8s model

  1. juju deploy cos-lite --channel=edge
  2. cross-model relate cos-proxy to loki

Environment

∮ microk8s version
MicroK8s v1.26.1 revision 4596
∮ juju --version
3.1.0-genericlinux-amd64
∮ lxd --version
5.12

Relevant log output

-

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants