打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
用munin监控系统和应用(mysql)

用munin监控系统和应用(mysql)  

2011-03-02 18:02:05|  分类: rhel_监控 |  标签:munin  mysql  rpm  el5  yum   |字号 订阅

很复杂的东西被yum+epel变的很简单,cacti添加主机挺麻烦的,opmanager也挺复杂,胡乱搞了下munin,效果还挺好的,选munin的原因就是“简单还挺全面”。

下面是一些杂乱的记录,各位看官将就着看吧,内含大图。

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
装了这个之后,会在/etc/yum.repos.d下有epel-testing.repo和epel.repo文件,这两个文件为RHEL5定义了一些额外的源,包括dsniff和rrdtool之类的。

我猜界面的定义可以增减/etc/munin/plugins来实现,默认界面监控了很多元素,可以适当精简下。

[root@S3 plugins]# ls
cpu  df_inode  forks       if_err_eth0  if_eth0  interrupts  iostat_ios  load    netstat     open_inodes  processes  threads  users   yum
df   entropy   fw_packets  if_err_eth1  if_eth1  iostat      irqstats    memory  open_files  proc_pri     swap       uptime   vmstat

这个源的munin是1.2.x的,最好升级到1.4.x的,这样可以多出100多个插件,可以从官方网站上下载最新的RPM包,插件在/usr/share/munin/plugins/,具体插件列在下面。

安装和升级服务端:

安装服务端 yum install munin -y

升级服务端 yum –nogpgcheck install munin-node-1.4.1-0.rpl3.el5.noarch.rpm

安装和升级客户端:

安装客户端 yum install munin-node -y

升级客户端

wget http://nchc.dl.sourceforge.net/project/munin/munin%20stable/1.4.2/rpms/el5/munin-common-1.4.2-0.rpl1.el5.noarch.rpm
 wget http://nchc.dl.sourceforge.net/project/munin/munin%20stable/1.4.2/rpms/el5/munin-node-1.4.2-0.rpl1.el5.noarch.rpm
 yum –nogpgcheck localinstall munin-common-1.4.2-0.rpl1.el5.noarch.rpm 
 yum –nogpgcheck localinstall munin-node-1.4.2-0.rpl1.el5.noarch.rpm

这里有mysql的增强插件

http://oierud.name/~kjellm/code/,下载方法 git clone git://github.com/kjellm/munin-mysql.git

要使默认的mysql插件工作,需要做如下设置:

