本文目录一览:
- 1、请给个python-rrdtool模块的windows下的安装方法
- 2、怎样用ganglia监控windows服务器
- 3、windows xp 下监控本机 cacti不显示图像
- 4、centos5.5安装rrdtool-1.0.49 编辑后 make报错如下 我是64位机器 报错如下,希望各位达人帮忙解决
- 5、什么是rrdtool抓图任务计划
- 6、windows上怎样安装使用net-snmp和rrdtool
请给个python-rrdtool模块的windows下的安装方法
以安装Httplib2模块为例 1 下载模块 到 百度去搜一下” 下载一款适合你的压缩包“httplib2-0.4.0.zip” 2 解压下载的压缩包“httplib2-0.4.0.zip”到某目录下 3配置python在dos下的运行环境 (之前需要配置系统环境变量,在系统环境变量Path后添加pyt...
怎样用ganglia监控windows服务器
Ganglia 监控软件主要是用来监控系统性能的软件,如:cpu 、mem、硬盘利用率, I/O负载、网络流量情况等,通过曲线很容易见到每个节点的工作状态,对合理调整、分配系统资源,提高系统整体性能起到重要作用。支持浏览器方式访问,但 不能监控节点硬件技术指标ganglia 是分布式的监控系统,有两个Daemon, 分别是:客户端Ganglia Monitoring Daemon (gmond)
和服务端Ganglia Meta Daemon (gmetad),还有Ganglia PHP Web Frontend(基于web的动态访问方式)组成。是一个Linux下图形化监控系统运行性能的软件,界面美观、丰富,功能强大。RRDtool是系统 存放和显示time-series (即网络带宽、温度、人数、服务器负载等) 。并且它提出有用的图表由处理数据强制执行有些数据密度。-rrdtoolwindows64位
一、安装RRDTool
gmetad需要先安装RRDTool,安装路径:/usr/local/rrdtool
rrdtool安装需要下面的库文件,如果没有请进行安装。
pkgconfig安装
./configure --prefix=/usr/local/pkgconfig CFLAGS="-O3 -fPIC"
zlib安装
./configure --prefix=/usr/local/zlib CFLAGS="-O3 -fPIC" --shared
libpng安装
env CFLAGS="-O3 -fPIC" ./configure --prefix=/usr/local/libpng
freetype安装
./configure --prefix=/usr/local/freetype CFLAGS="-O3 -fPIC"
LibXML2安装
./configure --prefix=/usr/local/libxml2 CFLAGS="-O3 -fPIC"
fontconfig安装
fontconfig-2.4.2.tar.gz
./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/freetype/bin/freetype-config -rrdtoolwindows64位
Pixman安装
./configure --prefix=/usr/local/pixman CFLAGS="-O3 -fPIC"
Cairo安装
./configure --prefix=$INSTALL_DIR --enable-xlib=no --enable-xlib-xrender=no --enable-win32=no CFLAGS="-O3 -fPIC" -rrdtoolwindows64位
Glib安装
glib-2.20.1.tar.bz2
./configure --prefix=/usr/local/glib CFLAGS="-O3 -fPIC"
pango安装
pango-1.21.1.tar.bz2
需要PKG_CONFIG_PATH,就的指定相应的路径
PKG_CONFIG_PATH=/usr/local/cairo/lib/pkgconfig:/usr/local/glib/lib/pkgconfig:/usr/local/pixman/lib/pkgconfig:/usr/local/freetype/lib/pkgconfig:/usr/local/fontconfig/lib/pkgconfig-rrdtoolwindows64位
export PKG_CONFIG_PATH
然后执行
./configure --prefix=/usr/local/pango --without-x
rrdtool安装
需要PKG_CONFIG_PATH,就的指定相应的路径
PKG_CONFIG_PATH=/usr/local/cairo/lib/pkgconfig:/usr/local/glib/lib/pkgconfig:/usr/local/pixman/lib/pkgconfig:/usr/local/freetype/lib/pkgconfig:/usr/local/fontconfig/lib/pkgconfig:/usr/local/pango/lib/pkgconfig-rrdtoolwindows64位
export PKG_CONFIG_PATH
./configure --prefix=/usr/local/rrdtool --disable-tcl --disable-python
二、安装所需软件,如果系统没有请您先下载安装.如果有软件已安装可以略过
apr
apr-util
confuse
expat
python
rrdtool
ganglia
第二步:安装所下载的软件,
*1)安装expat-2.0.1.tar.gz 大多数Linux 发行版在默认安装的情况下就已经提供了
tar zxvf expat-2.0.1.tar.gz
cd expat
./configure --prefix=/usr/local/expat
make
make install
2)安装apr-1.3.3.tar.gz
tar zxvf apr-1.3.3.tar.gz
cd apr-1.3.3
./configure --prefix=/usr/local/apr
make
make install
3)安装apr-util-1.3.4.tar.gz
tar zxvf apr-util-1.3.4.tar.gz
cd apr-util-1.3.4
./configure --with-apr=/usr/local/apr
make
make install
如果系统没有自带expat,您安装上面方法安装了expat软件,./configure后要加入--with-
expat=/usr/local/expat路径
将/apr/include/apr-1/*拷贝到apr/include/目录,因为ganglia安装gmetad时默认会
去/usr/local/apr/include下寻找apr的库文件
cp /usr/local/apr/include/apr-1/* /usr/local/apr/include/。
4)安装confuse-2.6
tar zxvf confuse-2.6.tar.gz
cd confuse-2.6
./configure --prefix=/usr/local/confuse
make
make install
5)安装rrdtool-1.3.4.tar.gz
tar zxvf rrdtool-1.3.4.tar.gz
cd rrdtool-1.3.4
./configure --prefix=/usr/local/rrdtool
make
make install
*6)安装python-2.6.tgz 大多数Linux 发行版在默认安装的情况下就已经提供了Python
tar zxvf python-2.6.tgz
cd python-2.6
./configure --prefix=/usr/local/python2.6
make
make install
二 安装配置ganglig
1、安装服务器端gmetad
tar xvzf ganglia-3.1.2
2.tar.gz
cd ganglia-3.1.2
./configure --prefix=/usr/local/ganglia --with-librrd=/usr/local/rrdtool --with-libapr=/usr/local/apr --with-libexpat=/usr/local/expat --with-libconfuse=/usr/local/confuse --with-libpython=/usr/lib --with-gmetad --enable-gexec --enable-status --with-python=/usr/lib/python2.2 -rrdtoolwindows64位
make
make install
注: 关于--with-librrd、--with-libapr、 --with-libexpat、 --with-libconfuse、 --with-libpython,ganglia安装所需要的库文件,要依据实际库文件路径设置,就是要依照您安装这些软件的路径。如果在安装这些软件 时并未指定安装路径,一般ganglia安装时就不需要指定--with-libexpat、 --with-libconfuse。其它的还是需要指的,因为ganglia默认安装找不到它们的。 -rrdtoolwindows64位
2、服务器端gmetad设置
a、为了保证在开始时启动,需要将gmetad.init文件拷贝到 /etc/rc.d/init.d/
Your_prompt cd ganglia-3.1.2/gmetad
Your_prompt cp gmetad.init /etc/rc.d/init.d/gmetad
将配置文件拷贝到/etc/ganglia目录下
Your_promptmkdir -p /etc/ganglia
Your_prompt cp gmetad.conf /etc/ganglia/gmetad.conf
b、Add GMETAD to the list of programs at startup
Your_prompt chkconfig --add gmetad
Your_prompt chkconfig --list gmetad
GMETAD 0:ff 1:ff 2:n 3:n 4:n 5:n 6:ff
建立rrds目录并修改权限(需与gmetad.conf中的数据存放路径保持一致,这里采用gmetad默认的存放路径)
Your_prompt mkdir -p /var/lib/ganglia/rrds
Your_promptchown -R nobody /var/lib/ganglia/rrds
c、启动gmetad
Your_promptservice gmetad start
Starting GANGLIA gmetad: [ OK ]
d.Your_prompttelnet localhost 8651 | grep “hostname”
就可以得到监控的各个主机的状态。
3、gmetad.conf的配置
# data_source "another source" 1.3.4.7:8655 1.3.4.8
data_source "SERVER" 10 node1:端口号 node2:端口号
data_source是最重要的参量,在GMOND的Cluser name配置必须与data_source的相同,这个参量被设
置为群的名字,被监测以便能监测那群状态。如果有二个或更多监测对象,当有一对象不能被监测,
将读取data_source 配置的下一个对象。端口号可以根据您自己的要求任意设置,这样可以起到一定
的安全作用,防止其它的gmetad访问到你的客户机数据。
data_source后面如果添加的都是ip 话,效果是:有二个或更多监测对象,当有一对象不能被监测, 才
会将读取data_source 配置的下一个对象。
所以永远是你的第一个有图象
如果这样配置可以实现分组问题。下面是一个简单的例子
一、先单独设置数据源,这时客户端不需要配置
data_source "A" 1.1.1.1
data_source "B" 1.1.1.2
data_source "C" 1.1.2.1
二、我们需要将这三个监测对象添加到同一数据源组,组名为all
1、需要配置A、B、C的客户端配置 name = "all"
2、在服务端添加要分配的数据源组
data_source "all" A B C (这里也可以包含一个ip)
# The name of this Grid. All the data sources above will be wrapped in a GRID
# tag with this name.
# default: Unspecified
gridname "Network-status" #在web上显示GRID的名字,自己可以随意设置
# List of machines this gmetad will share XML with. Localhost
# is always trusted.
# default: There is no default value
# trusted_hosts 127.0.0.1 169.229.50.165 my.gmetad.org #可以设置多台gmetad的XML数据共享,
这样您可以对不同网域设置多台gmetad,由中央gmetad收集XML数据显示在web上。
#设置用户的访问,自己可以根据需要进行修改
# If you don't want gmetad to setuid then set this to off
# default: on #默认需要验证用户
# setuid off
#User gmetad will setuid to (defaults to "nobody")
# default: "nobody" #默认用户为nobody
# setuid_username "认证用户"
#数据存放路径为默认/var/lib/ganglia/rrds,在这里可以看到监测群及群内的机器.
# Where gmetad stores its round-robin databases
# default: "/var/lib/ganglia/rrds"
# rrd_rootdir "/some/other/place"
2) client端安装和配置
a.在linux客户机上安装ganglia,需要apr、apr-util、confuse
apr、apr-util、confuse安装
安装apr-1.3.3.tar.gz
tar zxvf apr-1.3.3.tar.gz
cd apr-1.3.3
./configure --prefix=/usr/local/apr
make
make install
安装apr-util-1.3.4.tar.gz
tar zxvf apr-util-1.3.4.tar.gz
cd apr-util-1.3.4
./configure --with-apr=/usr/local/apr
make
make install
将/apr/include/apr-1/*拷贝到apr/include/目录,因为ganglia安装gmond时默认会去/usr/local/apr/include下寻找apr的库文件
cp /usr/local/apr/include/apr-1/* /usr/local/apr/include/。
安装confuse-2.6
tar zxvf confuse-2.6.tar.gz
cd confuse-2.6
./configure --prefix=/usr/local/confuse
make
make install
安装ganglia client端
Your_prompttar -zxvf ganglia-3.1.2.tar.gz
Your_promptcd ganglia-3.1.2
Your_prompt./configure --prefix=/usr/local/ganglia --with-libapr=/usr/local/apr --with-libconfuse=/usr/local/confuse --enable-gexec --with-pythoy=/usr/local/python/bin/python -rrdtoolwindows64位
Your_promptmake
Your_promptmake install
Your_promptcd gmond
Your_promptgmond –t /etc/ganglia/gmond.conf
Your_promptcp gmond.init /etc/rc.d/init.d/gmond
Your_prompt chkconfig --add gmond
Your_prompt chkconfig --list gmond
gmond 0:ff 1:ff 2:n 3:n 4:n 5:n 6:ff
Your_promptservice gmond start
Starting GANGLIA gmond: [ OK ]
Your_prompttelnet localhost 8649 就可以获取机群内运行gmond的主机的信息
b.在windows客户机上安装ganglia
安装ganglia-3.0.0-setup,解压ganglia-3.1.1-bin.zip,然后将解压ganglia-3.1.1-bin,将里面全部
文件拷贝到ganglia目录gmond下,执行一下gmond.bat。
c.配置gmond.conf
Linux: vi /etc/ganglia/gmond.conf
Windows:开始菜单-程序-ganglia- Configure Ganglia Monitoring Service-gmond.conf
#可修改来验证可读取数据的用户,也可以不做修改。
setuid =
globals {
daemonize = yes
setuid = yes #windows版默认值为no,linux版默认值为yes。如需要验证用户windows版需要修改为yes
user = nobody #默认用户为任意。也可以通过修改来验证可读取数据的用户 ,但此用户必须为本机用户。
debug_level = 0
max_udp_msg_len = 1472
mute = no
deaf = no
host_dmax = 0 /*secs */
cleanup_threshold = 300 /*secs */
gexec = no
send_metadata_interval = 0
}
#根据您在gmetad设置的组名称修改name监控组名称,其它项可以自定义。
/* If a cluster attribute is specified, then all gmond hosts are wrapped inside
* of a CLUSTER tag. If you do not specify a cluster tag, then all HOSTS will
* NOT be wrapped inside of a CLUSTER tag. */
cluster {
name = "unspecified"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
/* The host section describes attributes of the host, like the location */
host {
location = "unspecified"
}
#端口port为gmetad设置的端口号
/* Feel free to specify as many udp_send_channels as you like. Gmond
used to only support having a single channel */
udp_send_channel {
mcast_join = 239.2.11.71
port = 8649
ttl = 1
}
/* You can specify as many udp_recv_channels as you like as well. */
udp_recv_channel {
mcast_join = 239.2.11.71
port = 8649
}
/* You can specify as many tcp_accept_channels as you like to share
an xml description of the state of the cluster */
tcp_accept_channel {
port = 8649
#ACCESS CONTROL #访问控制
#The udp_recv_channel and tcp_accept_channel directives can contain an Access Control
List (ACL). This ACL allows you to specify exactly which hosts gmond process data from
udp_recv_channel #udp接受信道
#在里面添加访问控制命令
acl {
default = "allow"
access {
ip = x.x.x.x
mask = netmask
action = "deny"
}
}
或
tcp_accept_channel
#在里面添加访问控制命令
acl {
default = "deny"
access {
ip = x.x.x.x
mask = netmask
action = "allow"
}
}
配置完成后重新启动gmond
service gmond restart
多ip的时候,多播有问题
/sbin/route add -host 239.2.11.71 dev eth0 #把eth0换成你想收集信息的interface就好了
***************
安装后不显示图形
如果你在RHEL 4以上版本安装Ganglia那么就是SELinux在作怪,可以关闭SELinux
或者执行以下步骤:
vi /etc/selinux/targeted/contexts/files/file_contexts
添加:
/var/lib/ganglia/rrds(/.*)? system_u:bject_r:httpd_sys_script_exec_t
保存退出
执行:setfiles /etc/selinux/targeted/contexts/files/file_contexts /var/lib/ganglia/rrds/
如果还有问题
vi /$web'DocumentRoot/web/conf.php
将define("RRDTOOL", "/usr/local/bin/rrdtool"); 修改成自己的rrdtool路径
好久没有写什么东西了,最近有时间对用ganglia的应用做了一些研究,以前发的关于用ganglia监控服务器状态写简单,这个就算它的补充吧。内容上不正确的地方,还需要大家指正,希望能完善对ganglia的研究与应用。-rrdtoolwindows64位
windows xp 下监控本机 cacti不显示图像
在创建流量的时候,右下角有1个选项是“选择图像类型”,默认是CBL APC LOAD,
不要选这个,选择 interface (in/out) bit 或者byte 后面跟64bit counters就可以到千M了
centos5.5安装rrdtool-1.0.49 编辑后 make报错如下 我是64位机器 报错如下,希望各位达人帮忙解决
因为你以前编译过,所以先执行:make clean
然后,进入文件目录,编译的流程是:1: ./configure 2:make Linux
你可以试试,我以前用的是别的工具出现过类似问题,然后,这么编译过的!
什么是rrdtool抓图任务计划
开始→程序→附件→系统工具→计划任务→打开添加任务计划。进入任务计划向导。
利用“任务计划”,可以将任何脚本、程序或文档安排在某个最方便的时间运行。“任务计划”在每次启动 Windows XP 的时候启动并在后台运行。
使用“任务计划”可以完成以下任务:
计划让任务在每天、每星期、每月或某些时刻(例如系统启动时)运行。
更改任务的计划。
停止计划的任务。
自定义任务在计划时刻的运行方式。
windows上怎样安装使用net-snmp和rrdtool
Net-SNMP和RRDTOOL有WINDOWS版(但我是架设在linux上面的,用为CACTI的画图),
将net-snmp安装到c:\net-snmp目录下;将rrdtool-1.2.15-cygwin-1.5.20.zip,解压到c:\rrdtool,这个不需要安装,这个工具主要靠其它程序调用的。