首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Nagios3表示localhost在ping上,但是没有写ping检查。

Nagios3表示localhost在ping上,但是没有写ping检查。
EN

Server Fault用户
提问于 2016-06-19 11:30:20
回答 1查看 1.3K关注 0票数 0

禁用了Nagios3和Ubuntu 14的ping请求。

本地主机一直在GUI nagios界面中报告它已关闭。

这是安装后在conf.d .d dir中找到的默认"localhost_nagios2.cfg“:

代码语言:javascript
复制
# A simple configuration file for monitoring the local host
# This can serve as an example for configuring other servers;
# Custom services specific to this host are added here, but services
# defined in nagios2-common_services.cfg may also apply.
#

define host{
        use                     generic-host            ; Name of host template to use
        host_name               localhost
        alias                   localhost
        address                 127.0.0.1
        }

# Define a service to check the disk space of the root partition
# on the local machine.  Warning if < 20% free, critical if
# < 10% free space on partition.

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       localhost
        service_description             Disk Space
        check_command                   check_all_disks!20%!10%
        }



# Define a service to check the number of currently logged in
# users on the local machine.  Warning if > 20 users, critical
# if > 50 users.

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       localhost
        service_description             Current Users
        check_command                   check_users!20!50
        }


# Define a service to check the number of currently running procs
# on the local machine.  Warning if > 250 processes, critical if
# > 400 processes.

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       localhost
        service_description             Total Processes
                check_command                   check_procs!250!400
        }



# Define a service to check the load on the local machine.

define service{
    use                             generic-service         ; Name of service template to use
    host_name                       localhost
    service_description             Current Load
            check_command                   check_load!5.0!4.0!3.0!10.0!6.0!4.0
    }

这几乎是开箱即用的配置。我更改了泛型主机,以便不切换任何内容:

代码语言:javascript
复制
# Generic host definition template - This is NOT a real host, just a template!

define host{
        name                            generic-host    ; The name of this host template
        notifications_enabled           1       ; Host notifications are enabled
        event_handler_enabled           1       ; Host event handler is enabled
        flap_detection_enabled          1       ; Flap detection is enabled
        failure_prediction_enabled      1       ; Failure prediction is enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts
                max_check_attempts              10
                notification_interval           0
                notification_period             24x7
                notification_options            d,u,r
                contact_groups                  admins
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
        }

我监视的其他服务器都很好,nagios没有对它们运行任何ping检查。然而,nagios不会停止抱怨本地主机处于临界状态.在平上:

我已经仔细检查了谷歌的产品一个多小时了,我想不出该如何关掉这张支票。

我的问题是:这实际上是关闭并处于锁定的“关闭”状态,还是有另一个设置我错过了以阻止本地主机运行ping检查?

谢谢。约翰

EN

回答 1

Server Fault用户

回答已采纳

发布于 2016-06-20 14:26:36

您必须使用一些东西作为主机检查,否则状态将永远不会改变。

注意上面写着“最后一次检查”是在十七号,尽管你在十九号拍了这张截图?

如果您不想使用check_ping,请选择另一个插件进行主机检查。或者让它点击本地主机,这样做没有什么坏处,尽管这似乎是不必要的。

还有check_dummy,您可以使用它始终返回UP进行主机检查。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/784869

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档