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

After changing nagios_host_context in nrpe related to cos-proxy, the old check names are still present in nrpe_lookups.csv #93

Closed
przemeklal opened this issue Nov 8, 2023 · 3 comments · Fixed by #96

Comments

@przemeklal
Copy link
Member

Bug Description

After changing nagios_host_context in nrpe related to cos-proxy, all nrpe targets are re-added to nrpe_lookup.csv with the updated names. Old checks, however, can still be found there.

To Reproduce

  1. Deploy cos-proxy and nrpe, relate them using the monitors relation
  2. Wait for the model to settle, inspect nrpe_lookup.csv contents
  3. Change nrpe config:
juju config nrpe-container nagios_host_context=bootstack-test
  1. Wait for the model to settle and check nrpe_lookup.csv. New (the same but updated) checks with "bootstack-test" prefix will show up in the juju_unit column, but the old entries without the prefix will be still there.

Environment

rev 46 of cos-proxy, I didn't try to reproduce in rev 47 yet

Relevant log output

It's the same env that was reported in #88.

Additional context

No response

@sed-i
Copy link
Contributor

sed-i commented Nov 8, 2023

Thanks @przemeklal.
Can you tell if this is a regression due to #89?
I.e. was config change reflected correctly in the csv prior to this recent change?

@przemeklal
Copy link
Member Author

przemeklal commented Nov 8, 2023

It was there before #89.

Another observation is that if an entry for a juju unit was missing there with the old nagios_host_context, it's also missing among the updated entries, e.g.

  • searching for glance/2 check_reboot entries (there are 3 instances after 2 config changes)
grep glance\/2 nrpe_lookup.csv | grep check_reboot

10.169.10.80_check_reboot,glance,glance/2,check_reboot,10.169.10.80
10.169.10.80_check_reboot,bootstack-redacted-context-1-glance,bootstack-redacted-context-1-glance/2,check_reboot,10.169.10.80
10.169.10.80_check_reboot,bootstack-redacted-context-2-glance,bootstack-redacted-context-2-glance/2,check_reboot,10.169.10.80
root@juju-e9cbb4-3-lxd-6:/etc/vector# grep glance\/0 nrpe_lookup.csv | grep check_reboot
root@juju-e9cbb4-3-lxd-6:/etc/vector# 

This was referenced Nov 8, 2023
@sed-i
Copy link
Contributor

sed-i commented Nov 8, 2023

Input from @przemeklal :

graph LR
cos-proxy --- |monitors| nrpe
glance ---|nrpe_external_master| nrpe
Loading
  • glance is an app monitored by nrpe
  • for each nrpe check, cos-proxy needs to add a line to the csv file
  • nrpe charm has a config option, nagios_host_context, which sets a prefix to identify the particular cloud the particular glance target is coming from.
  • after config changed (from no prefix to some prefix), cos-proxy appended the lines to the csv file instead of replacing the old targets. Every time this config option changes, a new line is appended while the old ones are still kept there.
  • need to look at the monitors relation changed handler and see how the csv is generated.

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

Successfully merging a pull request may close this issue.

2 participants