zoukankan      html  css  js  c++  java
  • centreon ---监控软件

    centreon ---监控软件
    centreon是开源的IT监控软件,由法国人于2003年开发,最初名为Oreon,并于2005年正式更名为centreon。
    centreon作为nagios的分布式监控管理平台,其功能之强大,打造了centreon在IT监控方面强势地位,
    它的底层使用nagios监控软件,nagios通过ndoutil模块将监控数据写入数据库,centreon读取该数据并即时的展现监控信息,
    通过centreon可以简单地管理和配置所有nagios,因此,完全可以使用centreon轻易的搭建企业级分布式IT基础运维监控系统
    第一步:
    直接使用下面的iso安装系统
    ces-standard-3.2-x86_64.iso
    第二步:
    使用firefox访问
    http://IP/
    按照图示安装
    Monitoring engine 选择 centreon-engine
    Broker Module 选择 centreon-broker
    设定admin的密码
    设定数据库的centreon用户的密码
    完成后,最后使用admin和你设定的密码登陆
    第三步:
    点configuration --》 host --看到默认监控本机,但是看不到有监控信息
    点Configuration --》 Monitoring Engines --按下面的操作
    Generate Configuration Files
    Run monitoring engine debug (-v) --默认情况这两个前面有打勾,保持这种情况,点下面的export按钮
    Move Export Files
    Restart Monitoring Engine --把上面默认情况的两个勾去掉,再把这两个选项前面打上勾,再次点export按钮
    上面的操作完后,刷新web页面,仍然看不到有监控信息
    去服务器上把cbd服务重启,再刷新,就可以了(默认监控本机及其4个服务)
    # /etc/init.d/cbd restart
    点Monitoring --》 Services --》 All Services --可以看到监控状态和图表
    -------------------------------------------------------
    例一:在默认监控本机的4个服务基础上再加一个服务监控,如/boot分区
    第一步:
    点Configuration --》 Services --》点add
    Description: boot partition --对你增加的服务取一个名字标识(随意取)
    Service Template: SNMP-DISK-/ --选择一个相应的模版来修改,这里我使用根分区的模版来修改我要监控的/boot分区
    Check Period: 24x7
    Check Command: check_local_disk
    Args: warning: 20% --磁盘使用剩余20%警告
    critical: 10% --磁盘使用剩余10%严重警告
    path: /boot --指定监控的磁盘分区的挂载点
    Max Check Attempts: 4
    Normal Check Interval: 5
    Retry Check Interval: 1
    Linked Contacts *: zhangsan --在安装图形界面建立的用户,也就是通知用户
    Linked Contact Groups *: supervisors
    Notification Interval *: 60
    Notification Period *: workhours
    Notification Options: 全打勾,表示所有情况都会通知
    不急save,点relations再在Linked with Hosts里选择你要把此服务应用到哪台主机(我这里选择Centreon-Server,也就是本机),再点save
    save后看不到新加的服务信息,需要做下面第二步
    第二步:
    点Configuration --》 Monitoring Engines --按下面的操作
    Generate Configuration Files
    Run monitoring engine debug (-v) --默认情况这两个前面有打勾,保持这种情况,点下面的export按钮
    Move Export Files
    Restart Monitoring Engine --把上面默认情况的两个勾去掉,再把这两个选项前面打上勾,再次点export按钮
    上面的操作完后,刷新web页面,就能看到了
    课后作业:
    加一个服务监控本机的zombie进程(要求5个警告,10个严重警告)
    步骤:
    1,先需要自己新加一个command,因为默认的check_local_procs命令用的参数不能指定进程状态
    所以需要自已加一个,再指定$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
    2,加服务,选择使用上面加的command
    3,再操作下面的步骤使之生效
    点Configuration --》 Monitoring Engines --按下面的操作
    Generate Configuration Files
    Run monitoring engine debug (-v) --默认情况这两个前面有打勾,保持这种情况,点下面的export按钮
    Move Export Files
    Restart Monitoring Engine --把上面默认情况的两个勾去掉,再把这两个选项前面打上勾,再次点export按钮
    ---------------------------------------------------------------------------------------------------------------------------------
    例二:监控远程
    centreon服务器  ---》 被监控端
    172.16.2.11
    第一步:
    在centreon服务器上操作
    # snmpwalk -v 1 -c public 127.0.0.1 --有信息,表示可以监控
    # snmpwalk -v 1 -c public 被监控机IP --没有信息,表示现在不可以监控
    第二步:
    在被监控机上操作
    1,# yum install net-snmp* --使用本地镜像的yum源就可以安装了
    2,# vim /etc/snmp/snmpd.conf
    62 access notConfigGroup "" any noauth exact all none none
    (把systemview改成all)
    85 view all included .1 80 --把这句注释打开
    # systemctl restart snmpd.service
    # systemctl status snmpd.service
    # systemctl enable snmpd.service
    # netstat -ntlup |grep snmp --远程监控注意防火墙要允许UDP的161端口
    tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 11504/snmpd
    udp 0 0 0.0.0.0:161 0.0.0.0:* 11504/snmpd
    第三步:
    再回到centreon服务器上操作
    # snmpwalk -v 1 -c public 被监控机IP --有信息了
    第四步:
    回到centreon服务器的web管理界面
    点Configuration --》 Hosts --》点add
    Host Name: remotelinux11
    Alias: remotelinux11
    IP Address: 172.16.2.11
    Template : Servers-Linux
    Check Period : 24x7
    Check Command: check_host_alive
    Max Check Attempts : 10
    Normal Check Interval : 5
    Retry Check Interval : 1
    Linked Contacts *: zhang san --在安装图形界面建立的用户
    Linked Contact Groups *: supervisors
    Notification Interval *: 120
    Notification Period *: workhours
    Notification Options: 全打勾,表示所有情况都会通知
    First notification delay : 60
    不急save,点relations把Linux-Servers加上,再点save
    第五步:
    点configuration --》 host --看到默认监控本机,但是看不到有监控信息
    点Configuration --》 Monitoring Engines --按下面的操作
    Generate Configuration Files
    Run monitoring engine debug (-v) --默认情况这两个前面有打勾,保持这种情况,点下面的export按钮
    Move Export Files
    Restart Monitoring Engine --把上面默认情况的两个勾去掉,再把这两个选项前面打上勾,再次点export按钮
    上面的操作完后,刷新web页面,就可以看到两台的监控信息(本机和远程)
  • 相关阅读:
    如何在magento添加推荐分类
    Apache和iis的冲突处理
    怎么在windows7下搭建服务器
    centos dns配置
    wget net-tools
    centos7 ip地址设置
    centos 7 u盘安装
    centos7 u盘启动路径设置
    screen 命令
    lnmp重置mysql密码
  • 原文地址:https://www.cnblogs.com/skyzy/p/9201373.html
Copyright © 2011-2022 走看看