In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you the "sample analysis of the nagios client module in puppet", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of the nagios client module in puppet".
In order to facilitate the use of puppet in combination, so then the original source code compilation, all changed to use rpmbuild packaging, in the self-built source, this article will also explain how to create the local source.
In this paper, the software packages nrpe and nagios-plugins are generated by spec in the previous article.
The old rule is to start with the architecture diagram (ps: it's all pretty much the same--):
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"],}}
3,nrpe.erb
# default: on # description: NRPE (Nagios Remote Plugin Executor) service nrpe {flags = REUSE socket_type = stream port = 5666 wait = no user = nagios group = nagios server = / usr/local/nagios/bin/nrpe Server_args =-c / usr/local/nagios/etc/nrpe.cfg-- inetd log_on_failure + = USERID disable = no only_from = 127.0.0.1}
4Perfect nrpeafure web.erb
Inside is the content of the nrpe.cfg compiled by the source code
5,site.pp
# for module nagios # $nagios_server = "192.168.10.211"
The value of the nagios_server variable is set
6 call to the node
(1), modules.pp
Import "nagios"
(2), site.pp
Node / ^ redis\.\ w+\ .com $/ {include nagios::web}
Of course, it can also be written into the node set in nodes.pp.
7, create a local source
I use ftp to do it.
(1) yum install vsftpd-y (2) yum install createrep-y
Then copy the nrpe,nagios-plugins package to / var/ftp/pub to generate dependencies
Createrepo / var/ftp/pub
Create ftp.repo
[ftp] name=base baseurl= ftp://192.168.10.211/pub enabled=1 gpgcheck=0
Finally, in
Yum makecache
Don't forget to open the ftp port on the firewall
The above is all the content of the article "sample Analysis of nagios client Module in puppet". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.