← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/rutabaga:charm-nagios-private-address into rutabaga:master

 

Colin Watson has proposed merging ~cjwatson/rutabaga:charm-nagios-private-address into rutabaga:master.

Commit message:
charm: Use private-address rather than hostname for Nagios checks

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/rutabaga/+git/rutabaga/+merge/436355

The hostname may not necessarily be resolvable, but the private address should work fine.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/rutabaga:charm-nagios-private-address into rutabaga:master.
diff --git a/charm/rutabaga/lib/charms/rutabaga.py b/charm/rutabaga/lib/charms/rutabaga.py
index 6d4d6d3..1271e7d 100644
--- a/charm/rutabaga/lib/charms/rutabaga.py
+++ b/charm/rutabaga/lib/charms/rutabaga.py
@@ -313,7 +313,7 @@ def add_nagios_proxy_check(nagios, squid):
             check_cmd.extend([
                 '--proxy-url',
                 'http://{}:{}/'.format(
-                    service_host['hostname'], service_host['port']),
+                    service_host['private-address'], service_host['port']),
                 ])
     nagios.add_check(
         check_cmd,