Hello,
I have two Nagios servers. All works fine until some changes. I manually change on every hosts this line:
allowed_hosts=nagios_server_1,nagios_server_2
For example I added new check for SSH in UCS Managment. After that Nagios was restated all servers have only one Nagios server in nrpe.cfg. Ok. I understand it because it is from Templates.
I tried to change template files from:
#allowed_hosts=127.0.0.1,192.168.0.2
@!@
if baseConfig.has_key('nagios/client/allowedhosts') and baseConfig['nagios/client/allowedhosts']:
print 'allowed_hosts=%s' % baseConfig['nagios/client/allowedhosts']
else:
print 'allowed_hosts=%s' % baseConfig['ldap/master']
@!@
to
#allowed_hosts=127.0.0.1,192.168.0.2
#@!@
#if baseConfig.has_key('nagios/client/allowedhosts') and baseConfig['nagios/client/allowedhosts']:
# print 'allowed_hosts=%s' % baseConfig['nagios/client/allowedhosts']
#else:
# print 'allowed_hosts=%s' % baseConfig['ldap/master']
#@!@
allowed_hosts=nagios_server_1,nagios_server_2
But it doesn’t work. Still I have only one server there. Do you have any idea what should I update after change in Templete file?
Thank you for help.
Rafal