yum install perl-Cache-Cache -y

  • Create a MySQL user with a password that is NOT granted privilege to any DB. Simply create the user.
  • Create a file called /etc/munin/plugin-conf.d/munin-node
  • In the file /etc/munin/plugin-conf.d/munin-node put this:
    [mysql*]
    user root
    group wheel
    env.mysqladmin /usr/bin/mysqladmin
    env.mysqlopts -u [MySQL_usr] -p[MySQL_usrpassword]
  • Then Save. Where [MySQL_usr] is a valid MySQL user and [MySQL_usrpassword] is it’s password. Note that there is NO space between -p and the password. This is critical.
  • acpi                    df_inode                  iostat_ios         nfs4_client          postgres_checkpoints     snmp__if_                  squid_cache
    amavis                  dhcpd3                    ip_                nfs_client           postgres_connections_    snmp__if_err_              squid_icp
    apache_accesses         digitemp_                 ipac-ng            nfsd                 postgres_connections_db  snmp__if_multi             squid_objectsize
    apache_processes        diskstat_                 ipmi_              nfsd4                postgres_locks_          snmp__load                 squid_requests
    apache_volume           ejabberd_                 ipmi_sensor_       nginx_request        postgres_querylength_    snmp__memory               squid_traffic
    apc_envunit_            entropy                   ircu               nginx_status         postgres_scans_          snmp__netapp_diskusage_    surfboard
    apc_nis                 env                       irqstats           nomadix_users_       postgres_size_           snmp__netapp_inodeusage_   swap
    apt                     exim_mailqueue            jmx_               ntp_                 postgres_transactions_   snmp__netstat              threads
    apt_all                 exim_mailqueue_alt        load               ntp_kernel_err       postgres_tuples_         snmp__print_pages          tomcat_
    asterisk_channels       exim_mailstats            loggrep            ntp_kernel_pll_freq  postgres_users           snmp__print_supplies       tomcat_access
    asterisk_channelstypes  extinfo_tester            lpstat             ntp_kernel_pll_off   postgres_xlog            snmp__processes            tomcat_jvm
    asterisk_codecs         fail2ban                  mailman            ntp_offset           proc_pri                 snmp__rdp_users            tomcat_threads
    asterisk_meetme         files_                    mailscanner        ntp_states           processes                snmp__sensors_fsc_bx_fan   tomcat_volume
    asterisk_meetmeusers    foldingathome             mbmon_             nut_misc             ps_                      snmp__sensors_fsc_bx_temp  uptime
    asterisk_sipchannels    foldingathome_rank        memcached_         nut_volts            psu_                     snmp__sensors_fsc_fan      users
    asterisk_sippeers       foldingathome_wu          memory             nutups_              qmailqstat               snmp__sensors_fsc_temp     varnish_
    asterisk_voicemail      forks                     mhttping           nvidia_              qmailscan                snmp__sensors_mbm_fan      vlan_
    bind9                   fw_conntrack              multigraph_tester  open_files           qmailscan-simple         snmp__sensors_mbm_temp     vlan_inetuse_
    bind9_rndc              fw_forwarded_local        multiping          open_inodes          quota_usage_             snmp__sensors_mbm_volt     vlan_linkuse_
    bonding_err_            fw_packets                multips            openvpn              samba                    snmp__swap                 vmstat
    cmc_tc_sensor_          haproxy_                  munin_stats        perdition            sendmail_mailqueue       snmp__uptime               vserver_cpu_
    colour_tester           hddtemp                   munin_update       ping_                sendmail_mailstats       snmp__users                vserver_loadavg
    courier_                hddtemp2                  mysql_             plugin.sh            sendmail_mailtraffic     snmp__winload              vserver_resources
    courier_mta_mailqueue   hddtemp_smartctl          mysql_bytes        plugins.history      sensors_                 snmp__winmem               warning_tester
    courier_mta_mailstats   hddtempd                  mysql_innodb       pm3users_            slapd_                   snort_alerts               yum
    courier_mta_mailvolume  http_loadtime             mysql_isam_space_  pop_stats            slapd_bdb_cache_         snort_bytes_pkt            zimbra_
    cps_                    id                        mysql_queries      port_                slony_lag_               snort_drop_rate
    cpu                     if_                       mysql_slowqueries  postfix_mailqueue    smart_                   snort_pattern_match
    cpuspeed                if_err_                   mysql_threads      postfix_mailstats    snmp__cpuload            snort_pkts
    cupsys_pages            ifx_concurrent_sessions_  named              postfix_mailvolume   snmp__df                 snort_traffic
    df                      interrupts                netopia            postgres_bgwriter    snmp__fc_if_             spamstats
    df_abs                  iostat                    netstat            postgres_cache_      snmp__fc_if_err_         squeezebox_

    本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
    打开APP,阅读全文并永久保存 查看更多类似文章
    猜你喜欢
    类似文章
    【热】打开小程序,算一算2024你的财运
    Linux监控工具munin的安装和配置
    不能错过的十大网络监控神器
    web部署时linux下的常用命令
    Munin强大的服务器性能状态监控软件
    Build Scalable Web 2.0 Sites with Ubuntu, Symfony, and Lighttpd
    [Linux实用工具]Linux监控工具munin的安装和配置
    更多类似文章 >>
    生活服务
    热点新闻
    分享 收藏 导长图 关注 下载文章
    绑定账号成功
    后续可登录账号畅享VIP特权!
    如果VIP功能使用有故障,
    可点击这里联系客服!

    联系客服