ganglia 问题求教

杨东祥 发布于 2014/12/01 20:58
阅读 439
收藏 0

系统环境: Centos 6.5 x86_64

软件版本: ganglia-3.6.1  rrdtool-1.4.7.tar.gz apapche-2.4.10 php-5.4.35


ganglia gmetad.conf

data_source "mycluster" 10  localhost

gridname "mygrid"

xml_port 8651

interactive_port 8652

rrd_rootdir "/opt/app/ganglia/rrds"

httpd.conf  配置文件信息

PidFile /usr/local/apache/logs/
Listen 80
LoadModule authn_file_module modules/
LoadModule authn_socache_module modules/
LoadModule authn_core_module modules/
LoadModule authz_host_module modules/
LoadModule authz_groupfile_module modules/
LoadModule authz_user_module modules/
LoadModule authz_core_module modules/
LoadModule access_compat_module modules/
LoadModule auth_basic_module modules/
LoadModule socache_shmcb_module modules/
LoadModule reqtimeout_module modules/
LoadModule filter_module modules/
LoadModule mime_module modules/
LoadModule log_config_module modules/
LoadModule env_module modules/
LoadModule headers_module modules/
LoadModule setenvif_module modules/
LoadModule version_module modules/
LoadModule proxy_module modules/
LoadModule proxy_fcgi_module modules/
LoadModule ssl_module modules/
LoadModule mpm_event_module modules/
LoadModule unixd_module modules/
LoadModule status_module modules/
LoadModule autoindex_module modules/
LoadModule dir_module modules/
LoadModule alias_module modules/
LoadModule rewrite_module modules/
<IfModule unixd_module>
User nobody
Group nobody
<Directory />
    AllowOverride none
    Require all granted
<Directory "/usr/local/apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
<IfModule dir_module>
    DirectoryIndex index.php index.html
    AddType application/x-httpd-php .php
<Files ".ht*">
    Require all denied
ErrorLog "logs/error_log"
LogLevel warn
#<IfModule log_config_module>
#    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
#    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" main
#    LogFormat "%h %l %u %t "%r" %>s %b" common
#    <IfModule logio_module>
#      LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
#    </IfModule>
#    CustomLog "logs/access_log" common
LogLevel warn

<IfModule log_config_module>
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    CustomLog "logs/access_log" common

    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog "logs/access_log" combined
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
<IfModule cgid_module>
<Directory "/usr/local/apache/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
<IfModule mime_module>
    TypesConfig /usr/local/apache/conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
Include /usr/local/apache/conf/extra/httpd-vhosts.conf
Include /usr/local/apache/conf/extra/httpd-default.conf
<IfModule proxy_html_module>
Include /usr/local/apache/conf/extra/proxy-html.conf
#Include /usr/local/apache2410/conf/extra/httpd-ssl.conf
#<IfModule ssl_module>
#SSLRandomSeed startup builtin
#SSLRandomSeed connect builtin

http-vhost.conf 配置文件

<VirtualHost *:80>
    DocumentRoot "/usr/local/apache/htdocs"
    <Directory "/usr/local/apache/htdocs" >
        Require all granted
   <LocationMatch "^(.*\.php)$">
    ProxyPass fcgi://$1
    ErrorLog "logs/gangliaweb-error.log"
    CustomLog "logs/gangliaweb-access.log" common

ganglia-web 中conf_default.php配置如下:

$conf['gweb_confdir'] = "/usr/local/apache/htdocs/ganglia";已修改属主和属组为nobody

$conf['gmetad_root'] = "/opt/app/ganglia";

$conf['rrds'] = "${conf['gmetad_root']}/rrds"; 已创建,并授权用户为nobody

$conf['dwoo_compiled_dir'] = "${conf['gweb_confdir']}/dwoo/compiled"; 已创建,并授权为777

$conf['dwoo_cache_dir'] = "${conf['gweb_confdir']}/dwoo/cache";已创建,并授权为777

$conf['rrdtool'] = "/opt/rrdtool/bin";

如果修改$conf['rrdtool'] = "/opt/rrdtool/bin"; 为$conf['rrdtool'] = "/opt/rrdtool/bin/rrdtool";系统负载会很高,后台会产生大量的rrdtool进程。如果是/opt/rrdtool/bin,则很快会降下来。