网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

nagios监控本机及远程机器

cd /usr/local/nagios/etc/objects
vim localhost.cfg

define host{
       use                     linux-server                                      
       host_name               localhost
       alias                   localhost
       address                 127.0.0.1
       }

# Define an optional hostgroup for Linux machines

define hostgroup{
       hostgroup_name  linux-servers ; The name of the hostgroup
       alias           Linux Servers ; Long name of the group
       members         localhost     ; Comma separated list of hosts that belong to this group
       }

# Define a service to "ftp" the local machine

define service{
       use                             local-service         ; Name of service template to use
       host_name                       localhost
       service_description             FTP
       check_command                   check_ftp
       }

# Define a service to "nfs" the local machine

define service{
       use                             local-service         ; Name of service template to use
       host_name                       localhost
       service_description             NFS
       check_command                   check_tcp!2049
       }

创新互联-专业网站定制、快速模板网站建设、高性价比富川网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式富川网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖富川地区。费用合理售后完善,10余年实体公司更值得信赖。


监控远程主机

==============================================================================

cd /usr/local/nagios/etc/objects
cp localhost.cfg 192.168.0.164.cfg
vim 192.168.122.100

define host{
       use                     linux-server    
       host_name               testserver
       alias                   host196
       address                 192.168.122.100
       }

#define hostgroup{
#        hostgroup_name  testserver ; The name of the hostgroup
#        alias           host; Long name of the group
#        members         localhost   ; Comma separated list of hosts that belong to this group
#}

define service{
       use                             local-service
       host_name                       testserver
       service_description             PING
       check_command                   check_ping!100.0,20%!500.0,60%
       }

define service{
       use                             local-service  
host_name                       testserver
       service_description             HTTP
       check_command                   check_http
#       notifications_enabled           0
       }

define service{
       use                             local-service
       host_name                       testserver
       service_description             NFS
       check_command                   check_tcp!2049
#       notifications_enabled           0
       }

=============================================================================

更改主配置文件

vim /usr/local/nagios/etc/nagios.cfg

添加一行
cfg_file=/usr/local/nagios/etc/objects/192.168.122.100.cfg

检测新的配置文件是否正确

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
=============================================================================


nagios 监控本机及远程机器

nagios 监控本机及远程机器


当前题目:nagios监控本机及远程机器
文章转载:http://bjjierui.cn/article/iepods.html

其他资讯