AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 784869
Accepted
John
John
Asked: 2016-06-20 03:30:20 +0800 CST2016-06-20 03:30:20 +0800 CST 2016-06-20 03:30:20 +0800 CST

Nagios3 说 localhost 在 ping 上关闭,但没有写入 ping 检查

  • 772

Nagios3 和 Ubuntu 14 禁用了 ping 请求。

localhosts 在 GUI nagios 界面中不断报告它已关闭。

这是安装后在 conf.d 目录中找到的默认“localhost_nagios2.cfg”:

# 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
    }

这几乎是开箱即用的配置。我更改了 generic-host 以免 ping 任何东西:

# 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 上: 在此处输入图像描述

我已经仔细检查了 Google 的产品一个多小时,但无法弄清楚如何关闭此检查。

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

谢谢。约翰

nagios
  • 1 1 个回答
  • 1229 Views

1 个回答

  • Voted
  1. Best Answer
    Keith
    2016-06-21T06:26:36+08:002016-06-21T06:26:36+08:00

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

    请注意它说“最后一次检查”是在 17 日,即使您在 19 日拍摄了这张截图?

    如果您不想使用check_ping,请选择另一个插件用于主机检查。或者只是让它ping localhost;这并没有什么坏处,即使它看起来没有必要。

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

    • 1

相关问题

  • 使用 Nagios 监视 Novell 集群服务

  • 异地nagios?[关闭]

  • 是否有任何可用的图形工具来为主机生成 nagios 用户提供的地图坐标?

  • 我如何开始使用 Nagios?

  • 如何为 Exchange 邮件存储配置 Nagios 警报

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve