首页 > √linux, √web > nagios配置文件
viyin.net

nagios配置文件

2010年5月31日 发表评论 阅读评论

个人觉得这东西太难搞了。尽管网上教程那么多。也请教了不少人。但我还是很艰难的才搞成。。
我太笨了……
.cfg
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/services.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/objects/contactgroups.cfg

[root@moniter objects]# more contacts.cfg
define contact{
contact_name vi;
alias sys admin
service_notification_period 24×7
host_notification_period 24×7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email viyin@yahoo.com
pager 1391119xxxx
}

[root@moniter objects]# more contactgroups.cfg
define contactgroup{
contactgroup_name vis;
alias roots;
members vi
}

[root@moniter objects]# more hosts.cfg
define host{
# use host-pnp
host_name viyin.net
alias www
address 218.6.15.105
check_command check-host-alive
max_check_attempts 3
check_period 24×7
contact_groups vis
notification_interval 10
notification_period 24×7
notification_options d,u,r
}
[root@moniter objects]# more hostgroups.cfg
define hostgroup{
hostgroup_name linux-servers
alias linux-servers
members viyin.net
}

[root@moniter objects]# more services.cfg
define service{
# use srv-pnp
host_name viyin.net
service_description Current Users
check_command check_local_users!20!50
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
check_period 24×7
notification_interval 10
notification_period 24×7
notification_options w,u,c,r
contact_groups vis
}

viyin.net
分类: √linux, √web 标签: ,
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.