nagios监控
导读:本文共2975.5字符,通常情况下阅读需要10分钟。同时您也可以点击右侧朗读,来听本文内容。按键盘←(左) →(右) 方向键可以翻页。
摘要: 139 yum install gd-devel-2.0.35-11.el6.x86_64.rpm -y140 ls142 tar jxf nagios-cn-3.2.3.tar.bz2 143 cd nagios-cn-3.2.3144 ls145 vim INSTALLING.zh_CN.UTF8149 yum search Chinese150 yum i... ...
目录
(为您整理了一些要点),点击可以直达。- (1):140 ls
- (2):142 tar jxf nagios-c
- (3):143 cd nagios-cn-3.2
- (4):144 ls
- (5):145 vim INSTALLING.z
- (6):149 yum search Chine
- (8):151 useradd nagios
- (9):152 id nagios
- (10):153 echo nagios:west
- (11):154 groupadd nagcmd
- (12):155 usermod -G nagcm
- (13):156 usermod -G nagcm
- (14):157 id apache
- (15):158 rpm -q httpd
- (17):160 yum install gcc
- (19):162 make all
- (20):163 make install
- (21):164 make install-ini
- (22):165 make install-com
- (23):166 make install-con
- (24):167 make install-web
- (25):168 chkconfig nagios
- (30):173 cat /etc/httpd/c
- (31):174 /etc/init.d/http
- (32):175 /etc/init.d/nagi
- (33):176 cd
- (34):177 ls
- (36):180 cd nagios-plugin
- (37):181 ls
- (38):182 vim INSTALL
- (39):183 ./configure --he
- (42):186 make
- (44):188 make
- (45):189 make install
- (46):190 /etc/init.d/nagi
- (48):198 cd /usr/local/na
- (49):199 ls
- (50):200 cd bin/
- (51):201 ls
- (52):202 cd nagios
- (53):203 cd ..
- (54):204 cd etc/
- (55):205 ls
- (56):207 vim nagios.cfg
- (62):208 cd objects/
- (63):209 ls
- (64):210 cp localhost.cfg
- (65):211 vim hosts.cfg
- (70):# parents MainSwitch
- (74):2d_coords 500,200
- (77):####################
- (84):212 cp localhost.cfg
- (85):213 vim services.cfg
- (93):215 vim services.cfg
- (94):216 cp localhost.cfg
- (95):217 vim services.cfg
- (97):219 /etc/init.d/nagi
- (98):220 /etc/init.d/http
- (100):222 /etc/init.d/http
- (101):223 cd
- (102):224 ls
- (104):226 tail -f /var/log
- (105):227 yum install perl
- (106):228 /etc/init.d/nagi
- (107):229 /etc/init.d/http
- (108):230 /etc/init.d/nagi
- (109):231 /etc/init.d/http
139 yum install gd-devel-2.0.35-11.el6.x86_64.rpm -y
140 ls
142 tar jxf nagios-cn-3.2.3.tar.bz2
143 cd nagios-cn-3.2.3
144 ls
145 vim INSTALLING.zh_CN.UTF8
149 yum search Chinese
150 yum install cjkuni-ukai-fonts.noarch cjkuni-uming-fonts.noarch -y
151 useradd nagios
152 id nagios
153 echo nagios:westos|chpasswd
154 groupadd nagcmd
155 usermod -G nagcmd nagios
156 usermod -G nagcmd apache
157 id apache
158 rpm -q httpd
159 ./configure --with-command-group=nagcmd
160 yum install gcc -y
161 ./configure --with-command-group=nagcmd
162 make all
163 make install
164 make install-init
165 make install-commandmode
166 make install-config
167 make install-webconf
168 chkconfig nagios on
169 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg ##检查文件配置
170 vim /usr/local/nagios/etc/htpasswd.users
171 cat /usr/local/nagios/etc/htpasswd.users
172 htpasswd -m /usr/local/nagios/etc/htpasswd.users nagiosadmin
173 cat /etc/httpd/conf.d/nagios.conf
174 /etc/init.d/httpd restart
175 /etc/init.d/nagios start
176 cd
177 ls
179 tar zxf nagios-plugins-2.1.1.tar.gz
180 cd nagios-plugins-2.1.1
181 ls
182 vim INSTALL
183 ./configure --help
184 ./configure --with-nagios-user=nagios --with-nagios-group=nagios
185 ./configure --with-nagios-user=nagios --with-nagios-group=nagios --enable-perl-modules --enable-libtap
186 make
187 yum install perl-ExtUtils-MakeMaker -y
188 make
189 make install
190 /etc/init.d/nagios reload
198 cd /usr/local/nagios/
199 ls
200 cd bin/
201 ls
202 cd nagios
203 cd ..
204 cd etc/
205 ls
207 vim nagios.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/services.cfg
# Definitions for monitoring the local (Linux) host
# cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
208 cd objects/
209 ls
210 cp localhost.cfg hosts.cfg
211 vim hosts.cfg
define host{
use linux-server
host_name server1.example.com
alias Manager
# parents MainSwitch
address 172.25.41.1
icon_p_w_picpath server.gif
statusmap_p_w_picpath server.gd2
2d_coords 500,200
3d_coords 500,200,100
}
#####################################
define hostgroup{
hostgroup_name linux-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members * ; Comma separated list of hosts that belong to this group
}
212 cp localhost.cfg services.cfg
213 vim services.cfg
define servicegroup{
servicegroup_name 系统负荷检查
alias 负荷检查
members server1.example.com,进程总数,server1.example.com,登录用户数,server1.example.com,根分区,server1.example.com,交换空间利用率
} ##***全文替换%s//server1.example.com/g
214 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
215 vim services.cfg
216 cp localhost.cfg services.cfg
217 vim services.cfg
218 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
219 /etc/init.d/nagios restart
220 /etc/init.d/httpd restart
221 echo www.westos.org > /var/www/html/index.html
222 /etc/init.d/httpd restart
223 cd
224 ls
225 rpm -ivh rrdtool-perl-1.3.8-6.el6.x86_64.rpm
226 tail -f /var/log/httpd/error_log
227 yum install perl-CGI
228 /etc/init.d/nagios reload
229 /etc/init.d/httpd restart
230 /etc/init.d/nagios restart
231 /etc/init.d/httpd restart
nagios监控的详细内容,希望对您有所帮助,信息来源于网络。