nagos服务配置记录(有图有文本,只是做一个概览备忘,不是细致的)
2013-09-01 20:58
211 查看
服务器端(IP:124.172.223.141):
因为服务器自己也要监控本地,所以也要安装nrpe(被监控),plugins插件则是规定服务器可以监控哪些服务和主机
设置需要监控什么
可以添加哪些服务或主机被监控
[root@bogon objects]# cat /usr/local/nagios/etc/objects/linux.cfg
define host{
use linux-server
host_name 124.172.223.141
alias 124.172.223.141
address 124.172.223.141
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-swap
check_command check_nrpe!check_swap
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-load
check_command check_nrpe!check_load
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-disk
check_command check_nrpe!check_df
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-users
check_command check_nrpe!check_users
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description otal_procs
check_command check_nrpe!check_total_procs
notifications_enabled 1
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check_mysql
check_command check_nrpe!check_mysql
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description 05. The Nginx Status
check_command check_nrpe!check_nginx
notifications_enabled 1
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-ping
check_command check_nrpe!check_ping
contact_groups system
}
###########################################################################
define host{
use linux-server
host_name 124.172.223.142
alias 124.172.223.142
address 124.172.223.142
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-swap
check_command check_nrpe!check_swap
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-load
check_command check_nrpe!check_load
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-disk
check_command check_nrpe!check_df
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-users
check_command check_nrpe!check_users
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description otal_procs
check_command check_nrpe!check_total_procs
contact_groups system
notifications_enabled 1
}
define service{
use generic-service
host_name 124.172.223.142
service_description 05. The Nginx Status
check_command check_nrpe!check_nginx
notifications_enabled 1
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check_mysql
check_command check_nrpe!check_mysql
# action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICED
#ESC$
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-ping
check_command check_nrpe!check_ping
contact_groups system
}
[root@bogon objects]#
联系人设置,即接受警告的管理人员或组
[root@bogon objects]# cat contacts.cfg
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
#######################################################################################
#######################################################################################
############## SYSTEM ADMINISTRATOR MEMBERS
#######################################################################################
#######################################################################################
define contact{
contact_name li1
use generic-contact
alias li1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email 15218402325@139.com
}
define contact{
contact_name li2
use generic-contact
alias li2
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email 15218402325@163.com
}
#######################################################################################
#######################################################################################
############## SYSTEM ADMINISTRATOR GROUP
#######################################################################################
#######################################################################################
define contactgroup{
contactgroup_name system
alias system
members li1,li2
}
[root@bogon objects]#
客户端 (linux客户端也就一个nrpe,这里主要说的是linux)
IP:124.172.223.142
被监控是这么简单
服务器监控本地和客户端的一个截图
因为服务器自己也要监控本地,所以也要安装nrpe(被监控),plugins插件则是规定服务器可以监控哪些服务和主机
设置需要监控什么
可以添加哪些服务或主机被监控
[root@bogon objects]# cat /usr/local/nagios/etc/objects/linux.cfg
define host{
use linux-server
host_name 124.172.223.141
alias 124.172.223.141
address 124.172.223.141
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-swap
check_command check_nrpe!check_swap
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-load
check_command check_nrpe!check_load
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-disk
check_command check_nrpe!check_df
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-users
check_command check_nrpe!check_users
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description otal_procs
check_command check_nrpe!check_total_procs
notifications_enabled 1
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check_mysql
check_command check_nrpe!check_mysql
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description 05. The Nginx Status
check_command check_nrpe!check_nginx
notifications_enabled 1
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.141
service_description check-ping
check_command check_nrpe!check_ping
contact_groups system
}
###########################################################################
define host{
use linux-server
host_name 124.172.223.142
alias 124.172.223.142
address 124.172.223.142
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-swap
check_command check_nrpe!check_swap
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-load
check_command check_nrpe!check_load
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-disk
check_command check_nrpe!check_df
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-users
check_command check_nrpe!check_users
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description otal_procs
check_command check_nrpe!check_total_procs
contact_groups system
notifications_enabled 1
}
define service{
use generic-service
host_name 124.172.223.142
service_description 05. The Nginx Status
check_command check_nrpe!check_nginx
notifications_enabled 1
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check_mysql
check_command check_nrpe!check_mysql
# action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICED
#ESC$
contact_groups system
}
define service{
use generic-service
host_name 124.172.223.142
service_description check-ping
check_command check_nrpe!check_ping
contact_groups system
}
[root@bogon objects]#
联系人设置,即接受警告的管理人员或组
[root@bogon objects]# cat contacts.cfg
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
#######################################################################################
#######################################################################################
############## SYSTEM ADMINISTRATOR MEMBERS
#######################################################################################
#######################################################################################
define contact{
contact_name li1
use generic-contact
alias li1
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email 15218402325@139.com
}
define contact{
contact_name li2
use generic-contact
alias li2
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email 15218402325@163.com
}
#######################################################################################
#######################################################################################
############## SYSTEM ADMINISTRATOR GROUP
#######################################################################################
#######################################################################################
define contactgroup{
contactgroup_name system
alias system
members li1,li2
}
[root@bogon objects]#
客户端 (linux客户端也就一个nrpe,这里主要说的是linux)
IP:124.172.223.142
被监控是这么简单
服务器监控本地和客户端的一个截图
相关文章推荐
- 在做一个大型java项目,从现在起记录一些技术应用框架配置,一、svn+apace+权限配置
- 刚刚从微博转到博客,筛选一下不是随手记录的东西转过来,这是一个tableviewcontroller的发现
- Winform Log4Net实战:实现每天一个文件记录服务程序的执行情况。
- 记录一个提供Web服务的网址
- 小米手机销量暴跌36% 雷军做错了什么?(人的需求是复杂的,而不是仅仅是一个性价比;要做体验价格比,而不是配置价格比)good
- 怎样配置让apache访问日志记录真实客户端IP,而不是nginx代理服务器IP
- DNS服务的配置与管理(4) 配置其它类型的DNS记录
- 一个奇怪的生产环境配置ldap服务引起的故障及解决过程分享
- windows服务,安装、启动、停止,配置,一个批处理文件搞定
- SpringMVC,3种不同的URL路由配置方法(这根本不是一个小问题)
- 服务 {49A27252-A326-4EF1-B698-6EBC7068833C} 的计时器作业 id {573BE459-DF82-481C-84BD-CA14D287450B} 配置刷新的上一个实例仍在运行,因此将跳过当前的实例。请考虑增加作业之间的时间间隔。
- 在同一个tomcat中,配置两个端口进行提供服务
- 怎样配置让apache访问日志记录真实客户端IP,而不是nginx代理服务器IP
- 第一章 基础 (续 通过代码和配置文件写一个WCF服务)
- vue不是内部或外部命令,配置一个Path系统变量就可以解决
- 转载备忘:redhat下ssh服务的启动于配置
- 互联网运营丨其实,你不是一个内容运营,你只是一个文字编辑而已
- 如何配置一个Oracle服务
- 在同一个tomcat中,配置两个端口进行提供服务
- 如何制作一个 https 网站?IIS配置HTTPS服务的方法