热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Nagios监控客户端应用81,82,22

监控客户端81,82,22,[root@svr4~]#vimusrlocalnagiosetcobjectshosts.cfgdefinehost{host_namesvr1.labexam.comaliassvr1address10.1.1.10contact_groupssagroupcheck_commandcheck-host-alivecheck_commandnrpe!check_us

监控客户端81,82,22,
[root@svr4 ~]# vim /usr/local/nagios/etc/objects/hosts.cfg 
define host {
host_name svr1.labexam.com
alias svr1
address 10.1.1.10
contact_groups sagroup
check_command check-host-alive
check_command nrpe!check_users
check_command nrpe!check_total_procs
check_command nrpe!check_load
max_check_attempts 4
notification_interval 5
notification_period 24x7
notification_options d,u,r
}
 
 
[root@svr4 objects]# vim svr1_services.cfg 
define service {
        host_name svr1.labexam.com
        service_description ALIVE
        check_period 24x7
        max_check_attempts 2
        normal_check_interval 2
        retry_check_interval 1
        contact_groups sagroup
        notification_interval 5
        notification_period 24x7
        notification_options w,u,c,r
        check_command check-host-alive
}
 
define service {
        host_name svr1.labexam.com
        service_description SSH
        check_period 24x7
        max_check_attempts 2
        normal_check_interval 1
        retry_check_interval 2
        contact_groups sagroup
        notification_interval 5
        notification_period 24x7
        notification_options w,u,c,r
        check_command check_tcp!22
}
 
define service {
        host_name svr1.labexam.com
        service_description  HTTP_81
        check_period 24x7
        max_check_attempts 2
        normal_check_interval 1
        retry_check_interval 1
        contact_groups sagroup
        notification_interval 5
        notification_period 24x7
        notification_options w,u,c,r
        check_command check_tcp!81
}
 
define service {
        host_name svr1.labexam.com
        service_description  HTTP_82
        check_period 24x7
        max_check_attempts 2
        normal_check_interval 1
        retry_check_interval 1
        contact_groups sagroup
        notification_interval 5
        notification_period 24x7
        notification_options w,u,c,r
        check_command check_tcp!82
}
define service {
        host_name svr1.labexam.com
        service_description FASTCGI
        check_period 24x7
        max_check_attempts 2
        normal_check_interval 1
        retry_check_interval 1
        contact_groups sagroup
        notification_interval 5
        notification_period 24x7
        notification_options w,u,c,r
        check_command check_tcp!9000
}
define service {
        host_name svr1.labexam.com
        service_description DISK
        check_period 24x7
        max_check_attempts 3
        normal_check_interval 2
        retry_check_interval 2
        contact_groups sagroup
        notification_interval 2
        notification_period 24x7
        notification_options w,u,c,r
        check_command nrpe!check_df
}
 
define service {
        host_name svr1.labexam.com
        service_description LOAD
        check_period 24x7
        max_check_attempts 3
        normal_check_interval 2
        retry_check_interval 2
        contact_groups sagroup
        notification_interval 2
        notification_period 24x7
        notification_options w,u,c,r
        check_command nrpe!check_load
}
 
define service {
        host_name svr1.labexam.com
        service_description  LOGOIN
        check_period 24x7
        max_check_attempts 2
        normal_check_interval 1
        retry_check_interval 1
        contact_groups sagroup
        notification_interval 5
        notification_period 24x7
        notification_options w,u,c,r
        check_command nrpe!check_users
}
 
[root@svr4 objects]# vim /usr/local/nagios/etc/nagios.cfg 
增加一条:
cfg_file=/usr/local/nagios/etc/objects/svr1_services.cfg
 
[root@svr4 objects]# /etc/init.d/nagios reload
Running configuration check...done.
Reloading nagios configuration...done


