用nagios监控指定的端口
2010-08-07 20:57
274 查看
某一台服务器需要监控4000端口
修改 /usr/local/nagios/etc/objects/commands.cfg 添加一个服务名
# check port 4000
define command{
command_name 4000
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 4000 $ARG2$
}
然后修改linux的模板
vim /usr/local/nagios/etc/objects/web1.cfg 添加一段
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service{
use local-service ; Name of service template to use
host_name web1
service_description 4000
check_command 4000
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 960
notification_period 24x7
}本文出自 “无云安全技术站” 博客,请务必保留此出处http://hx100.blog.51cto.com/44326/369427
修改 /usr/local/nagios/etc/objects/commands.cfg 添加一个服务名
# check port 4000
define command{
command_name 4000
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 4000 $ARG2$
}
然后修改linux的模板
vim /usr/local/nagios/etc/objects/web1.cfg 添加一段
# Define a service to check HTTP on the local machine.
# Disable notifications for this service by default, as not all users may have HTTP enabled.
define service{
use local-service ; Name of service template to use
host_name web1
service_description 4000
check_command 4000
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 1
retry_check_interval 1
contact_groups admins
notification_options w,u,c,r
notification_interval 960
notification_period 24x7
}本文出自 “无云安全技术站” 博客,请务必保留此出处http://hx100.blog.51cto.com/44326/369427
相关文章推荐
- nagios插件之监控udp端口状态
- nagios监控远程端口
- 部署Nagios监控系统(二)监控远程主机的指定服务
- CentOS6.4 安装Nagios 并监控端口
- nagios监控指定的目录大小
- 使用nagios监控交换机端口流量,对低于阈值的流量进行报警
- nagios利用snmp监控路由器端口状态问题
- nagios监控远程主机端口
- Nagios监控内存和某个端口是否开启
- nagios监控redis端口、监控url接口告警脚本
- SSH更换端口后,nagios监控ssh设置
- 使用nagios监控指定进程
- nagios监控远程主机端口
- 部署Nagios监控系统(二)监控远程主机的指定服务
- 用nagios监控交换机的端口
- nagios监控之四配置监控web服务,端口,mysql等状态
- nagios监控windows 改了NSclient++默认端口 注意事项
- nagios 监控交换机端口
- 使用端口映射的方式通过nagios监控主机
- zabbix使用自己编写脚本模板和zabbix自带模板两种方法添加对指定进程和端口的监控