rrdtool

How to read RRD file to get usage data?

本秂侑毒 提交于 2019-12-21 05:12:13
问题 I have setup a mrtg setup with rrdtool. Now I'm planning to get incoming outgoing usage data from these RRD files and failing to find a correct way to do it. Can anyone show we how to get those usage data from rrd files. Then I can maintain a db to keep those usage data and calculate the cost etc. Thank you! 回答1: you can use rrdtool graph ... PRINT:xxx or rather rrdtool xport ... to get data out of the rrd file. If you want to get to the actual data, use rrdtool fetch . you can find tons of

cacti监控服务器

陌路散爱 提交于 2019-12-16 19:19:33
1、Cacti基本概念详解 Cacti是用php语言实现的一个软件,它的主要功能是用snmp服务获取数据,然后用rrdtool储存和更新数据,当用户需要查看数据的时候用rrdtool生成图表呈现给用户。因此, snmp和rrdtool 是cacti的关键。 Cacti是通过 snmpget来获取数据,使用 RRDtool绘画图形,Cacti 也可外挂 Scripts 及加上 Templates 来作出各式各样的监控图。 2、Cacti监控服务器原理 3、Cacti监控服务器安装配置 1)官网下载cacti相关软件,一共需要三个软件,下载地址分别如下: http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz 2)安装LAMP系统环境 这里采用yum安装方式,安装命令: yum install httpd mysql mysql-server php php-mysql -y 3) 安装rrdtool采集工具 安装rrdtool之前需要安装相应的lib库,如下安装: yum install cairo-devel libxml2-devel pango pango-devel -y tar xzf rrdtool-1.4.5.tar

Cacti 学习笔记

懵懂的女人 提交于 2019-12-16 17:22:05
Cacti是用php语言实现的一个软件,它的主要功能是用snmp服务获取数据,然后用rrdtool储存和更新数据,当用户需要查看数据的时候用rrdtool生成图表呈现给用户。因此,snmp和rrdtool是cacti的关键。 而且你不需要理解rrdtool的复杂参数,它提供非常强大的数据、用户管理功能,它可以指定用户查看host、树状结构、以及任何一张图,还可以与ldap结合提供身份认证。 Snmp关系着数据的收集,rrdtool关系着数据存储和图表的生成。snmp抓到数据不是存储在mysql中,而是存在rrdtool生成的rrd文件中(在cacti根目录的rra文件夹下,一般以rra为后缀名称)。简单原理图如下: 1、Cacti服务器端安装 官网下载cacti相关软件,一共需要三个软件,下载地址分别如下: http://www.cacti.net/downloads/cacti-0.8.8h.tar.gz http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz 或者 使用yum安装 http://www.cacti.net/downloads/spine/cacti-spine-0.8.8h.tar.gz 2、安装LAMP系统环境 这里采用yum安装方式,安装命令: yum install httpd mysql mysql

RRDTOOL one second logging, values missing

醉酒当歌 提交于 2019-12-13 00:52:57
问题 I spent more than two months with RRDTOOL to find out how to store and visualize data on graph. I'm very close now to my goal, but for some reason I don't understand why it is happening that some data are considered to be NaN in my case. I counting lines in gigabytes sized of log files and have feeding the result to an rrd database to visualize events occurrence. The stepping of the database is 60 seconds, the data is inserted in seconds base whenever it is available, so no guarantee the the

CDEF Function to find % value in Cacti

て烟熏妆下的殇ゞ 提交于 2019-12-11 11:45:55
问题 I am trying to figure out how to find the % based on two data sources from an RRD graph. Below is the code used to create the graph (generated by Cacti) /usr/bin/rrdtool graph - \ --imgformat=PNG \ --start=1256445701 \ --end=1256532101 \ --title="Message Size" \ --base=1000 \ --height=120 \ --width=500 \ --alt-autoscale-max \ --lower-limit=0 \ COMMENT:"From 2009/10/25 14\:41\:41 To 2009/10/26 14\:41\:41\c" \ COMMENT:" \n" \ --vertical-label="" \ --slope-mode \ --font TITLE:10: \ --font AXIS:8

How to install RRDTool::OO on Strawberry perl

本秂侑毒 提交于 2019-12-11 07:00:02
问题 I'm actually trying to install RRDTool on windows, using strawberry perl and it's nice cpan command. The issue is that the tool will not install correctly the RRDTool package, on which the ::OO package depends. I've tried to compile myself the module (downloading it from http://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz). But when I try to open the .sln file with Visual studio (2008 or 2010), I encounter an error yelling that the .vcproj files are not taken in count by VS... So my two main

Remove data from RRDTool

有些话、适合烂在心里 提交于 2019-12-07 04:06:13
问题 I have several graphs created by RRDTool that collected bad data during a time period of a couple hours. How can I remove the data from the RRD's during that time period so that it no longer displays? 回答1: Best method I found to do this... Use RRDTool Dump to export RRD files to XML. Open the XML file, find and edit the bad data. Restore the RRD file using RRDTool Restore . 回答2: I had a similar problem where I wanted to discard the most recent few hours from my RRDtool databases, so I wrote a

How can I update data with RRDtool?

99封情书 提交于 2019-12-06 03:15:50
问题 I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is: ERROR: Cannot update /opt/dashboard/rrd/Disk/192.168.120.168_disk_1.rrd with '1228032301:24:24' illegal attempt to update using time 1228032301 when last update time is 1228050001 (minimum one second step) I want to always allow the rewrite, how

Remove data from RRDTool

試著忘記壹切 提交于 2019-12-05 09:39:55
I have several graphs created by RRDTool that collected bad data during a time period of a couple hours. How can I remove the data from the RRD's during that time period so that it no longer displays? Best method I found to do this... Use RRDTool Dump to export RRD files to XML. Open the XML file, find and edit the bad data. Restore the RRD file using RRDTool Restore . I had a similar problem where I wanted to discard the most recent few hours from my RRDtool databases, so I wrote a quick script to do it (apologies for the unconventional variable names - coding style inherited from work, sigh)

adding new datasource to an existing RRD

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 11:28:30
问题 I have few 100s of rrds and i want to add 5 extra datasource to all of those rrds. Is it advisable to do so Whats the best way and the fastest way to do it -- Soln -- David OBrien replied in the mailing list after searching the archives ( which you should have done first ) and googling I found several people using this... with perl. Install RRD:Simple #!/usr/local/bin/perl use strict; use RRD::Simple (); my $rrd = RRD::Simple->new(); my $rrdfile=$ARGV[0]; my $source=$ARGV[1]; my $type=$ARGV[2