推荐阅读
  • iOS Swift中如何实现自动登录?
    本文介绍了在iOS Swift中如何实现自动登录的方法,包括使用故事板、SWRevealViewController等技术,以及解决用户注销后重新登录自动跳转到主页的问题。 ... [详细]
  • Linux服务器密码过期策略、登录次数限制、私钥登录等配置方法
    本文介绍了在Linux服务器上进行密码过期策略、登录次数限制、私钥登录等配置的方法。通过修改配置文件中的参数,可以设置密码的有效期、最小间隔时间、最小长度,并在密码过期前进行提示。同时还介绍了如何进行公钥登录和修改默认账户用户名的操作。详细步骤和注意事项可参考本文内容。 ... [详细]
  • IhaveconfiguredanactionforaremotenotificationwhenitarrivestomyiOsapp.Iwanttwodiff ... [详细]
  • 本文讨论了在Windows 8上安装gvim中插件时出现的错误加载问题。作者将EasyMotion插件放在了正确的位置,但加载时却出现了错误。作者提供了下载链接和之前放置插件的位置,并列出了出现的错误信息。 ... [详细]
  • 本文主要解析了Open judge C16H问题中涉及到的Magical Balls的快速幂和逆元算法,并给出了问题的解析和解决方法。详细介绍了问题的背景和规则,并给出了相应的算法解析和实现步骤。通过本文的解析,读者可以更好地理解和解决Open judge C16H问题中的Magical Balls部分。 ... [详细]
  • 本文讨论了使用差分约束系统求解House Man跳跃问题的思路与方法。给定一组不同高度,要求从最低点跳跃到最高点,每次跳跃的距离不超过D,并且不能改变给定的顺序。通过建立差分约束系统,将问题转化为图的建立和查询距离的问题。文章详细介绍了建立约束条件的方法,并使用SPFA算法判环并输出结果。同时还讨论了建边方向和跳跃顺序的关系。 ... [详细]
  • Android Studio Bumblebee | 2021.1.1(大黄蜂版本使用介绍)
    本文介绍了Android Studio Bumblebee | 2021.1.1(大黄蜂版本)的使用方法和相关知识,包括Gradle的介绍、设备管理器的配置、无线调试、新版本问题等内容。同时还提供了更新版本的下载地址和启动页面截图。 ... [详细]
  • 解决Cydia数据库错误:could not open file /var/lib/dpkg/status 的方法
    本文介绍了解决iOS系统中Cydia数据库错误的方法。通过使用苹果电脑上的Impactor工具和NewTerm软件,以及ifunbox工具和终端命令,可以解决该问题。具体步骤包括下载所需工具、连接手机到电脑、安装NewTerm、下载ifunbox并注册Dropbox账号、下载并解压lib.zip文件、将lib文件夹拖入Books文件夹中,并将lib文件夹拷贝到/var/目录下。以上方法适用于已经越狱且出现Cydia数据库错误的iPhone手机。 ... [详细]
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • mac php错误日志配置方法及错误级别修改
    本文介绍了在mac环境下配置php错误日志的方法,包括修改php.ini文件和httpd.conf文件的操作步骤。同时还介绍了如何修改错误级别,以及相应的错误级别参考链接。 ... [详细]
  • Java学习笔记之使用反射+泛型构建通用DAO
    本文介绍了使用反射和泛型构建通用DAO的方法,通过减少代码冗余度来提高开发效率。通过示例说明了如何使用反射和泛型来实现对不同表的相同操作,从而避免重复编写相似的代码。该方法可以在Java学习中起到较大的帮助作用。 ... [详细]
  • 原理:dismiss再弹出,把dialog设为全局对象。if(dialog!null&&dialog.isShowing()&&!(Activity.)isFinishing()) ... [详细]
  • SpringBoot整合SpringSecurity+JWT实现单点登录
    SpringBoot整合SpringSecurity+JWT实现单点登录,Go语言社区,Golang程序员人脉社 ... [详细]
  • 本文详细介绍了在Centos7上部署安装zabbix5.0的步骤和注意事项,包括准备工作、获取所需的yum源、关闭防火墙和SELINUX等。提供了一步一步的操作指南,帮助读者顺利完成安装过程。 ... [详细]
  • 本文介绍了5个基本Linux命令行工具的现代化替代品,包括du、top和ncdu。这些替代品在功能上进行了改进,提高了可用性,并且适用于现代化系统。其中,ncdu是du的替代品,它提供了与du类似的结果,但在一个基于curses的交互式界面中,重点关注占用磁盘空间较多的目录。 ... [详细]
author-avatar
性感然小猫儿丿
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有