Incorrect host_name used when nagios_hostname_type is "host"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Server |
Fix Released
|
Undecided
|
Andreas Hasenack | ||
nrpe (Juju Charms Collection) |
Fix Released
|
Undecided
|
Chad Smith |
Bug Description
When deploying the nrpe charm with the nagios_
Instead of pointing at the actual hostname, host_name still points at the unit name, as if nagios_
root@andreas-
total 12
drwxr-xr-x 1 root root 224 Jan 8 15:41 .
drwxr-xr-x 1 nagios nagios 12 Jan 8 15:40 ..
-r--r--r-- 1 root root 265 Jan 8 15:41 host__andreas-
-rw-r--r-- 1 root root 435 Jan 8 15:41 service_
-rw-r--r-- 1 root root 440 Jan 8 15:41 service_
root@andreas-
#------
# This file is Juju managed
#------
define host {
address 10.0.3.77
host_name andreas-
use server
hostgroups machines,
}
root@andreas-
#------
# This file is Juju managed
#------
define service {
use active-service
host_name juju-mysql-0 <---- INCORRECT, should have been andreas-
service_
check_command check_nrpe!
servicegroups juju
}
Here is a simple deployer file that shows the problem:
nrpe-test:
services:
apache2:
charm: cs:trusty/apache2
mysql:
charm: cs:trusty/mysql
to: [apache2]
nrpe:
charm: cs:trusty/nrpe
relations:
- ["apache2:
- ["mysql:
Related branches
- Review Queue (community): Needs Fixing (automated testing)
- Chad Smith (community): Abstain
- Stuart Bishop (community): Approve
-
Diff: 231 lines (+107/-12)7 files modifiedhooks/nrpe_helpers.py (+7/-0)
hooks/nrpe_utils.py (+13/-0)
hooks/services.py (+1/-0)
tests/10-tests (+8/-8)
tests/11-monitors-configurations (+2/-2)
tests/13-monitors-config (+2/-2)
tests/14-basic-nrpe-external-master (+74/-0)
tags: | added: kanban-cross-team |
Changed in nrpe (Juju Charms Collection): | |
status: | New → In Progress |
assignee: | nobody → Chad Smith (chad.smith) |
tags: | added: kanban |
Changed in nrpe (Juju Charms Collection): | |
status: | In Progress → Fix Released |
tags: | removed: kanban |
Changed in landscape: | |
status: | Fix Committed → Fix Released |
It looks like the nagios_hostname relation data is never set on the nrpe-external- master relation.