No, they WILL DEFINITIVELY BE WIPED OUT.toni75 wrote:I have a question, if i do this, all my historical data will can be wiped out ?
R.
Moderators: Developers, Moderators
Hi tekbot,tekbot wrote:Rows: The Rows Value defines the number of Steps that each RRA should hold. This defines "the width of the rolling window", or in other words, the amount of time old data will be kept in the RRA before it is dropped off. As mentioned above, my settings may well differ from what would work for you. The settings above define the following for each polling interval:I'll break down the 24 hour view and leave the rest of the math to you guys. For the 10 second poller 24 hour view, I want to keep 3 days worth of data at 10s granularity. So, the question is "How many steps are there in 72 hours?" The answer is ROWS. So, we have 6 polls per minute, 60 minutes per hour times 72 hours, or (6 * 60 * 72), or 25920. For the 1 minute poller 24 hour view I want 3 days worth of data at 1m granularity, so that equation is going to be (1 * 60 * 72) or 4320. For the 5 minute poller 24 hour view I want 3 days worth of data at 5m granularity so (12 * 72) = 864 (12 polls per hour times 72 hours).Code: Select all
Interval / View / Rows / Storage Duration 10s / 24h / 25920 / 72h 1m / 24h / 4320 / 72h 5m / 24h / 864 / 72h 10s / 7d / 44640 / 31d 1m / 7d / 44640 / 31d 5m / 7d / 8928 / 31d 10s / 1mo / 25920 / 90d 1m / 1mo / 25920 / 90d 5m / 1mo / 25920 / 90d 10s / 1y / 35040 / 3y 1m / 1y / 35040 / 3y 5m / 1y / 35040 / 3y
Code: Select all
Name Steps Rows Timespan
Hourly (1 Minute Average) 1 500 14400
Daily (5 Minute Average) 5 600 86400
Weekly (30 Minute Average) 30 700 604800
Monthly (2 Hour Average) 120 775 2678400
Yearly (1 Day Average) 1440 797 33053184
Code: Select all
Name Steps Rows Timespan
Hourly (1 Minute Average) 1 300 14400
Daily (1 Minute Average) 1 1500 86400
Weekly (1 Minute Average) 1 11000 604800
Monthly (1 Minute Average) 1 45000 2678400
Yearly (1 Minute Average) 1 526000 31536000
3 Years (1 Minute Average) 1 1576800 94608000
Code: Select all
07/14/2011 10:50:02 AM - SYSTEM STATS: Time:1.2667 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:6
07/14/2011 10:50:01 AM - SPINE: Poller[0] Time: 0.1791 s, Threads: 1, Hosts: 2
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[39] SCRIPT: perl /var/www/cacti/scripts/query_unix_partitions.pl get available /dev/mapper/Monitor-root, output: 74907580
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[39] SCRIPT: perl /var/www/cacti/scripts/query_unix_partitions.pl get used /dev/mapper/Monitor-root, output: 2702116
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[38] SCRIPT: perl /var/www/cacti/scripts/unix_processes.pl, output: 120
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[37] SCRIPT: perl /var/www/cacti/scripts/unix_users.pl , output: 2
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[36] SCRIPT: perl /var/www/cacti/scripts/loadavg_multi.pl, output: 1min:0.05 5min:0.07 10min:0.05
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[35] SCRIPT: perl /var/www/cacti/scripts/linux_memory.pl SwapFree:, output: 506632
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] DS[34] SCRIPT: perl /var/www/cacti/scripts/linux_memory.pl MemFree:, output: 111044
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] NOTE: There are '7' Polling Items for this Host
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] TH[1] Host has no information for recache.
07/14/2011 10:50:01 AM - SPINE: Poller[0] Host[1] PING: Result UDP: Host is Alive
07/14/2011 10:50:01 AM - SPINE: Poller[0] NOTE: Spine is behaving in a 0.8.7g manner
07/14/2011 10:50:01 AM - SPINE: Poller[0] NOTE: Spine did not detect multithreaded device polling.
07/14/2011 10:50:01 AM - SPINE: Poller[0] Time: 0.0301 s, Threads: 1, Hosts: 1
07/14/2011 10:50:01 AM - SPINE: Poller[0] NOTE: Spine is behaving in a 0.8.7g manner
07/14/2011 10:50:01 AM - SPINE: Poller[0] NOTE: Spine did not detect multithreaded device polling.
07/14/2011 10:50:01 AM - POLLER: Poller[0] NOTE: Poller Int: '60', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '5'
07/14/2011 10:50:00 AM - SYSTEM STATS: Time:0.1283 Method:spine Processes:1 Threads:1 Hosts:1 HostsPerProcess:1 DataSources:7 RRDsProcessed:0
07/14/2011 10:50:00 AM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
07/14/2011 10:50:00 AM - SPINE: Poller[0] Time: 0.0335 s, Threads: 1, Hosts: 1
07/14/2011 10:50:00 AM - SPINE: Poller[0] NOTE: Spine is behaving in a 0.8.7g manner
07/14/2011 10:50:00 AM - SPINE: Poller[0] NOTE: Spine did not detect multithreaded device polling.
07/14/2011 10:50:00 AM - POLLER: Poller[0] -1310662021.9743 seconds
07/14/2011 10:50:00 AM - SYSTEM STATS: Time:238.2447 Method:spine Processes:1 Threads:1 Hosts:1 HostsPerProcess:1 DataSources:7 RRDsProcessed:0
07/14/2011 10:50:00 AM - POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
Code: Select all
Name Steps Rows Timespan
Daily (1 Minute Average) 1 1440 86400
Weekly (1 Minute Average) 1 10080 604800
Monthly (1 Minute Average) 1 44640 2678400
Yearly (1 Minute Average) 1 525600 31536000
3 Year (1 Minute Average) 1 1576800 94608000
Code: Select all
total 303576
-rw-r--r-- 1 cactiuser cacti 69077416 2011-07-14 11:00 localhost_hdd_free_39.rrd
-rw-r--r-- 1 cactiuser cacti 103615408 2011-07-14 11:00 localhost_load_1min_36.rrd
-rw-r--r-- 1 cactiuser cacti 34539424 2011-07-14 11:00 localhost_mem_buffers_34.rrd
-rw-r--r-- 1 cactiuser cacti 34539424 2011-07-14 11:00 localhost_mem_swap_35.rrd
-rw-r--r-- 1 cactiuser cacti 34539424 2011-07-14 11:00 localhost_proc_38.rrd
-rw-r--r-- 1 cactiuser cacti 34539424 2011-07-14 11:00 localhost_users_37.rrd
tekbot wrote:Guys,gandalf wrote:No, sorry. No chance to change step size using rrdtool tune or stuff. Using official stuff only, it is NOT POSSIBLE to convert a 5 min absed rrd file to 1 min based.
If you don't trust me please as at rrdtool-users mailing list
Reinhard
I have written a script that reformats old 5 minute RRD files into 1 minute RRD files. I ran this against an infrastructure and it worked a charm. I will attach the scripts below. There is some information you need to make this work, and you need to be familiar navigating around Cacti. I'll be as verbose as I can to ease you through this.
(PS - I don't want any code monkeys telling me how sub-optimal this script is. Feel free and improve on it, but don't tell me it's "bad code", because as far as I'm aware, I'm the only one who's successfully done this -- Ever).
The script has a few parts, which should be explained here.
GetAndConvert - this is the wrapper script. This script takes one argument, which should be your INPUT_FILE described below. There are constants defined at the top of the script. This is where you tell the script important information about your environmeent like where to find the RRD files to convert, and where to dump them when they're done. Modify this to suit your needs. Also, since I built my 0.8.7 on a new machine, I used SCP to get the files from a remote host. If you're not doing this, you'll need to edit the script accordingly. (I've put a note on how to get your SCP working without entering a password for each file, if you don't know how to use Public Key Auth).
INPUT_FILE - YOU create this file. This file should be a list of all of the files you want to bring over and convert. You need to strip the .rrd from the filenames for the script to work properly (or you can fix this bug -- code monkey!). An easy way to do this in vim would beor you could run something like this on your old rra dirCode: Select all
:g/\.rrd.*$/s///
Whatever works for you.Code: Select all
ls | awk -F. '{print $1}' > INPUT_FILE
FormatRRA - This is the guy that does all the work. This requires information from you as well to properly set the multipliers. Basically, what this script does is takes the raw XML of your RRD and reads through it until it finds it's first data block. We then adjust the step value in the data definition and we print every line n times (depending on your multiplier - also discussed later). In simpler terms, the first block of a 5 minute graph has a line that defines STEP, which is set to 300 (seconds). We replace that with a new STEP because we want a 1 minute graph (60 seconds). And, since our step is different, we need more data points to make up for the missing space, so we take each value and print it out 5 times. We do this for every existing line until we encounter a new STEP definition, and we then adjust our multiplier accordingly. Making sense?
Misc Notes:
All of these scripts should be put into the same directory. You should run them all as the cacti user. You need to tell your 0.8.7n installation about your new RRD formats. This can be done under Data Sources -> RRAs. I wrote a post a few months ago describing how to configure your new RRAs for optimal storage at high-granularity. That post is here: http://forums.cacti.net/viewtopic.php?t ... c&start=15. I know it's long, but Read It! If you use the format I suggest there, you do not have to edit your multipliers. The only "drawback" to using the formats as I've defined them is, I want more granular data for longer, therefor my RRD files are bigger than the default. MBs are cheap these days.
Output:
This script will churn for a good few minutes on every RRD file, and I didn't bother writing in any MySQL injection (feel free). The output will give you the perfect text string to paste into your Data Source field. Here is your basic order of operations (this is in the README in the gzip attached):
* Create your RRD Structure as defined in my post on 1-minute polling (I'm tekbot).
* Create new Graph for existing device (This creates the datasource in the Database)
* Create input file for list of existing Graphs (.rrd files) from old cacti installation to convert (see section on INPUT_FILE in the post where you found these scripts).
* Edit the Constants at the top of GetAndConvert and FormatRRA to suit your needs.
* Setup SSH Private Key Authentication (Optional)
* Run the script (Syntax: ./GetAndConvert INPUT_FILE)
* Update Data source to point to new RRD.
* Place on Tree!
Have fun kids, and be safe!
--tekbot
Code: Select all
09/29/2011 02:21:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
09/29/2011 02:22:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
One minute polling was slightly broken in 0.8.7g, but is fixed now in version 0.8.7h. If you update to the most recent version and set your cron interval back to 5 minutes, you should find it magically works again.rickg421 wrote:I've hit a bit of a wall trying to setup 1 minute polling. I understand from this thread that the theory is to run the poller once every 5 minutes from cron, cron interval = 5 minutes, and with the poller interval at 1 minute, it will execute once a minute. Now, if I have everything set to 1 minute, it works. One minute graphs appear, so I believe that confirms my RRA's are setup. But if I set cron to run @ 5 minutes w/ its 5 minute interval, things don't work. I just get POLLER logs like this:
Rebuilding the poller cache (via cli) doesn't change the behavior, either.Code: Select all
09/29/2011 02:21:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle! 09/29/2011 02:22:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
Users browsing this forum: No registered users and 1 guest