resources { "nagios_service":
# notify => Service["nagios3"]
purge => true,
}
resources { "nagios_host":
# notify => Service["nagios3"]
purge => true,
}
And make Nagios service subrscribe to the file /etc/nagios (cheksum => mtime)
--
Bruno
On September 10, 2012 01:17:22 PM jlittle wrote:
I am using stored configs to manage my nagios host and services checks and 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 [email protected].
To unsubscribe from this group, send email to puppet-
[email protected].
For more options, visit this group at http://groups.google.com/group/puppet-
users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.