I have run into a problem that I have been unable to solve. When the
stored configs are purged from puppet the nagios server correctly removes
them from the services and hosts file but does not notify the nagios
service and instead throws an error. So the entries are still there and
nagios still reports on them until it is restarted.
(/Nagios_service[check_ping_jasontest2.wishabi.net])
Whit[Completed_stage[main]],Whit[Completed_class[Nagios3_monitor]],Service[nagios3]
still depend on me -- not purging
The reason that I want this feature is that I have created several
automation scripts so I can start a service through AWS giving it two tags
a hostname and a puppetclass. So when I decommission a server the
puppetmaster recognizes this and does a puppet node clean $hostname which
in turn is picked up by nagios on its next run and purged.
This is the section of the nagios config that I am using to both populate
and purge the items from the nagios files.
# collect resources and populate /etc/nagios/nagios_*.cfg
Nagios_host <<||>> { notify => Service["nagios3"] }
Nagios_service <<||>> { notify => Service["nagios3"] }
resources { "nagios_service":
notify => Service["nagios3"]
purge => true,
}
resources { "nagios_host":
notify => Service["nagios3"]
purge => true,
}
I can just run a cronjob to restart the nagios service periodically but
that is a hacky way to do it and I would like to see if anyone has any
ideas.
Jason
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/GW5zxJyl-yYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.