~gnuoy/charms/trusty/nrpe-external-master/trunk

« back to all changes in this revision

Viewing changes to hooks/nrpe_hooks.py

  • Committer: Liam Young
  • Date: 2015-03-09 07:00:11 UTC
  • Revision ID: liam.young@canonical.com-20150309070011-y7lmnthrclwur40y
nagios_hostname relies on the nrpe-external-master relation to derive hostname, so trigger writing configs when the relation changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    relation_set(relation_id=rel_id, relation_settings=relation_info)
67
67
 
68
68
 
 
69
@hooks.hook('nrpe-external-master-relation-changed')
 
70
@restart_on_change(restart_map())
 
71
def nrpe_master_changed():
 
72
    write_config()
 
73
 
 
74
 
69
75
def main():
70
76
    try:
71
77
        hooks.execute(sys.argv)