Currently in nrpe charm, the update-status hook is missing. We keep seeing this message in juju log:
unit-nrpe-0: 20:47:06 INFO juju.worker.uniter.operation skipped "update-status" hook (missing)
This patch added a separate python script for this hook, to check nagios-nrpe-server status and use status-set hook tool to update status.
The status message is kept identical to before.
The Nagios charm makes use of a relation-data item named target-address,
which is used for connections from Nagios to the remote unit (NRPE).
If target-address is not set, Nagios then uses ingress-address, and if
that's not set, private-address. Both ingress-address and
private-address are automatically set by Juju, but updated by the nrpe
charm.
This change adds target-address to the relation data which is controlled
by the NRPE charm from the start, as under some circumstances the
ingress-address is overwritten by Juju.
The Nagios charm makes use of a relation-data item named target-address,
which is used for connections from Nagios to the remote unit (NRPE).
If target-address is not set, Nagios then uses ingress-address, and if
that's not set, private-address. Both ingress-address and
private-address are automatically set by Juju, but updated by the nrpe
charm.
This change adds target-address to the relation data which is controlled
by the NRPE charm from the start, as under some circumstances the
ingress-address is overwritten by Juju.
In cases where we specify to use public address and/or Juju returns a
public address regardless of the setting, we cannot use that address for
binding the NRPE service.
This change ensures get_local_ingress_address returns the local address
for binding the nrpe service, and if configured to do so returns the
public address for relation data and NRPE host exports.
In cases where we specify to use public address and/or Juju returns a
public address regardless of the setting, we cannot use that address for
binding the NRPE service.
This change ensures get_local_ingress_address returns the local address
for binding the nrpe service, and if configured to do so returns the
public address for relation data and NRPE host exports.