定
义
监
控
的
项
目
,
也
叫
服
务vi
,
创
建
services.cfg services.cfg definition service{ nagios-server
监
控
的
主
机
,hosts.cfg
中
定
义
的
check-host-alive check-host-alive
的
命
令
,
是
commands.cfg
中
定
义
的 5 3 2 24x7
的
时
间
段
,
是
timeperiods.cfg
中
定
义
的 10 24x7
时
间
段wucr,
,
,
是
timeperiods.cfg
中
定
义
的 w,u,c,r
时通知联系人,具体含义看前文.
sagroup
人
组
是
contactgroups.cfg
中
定
义
的
被
[root@localhost #service define host_name //
service_description check_command //
所
用
max_check_attempts normal_check_interval retry_check_interval check_period //
监
控
notification_interval notification_period //
通
知
的
notification_options
//在监控的结果是contact_groups //}
可以看到基本上所有的成员都是已经定义的.同样的将上面的内容复制修改,就可以加上另外两个监控项目:分家 在看Total Total 如 作
为
守
护
进
程
后
台
启
动
nagios
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
果
有
问
题
的
话
就
可
以
按
照
输
出
信
息
来
排
查
到运
下
行面
nagios这
些
之
-v 信
息Errors:
就
说
Warnings:
前
首
先明
没做
问
测题
试 了 0 0
/usr/local/nagios/bin/nagios
/usr/local/nagios/etc/nagios.cfg
,别以
监后
的控
工
yahoon作
基
和本
都
dbpi是
复
是制
否粘
贴
存啦
活 !!!
这样整个的配置过程就结束了.虽然功能很简单,但是已经为以后扩展打下了良好的基础.可以放心的告诉大
联
系
etc]#
//这个监控项目的描述(也可以说是这个项目的名称),可以空格,我们这里定义的是监控这个主机是不是存活
Things look okay - No serious problems were detected during the pre-flight check

