external rrd create and update
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
external rrd create and update
Hi all:
cacti itself can't do per second graph update. is it rrdtool possible to make every second count update to the rrd file?
cacti itself can't do per second graph update. is it rrdtool possible to make every second count update to the rrd file?
Re: external rrd create and update
>> is it rrdtool possible to make every second count update to the rrd file?
Set step value to 1.
For example:This RRD keeps data for 1 day. (=86400sec)
Here is a sample graph for the above RRD on Cacti.
I followed this guidance: Externally Updated RRDs - Cacti Docs
(Timespan is 120sec in this RRA)
Set step value to 1.
For example:
Code: Select all
%rrdtool create test_per_second.rrd \
--step 1 \
DS:testvalue:GAUGE:3:U:U \
RRA:AVERAGE:0.5:1:86400 \
RRA:MAX:0.5:1:86400
Here is a sample graph for the above RRD on Cacti.
I followed this guidance: Externally Updated RRDs - Cacti Docs
(Timespan is 120sec in this RRA)
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
thanks you. that is really good help me.
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
Hi:
look like working, but doesn't looks right for me.
I copy the code from you.....
and follow the steps to import the rrd file to cacti.
and I run my randon number perl script to do the test
where went wrong?
look like working, but doesn't looks right for me.
I copy the code from you.....
Code: Select all
rrdtool create test_per_second.rrd \
--step 1 \
DS:testvalue:GAUGE:3:U:U \
RRA:AVERAGE:0.5:1:86400 \
RRA:MAX:0.5:1:86400
and I run my randon number perl script to do the test
Code: Select all
#!/usr/bin/perl -w
use strict;
use warnings;
$| = 1;
while (1)
{
my $range = 100;
my $number = int(rand($range));
print $number . "\n";
my $time = time();
print $time . "\n";
my $update = `rrdtool update test.rrd $time:$number`;
print $update;
sleep 1;
}
- Attachments
-
- 2011-06-02_130640.png (19.87 KiB) Viewed 4103 times
Re: external rrd create and update
Did you use 'Hourly' RRA for the graph?
I created new RRA for this test, and used it in new Data Template.
BTW, typo in your graph title..
|host_descriptition| -> |host_description|
I created new RRA for this test, and used it in new Data Template.
BTW, typo in your graph title..
|host_descriptition| -> |host_description|
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
Hi:
the graph is working now. I have to using Zoon in to see the every "second" count. I did create "minutely (1 Second Aver)" data temp.
the graph is working now. I have to using Zoon in to see the every "second" count. I did create "minutely (1 Second Aver)" data temp.
- Attachments
-
- 1.png (6.09 KiB) Viewed 4089 times
-
- 2.png (56.55 KiB) Viewed 4089 times
Re: external rrd create and update
That is depend on "Default Graph View Timespan". (not "Default RRA", unfortunately)
(If you changed these default settings, please re-login to take effect)
(If you changed these default settings, please re-login to take effect)
Not necessary to zoom. Just click the graph.chefchanyu wrote:I have to using Zoon in to see the every "second" count.
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
I did click on the graph and just show like img 1.png.
also "Default Graph View Timespan" same as my current setting.
also "Default Graph View Timespan" same as my current setting.
Re: external rrd create and update
If you modified data template after creating graph (= RRD file),chefchanyu wrote:I did click on the graph and just show like img 1.png.
please delete the graph and datasource, then re-create it.
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
yes, I did created the temp first and then create the rrd file.
And here are my steps:
Create Temp
1. DATA Soure >> RRAS
2. Add
3. As your graph
- Mintely (1 Second Average)
- MAX
- 0.5
- 1
- 86400
- 120
4. Save
Add Exterrnal
1. Data Temp
2. add
- temp name: test
- name: |host_description| - external RRD
- select Minutely (1 Second Average)
- uncheck data Soure Active
- internal data soure name: testing
- data source type: GAUGE
- Hearbeat: 600
3. Save
Add Graph Temp
- name: External RRD
- Title: |host_description| - external RRD
- add graph item
- Save
Add Devices
- description : test host
- host name: test host
- disable snmp
- Save
Add Data source
- selectecd Data Temp: test
- host: test host (test host)
- Data source Path: /var/www/cacti:/rra/test/test.rrd
Add graph
And here are my steps:
Create Temp
1. DATA Soure >> RRAS
2. Add
3. As your graph
- Mintely (1 Second Average)
- MAX
- 0.5
- 1
- 86400
- 120
4. Save
Add Exterrnal
1. Data Temp
2. add
- temp name: test
- name: |host_description| - external RRD
- select Minutely (1 Second Average)
- uncheck data Soure Active
- internal data soure name: testing
- data source type: GAUGE
- Hearbeat: 600
3. Save
Add Graph Temp
- name: External RRD
- Title: |host_description| - external RRD
- add graph item
- Save
Add Devices
- description : test host
- host name: test host
- disable snmp
- Save
Add Data source
- selectecd Data Temp: test
- host: test host (test host)
- Data source Path: /var/www/cacti:/rra/test/test.rrd
Add graph
Re: external rrd create and update
I followed the procedure you did (on Cacti 0.8.7g and 0.8.7e).
But I can see the graph successfully when I entered "Viewing Graph".
I suspect..
But I can see the graph successfully when I entered "Viewing Graph".
I suspect..
What did you set for "Step" value in Data Template?chefchanyu wrote:1. Data Temp
2. add
- temp name: test
- name: |host_description| - external RRD
- select Minutely (1 Second Average)
- uncheck data Soure Active
- internal data soure name: testing
- data source type: GAUGE
- Hearbeat: 600
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
unchecked 300
Re: external rrd create and update
Bingo!chefchanyu wrote:>> What did you set for "Step" value in Data Template?
unchecked 300
noname wrote:>> is it rrdtool possible to make every second count update to the rrd file?
Set step value to 1.
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
ye!!!!!!!! it work:)
Thanks you.
Thanks you.
-
- Cacti User
- Posts: 153
- Joined: Wed Aug 25, 2010 11:07 pm
Re: external rrd create and update
second question.
I want to keep the data over record for 3 years. so is it mean i just need to increase the 86400 to 86400 * 365 * 3?
and create the rrd file like this:
I want to keep the data over record for 3 years. so is it mean i just need to increase the 86400 to 86400 * 365 * 3?
and create the rrd file like this:
Code: Select all
rrdtool create test_per_second.rrd \
--step 1 \
DS:testvalue:GAUGE:3:U:U \
RRA:AVERAGE:0.5:1:94608000 \
RRA:MAX:0.5:1:94608000
Who is online
Users browsing this forum: No registered users and 3 guests