nagios监控

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_image              server.gif

statusmap_image         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

时间: 2024-08-03 15:28:18

nagios监控的相关文章

Nagios监控Windows的网卡流量

Nagios监控Windows的网卡流量 使用/usr/local/nagios/libexec/中的check_traffic.sh,不但可以监控Linux的网卡流量,也可以监控Windows服务器的流量. 1 Check_traffic.sh用法用法 [[email protected] libexec]#/usr/local/nagios/libexec/check_traffic.sh -h Usage: ./check_traffic.sh [ -v ] [ -6 ] [ -r ] -

通过collectd工具获取虚拟机的nagios监控脚本简单例子

在宿主机上安装collectd工具后,可以通过collectd工具来获取宿主机上的虚拟机的cpu,memery,if-traffic等数据.可以通过nagios监控脚本来实现对这些数据监控. 以下是一个简单的监控虚拟机内存脚本: #!/bin/bash #Desc:to check memory about vm instance STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 COLLECTD_HOME=/usr/loca

Nagios监控系统

一.Nagios监控系统简介 1.Nagios工作原理 Nagios本身不包括监控主机和服务的功能.所有的监控.监测功能都是通过各种插件来完成的.安装完nagios之后,在nagios主目录下的/libexex里面放有nagios自带的插件,如:check_disk是检查磁盘空间的插件,check_load是检查cpu负载的插件,每一个插件可以通过运行./check_xxx -h命令来检查其使用方法和功能. 1.Nagios的四种监控状态 Nagios可以识别四种状态返回信息.0(OK)表示状态

Nagios监控远程主机

p.MsoNormal,li.MsoNormal,div.MsoNormal { margin: 0cm; margin-bottom: .0001pt; line-height: 150%; font-size: 13.5pt; font-family: "Calibri", "sans-serif" } h1 { margin-top: 17.0pt; margin-right: 0cm; margin-bottom: 16.5pt; margin-left:

Nagios监控系统主机与服务配置

配置环境: 监控服务器 :192.168.189.132 被监控客户端:192.168.189.131(linux) 192.168.1.152(windows) Nagios相关配置文件概述: # cd /usr/local/nagios/etc/   相关文件用途如下表: 文件名或目录名 用途 cgi.cfg 控制CGI访问的配置文件 nagios.cfg Nagios 主配置文件 resource.cfg 变量定义文件,又称为资源文件,在些文件中定义变量,以便由其他配置文件引用,如$USE

nagios监控详解(中小企业必备的监控设备) <上>

cacti和nagios 都是中小企业必备的监控软件,首先来一个回顾 cacti监控优缺点:主要是监控图形流量,通过web界面监控流量,(主要监控cpu内存硬盘,流量) 基于snmp(抓取数据)和rrdtool(rrdtool主要是将抓取的数据 绘制图像) nagios监控系统服务的,也能监控window,linux,unix的主机状态,不过主要还是监控系统服务. nagios监控客户端需要借助插件以及NRPE软件 [把之前写的一个关于cacti的博客地址也不要碧莲的贴出来]http://www

Nagios 监控系统架设全攻略

Nagios 全名为(Nagios Ain’t Goona Insist on Saintood),最初项目名字是 NetSaint.它是一款免费的开源 IT 基础设施监控系统,其功能强大,灵活性强,能有效监控 Windows .Linux.VMware 和 Unix 主机状态,交换机.路由器等网络设置等.一旦主机或服务状态出现异常时,会发出邮件或短信报警第一时间通知 IT 运营人员,在状态恢复后发出正常的邮件或短信通知.Nagios 结构简单,可维护性强,越来越受中小企业青睐,以及运维和管理人

nagios监控内出错NRPE: Unable to read output 解决!

 nagios监控内出错NRPE: Unable to read output 解决! 由于编写check_mem监控脚本,在监控机报警:NRPE: Unable to read output,其他监控项目正常 初步认定是nagios没有权限去实行check_mem脚本: 1.在监控主机监控客户机内存,遇到NRPE: Unable to read output # /usr/local/nagios/libexec/check_nrpe -H 1192.168.1.10 -c check_mem

nagios 监控 网卡流量 脚本

#!/bin/bash # #Time     : 2014-06-23 #Author   : ftlynx #Function : use NET-SNMP get NIC traffic on nagios. Usage(){ echo "Usage: check_traffic.sh [options]" echo "     -H     Host IP." echo "     -P     net-snmp community string.

nagios监控windows主机

一,编辑Nagios的主配置文件vi /usr/local/nagios/etc/nagios.cfg把下面这行最前面的#号去掉:#cfg_file=/usr/local/nagios/etc/objects/windows.cfg保存配置文件并退出.二,安装Windows代理程序  NSClient++外部构件1.从http://sourceforge.net/projects/nscplus站点下载最新稳定版的NSClient++软件包:2.解压软件包到一个目录下,如C:\\\\\\\\NS