为了方便与puppet结合着用,所以接下去原本用源码编译的,统统改成用rpmbuild打包完,在放进自己建的源里面,本文也将说明本地源如何创建。
文中软件包nrpe,和nagios-plugins均由上篇文章的spec生成。
老规矩,先上架构图(ps:其实都差不多- -):
1.init.pp
import "*"
2.web.pp
class nagios::web ( $nagiospluginsversion="1.4.16-10", $nrpeversion="2.13-10" ){ file {"sa": path => "/root/sa", ensure => directory, } package {"xinetd": ensure => present, } package {"nagios-plugins": ensure => $nagiospluginsversion, } package {"nrpe": ensure => $nrpeversion, require => Package["nagios-plugins"], } file {"nrpe.cfg": mode => 0644, owner => nagios, group => nagios, path => "/usr/local/nagios/etc/nrpe.cfg", require => Package["nrpe"], content => template('nagios/web-nrpe.erb'), notify => Service['xinetd'], } file {"nrpe": mode => 0644, owner => root, group => root, path => "/etc/xinetd.d/nrpe", content => template('nagios/nrpe.erb'), require => Package["nrpe"], notify => Service['xinetd'], } service {"xinetd": ensure => running, enable => true, subscribe => File["nrpe","nrpe.cfg"], } }
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索package
, require
nagios
puppet nagios、puppet windows客户端、puppet 判断客户端ip、puppet 客户端、nagios windows客户端,以便于您获取更多的相关知识。
时间: 2024-10-02 22:56:15