Skip to content

Commit

Permalink
Fix nrpes var init
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Nov 8, 2023
1 parent 84c41ba commit 01b7349
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,11 @@ def _on_nrpe_targets_changed(self, event):
a["labels"]["juju_unit"], # type: ignore
)

nrpes = cast(List[Dict[str, Any]], event.current_targets)
nrpes = cast(List[Dict[str, Any]], event.current_targets)
else:
# If the event arg is None, then the stored state value is already up to date.
nrpes = self.nrpe_exporter.endpoints()

self._modify_enrichment_file(endpoints=nrpes)

for nrpe in nrpes:
Expand Down

0 comments on commit 01b7349

Please sign in to comment.