canonical / charm-nrpe

A subordinate charm used to configure nrpe (Nagios Remote Plugin Executor)
Apache License 2.0
1 stars 6 forks source link

Include `nagios_host_context` as a field in nrpe relation databag #183

Closed Abuelodelanada closed 4 months ago

Abuelodelanada commented 4 months ago

In order to be able to fix this issue in cos-proxy would be necessary to have nagios_host_context as a field in nrpe relation databag so we can use it to discover juju_application and juju_unit

I'm not familiar with this charm, but as far as I understand the change would be minimal:

@@ -269,6 +269,7 @@ class MonitorsRelation(helpers.RelationContext):

         relation_info = {
             "target-id": self.principal_relation.nagios_hostname(),
+            "nagios_host_contetext": hookenv.config("nagios_host_context"),
             "monitors": self.get_monitors(),
             "private-address": address,
             "ingress-address": address,

Do you think this change is possible?

simskij commented 4 months ago

nagios_host_contetext -> nagios_host_context 😅