4 ms·
Can you share the relevant snippets from your puppet setup? I'm currently looking at using puppet with nagios/monit to manage the 50+ servers that recently beca
by taa 16y ago
Can you share the relevant snippets from your puppet setup? I'm currently looking at using puppet with nagios/monit to manage the 50+ servers that recently became my responsibility.
- mrud 16y agoIf you start with puppet you should definitely have a look at the type documentation http://docs.puppetlabs.com/references/stable/type.html http://docs.puppetlabs.com/references/stable/type.html It helps a lot to see and understand the already integrated types for puppet. For monit i am using the monit pattern from[1]. Quite simple but IWFM. Nagios is a little bit more complicated. If you have any questions i added my mailaddresse to my profile. You need to use exported resources for the nagios part. Therefore you have to enable Stored Configurations on the puppet server [2]. For the server part i use: package { nagios3: ensure => present } service{nagios3: ensure => running, enable => true, require => Package[nagios3], } exec { "chmod_nagios": command => "/bin/chmod 644 /etc/nagios3/conf.d/*", refreshonly => true, notify => Service["nagios3"] } file { "/etc/nagios3/conf.d": ensure => directory } Nagios_host <<||>> { notify => Exec["chmod_nagios"] } Nagios_service <<||>> { notify => Exec["chmod_nagios"] } The client setup is quite easy, im using nagios-nrpe for the check. You have to deploy your own configuration files, i omit them here. package { nagios-nrpe-server: ensure => installed } service { nagios-nrpe-server: ensure => running, require => Package[nagios-nrpe-server], pattern => "/usr/sbin/nrpe" } @@nagios_host { "host_$hostname": ensure => present, address => $ipaddress, host_name => $hostname, use => "generic-host", target => "/etc/nagios3/conf.d/host-$hostname.cfg", } @@nagios_service { "apt-${hostname}": ensure => present, use => "generic-service", host_name => $hostname, service_description => "apt check", target => "/etc/nagios3/conf.d/apt.cfg", check_command => "check_nrpe_1arg!check_apt" } [1] http://projects.puppetlabs.com/projects/1/wiki/Monit_Patterns http://projects.puppetlabs.com/projects/1/wiki/Monit_Pattern... [2] http://projects.puppetlabs.com/projects/puppet/wiki/Using_Stored_Configuration http://projects.puppetlabs.com/projects/puppet/wiki/Using_St... You should not use sqlite, use mysql if you want to use the dashboard [puppetmasterd] storeconfigs = true dbadapter = sqlite3 dblocation = /var/lib/puppet/storeconfigs.sqlite