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 / 问题 / 857334
Accepted
mr.zog
mr.zog
Asked: 2017-06-23 10:18:53 +0800 CST2017-06-23 10:18:53 +0800 CST 2017-06-23 10:18:53 +0800 CST

Icinga 1 主机状态不可访问,但所有检查均正常

  • 772

这是分布式 Icinga 1 环境。

我在 Icinga 1 客户端/卫星上有大约 100 台主机,它们处于 UNREACHABLE 状态。每个主机的所有四项检查都返回 OK 状态,但设备的整体状态是 UNREACHABLE。

问题可能是由于我让 Icinga 1 以错误的 /usr/lib64/nagios/plugins/check_icmp 权限运行所致。(check_icmp 没有设置 suid 位。)

所以我停止了 Icinga 并清空了卫星上的状态保留文件(state_retention_file=/var/spool/icinga/retention.dat),但这并没有帮助。如果我清空主机上的同一个文件可能会有所帮助吗?

ps 显示我的 submit_check_result.sh submit_host_check.sh 脚本作为僵尸运行,但它们的寿命不长。

icinga
  • 2 2 个回答
  • 453 Views

2 个回答

  • Voted
  1. mr.zog
    2017-06-23T12:25:15+08:002017-06-23T12:25:15+08:00

    我不得不在客户端恢复我的支票转发脚本。

    以下是破损的部分。

    # BEGIN submit_check_result.sh
    ##############################
    
    return_code=-1
    
    case "$3" in
        OK)
            return_code=0
            ;;
        WARNING)
            return_code=1
            ;;
        CRITICAL)
            return_code=2
            ;;
        CRITICAL)
            return_code=2
            ;;
    esac
    /usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$4" | /usr/sbin/send_nsca -H 111.14.219.31 -c /etc/nagios/send_nsca.cfg &
    # END Check_result
    
    ##############################
    
    BEGIN submit_host_result.sh
    
    ##############################
    
    return_code=2
    
    case "$3" in
        OK)
            return_code=0
            ;;
        WARNING)
            return_code=1
            ;;
        CRITICAL)
            return_code=2
            ;;
        UNKNOWN)
            return_code=2
            ;;
    esac
    
    END Check_host
    ##############################
    
    • 0
  2. Best Answer
    mr.zog
    2017-06-23T12:30:00+08:002017-06-23T12:30:00+08:00

    这似乎已经解决了这个问题。

    猫 /etc/icinga/scripts/submit_check_result.sh

    return_code=-1
    
    case "$3" in
        OK)
            return_code=0
            ;;
        WARNING)
            return_code=1
            ;;
        CRITICAL)
            return_code=2
            ;;
        UNKNOWN)
            return_code=-1
            ;;
    esac
    
    # pipe the service check info into the send_nsca program, which
    # in turn transmits the data to the nsca daemon on the central
    # monitoring server
    # submit to master Icinga den-mon-prod
    
    /usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$4" | /usr/sbin/send_nsca -H 111.14.219.31 -c /etc/nagios/send_nsca.cfg &
    

    猫 /etc/icinga/scripts/submit_host_check.sh

    return_code=-1
    
    case "$2" in
        UP)
            return_code=0
            ;;
        DOWN)
            return_code=1
            ;;
        DOWN)
            return_code=2
            ;;
        UNREACHABLE)
            return_code=3
            ;;
    esac
    
    /usr/bin/printf "%s\t%s\t%s\t%s\n" "$1" "$2" "$return_code" "$4" | /usr/sbin/send_nsca -H 111.14.219.31 -c /etc/nagios/send_nsca.cfg &
    
    • 0

相关问题

  • 在 Icinga2 action_url 查询字符串中使用 service.check_command 变量

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