How to setup 1 minute polling and graphs in cacti 1.0.2 ?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
Redguy
Posts: 2
Joined: Wed Feb 15, 2017 3:10 am

How to setup 1 minute polling and graphs in cacti 1.0.2 ?

Post by Redguy »

A few years back i was able to setup a Cacti system with 1 minute polling/graphing granularity using settings similar to what is described here :

https://www.tolaris.com/2013/07/09/cact ... e-polling/

Haven't used cacti for a while, but recently started at a new client using ancient monitoring systems and no budget so i had a look at the current cacti and was pleasantly surprised to see v1.0.2.

Did a fresh install, still looks great.. But now for the 1 minute poller/graphing granularity.. The posts and articles i found so far are all for 0.8.x and no longer seem to fit the new cacti 1.0.2.


Anyone who can tell me how to do this or point me to a manual/howto/post showing how ?
JMoMo
Cacti User
Posts: 60
Joined: Mon Nov 08, 2004 12:11 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by JMoMo »

I am working on this.

It is very disappointing to me that 1-minute polling isn't a default feature in Cacti 1.0.

I've already got it working but there are some issues still. I will see about consolidating my notes and making a script.

The hard part is adding the new RRAs to existing RRD files in a programatic manner. I have a script where I did this way back in 0.8.7 days, but I need to fix it up for Cacti 1.0.
User avatar
Redguy
Posts: 2
Joined: Wed Feb 15, 2017 3:10 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by Redguy »

That would be great ! It seems the menu options needed to set this up as i used to do in 8.7.x are no longer there..
pysiok1983
Posts: 6
Joined: Mon Feb 27, 2017 4:32 pm

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by pysiok1983 »

Hi,


Do you have any news? I have stocked on same issue. I would like to change poll per 1 min - i am using spine.
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by tertius »

In 1.x, you find the polling interval setup under Presets->Data Profiles. The current "System Default" data source profile is the one with 5 min polling. To have a different interval, create an additional data source profile.

Here is a how I created profiles for 1 minute polling and 30 seconds polling. I added one additional RRA that is able to hold 24h of nonconsolidated primary data points.

If you create a profile, check all 4 consolication functions. This can easily be overlooked in the screenshot.


cacti data source profiles.png
cacti data source profiles.png (151.61 KiB) Viewed 18159 times
cacti data source profile 1min.png
cacti data source profile 1min.png (180.63 KiB) Viewed 18159 times
cacti data source profile 30sec.png
cacti data source profile 30sec.png (180.6 KiB) Viewed 18159 times
pysiok1983
Posts: 6
Joined: Mon Feb 27, 2017 4:32 pm

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by pysiok1983 »

hi,
tertius - thank you for your config.
I configured 1min and 30sec but 30sec dosent work. I see graphs but refreshing on the graphs are per 1min even when 30 sec is set up. Do I have to change somenthing more?
In crone following script:

Code: Select all

*/1 * * * * cactiuser php5.6 /var/www/html/cacti/poller.php > /dev/null 2>&1
I have tried per 30 sec:

Code: Select all

*/1 * * * * cactiuser php5.6 /var/www/html/cacti/poller.php > /dev/null 2>&1
*/1 * * * * cactiuser /bin/sleep 30; php5.6 /var/www/html/cacti/poller.php > /dev/null 2>&1
but same issue.
tertius
Cacti User
Posts: 82
Joined: Wed Mar 01, 2017 2:34 pm

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by tertius »

Keep your cron entry at the default 5 minutes! And use only 1 cron entry.

In cacti console->settings->poller change "Poller Interval" from 5 minutes to 30 seconds. The "Cron interval" below that should correspond to your crontab entry, which is 5 minutes as default.
In that setup, the cacti poller is called every 5 minutes by cron. It runs for 5 minutes and polls every 30 seconds. Then it terminates itself and the next poller is started by cron for the next 5 minutes.

Don't forget to re-populate the poller cache if you change these settings.
jhonnyx
Cacti User
Posts: 87
Joined: Sun Feb 26, 2017 10:33 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by jhonnyx »

Hi,

Very interesting, did you have good results with 1 min and 30 secs data sources?

In case I would have 30 secs or 1 min data sources along 5 minutes data spurces, my polling interval must be 30 seconds, right? Do you know how much this impact performances on a 10.000+ data sources system ( does it help with distributed system?)
jhonnyx
Cacti User
Posts: 87
Joined: Sun Feb 26, 2017 10:33 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2

Post by jhonnyx »

Hi,

I am planning to set up a cacti distributed installation and I would like to have certain data sources graphing at 5 minutes while other at 1 minute or even 30 seconds (IP SLA, WAN bandwidth usage, etc.).

What I would like to know is the following:

1) Do I need to scale my poller interval to the shortest data profile I am using (let's say 30 seconds)
2) In case I have 30 secs, 1 min and 5 minutes data profile uses and a poller at 30 seconds, ALL my data sources are polled every 30 seconds or is it selective?
3) besides the disk space, is there any drawback on having a 30 seconds or 1 minute poller interval for a 10.000+ data source cacti deployment?

Thanks
adrianmonk
Posts: 9
Joined: Wed Jan 16, 2013 9:12 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2 ?

Post by adrianmonk »

Hi Folks,

sorry for highlighting this topic again, but I'm facing a strange behavior concerning Poller Interval and the data profiles in the latest cacti and spine versions (1.2.6):
for clean results i installed cacti 1.2.6 from scratch with a new database. By default, the poller cronjob is started every 5 minutes (in cacti poller settings AND in my crontab) and the polling interval was set to 30s.
As i created my first graphs with the data profile "5 Minute Collection", i had to realize that the corresponding rrd-files were not created, so i started a long debugging session with playing around with folder permissions and the crontab user etc. but with no success. To keep it short, here is what I figured out:
When the poller interval is set to 5 minutes, all graphs / rrd-files with the data profiles "5 Minute Collection" are working fine, but any graph using the "30 Second Collection" profile does not work at all (could be explained with heartbeat-settings and so on, I know) but the stranger thing is:
When the poller interval is set to 30s, all graphs / rrd-files with the data profile "30 Second Collection" are working fine, but none of the "5 Minute Collection"-Graphs is working.
Does that mean, that i have to choose which polling interval I want to use and can never have another one active in parallel?

Did anyone discover similar behavior of cacti, or even has a solution?

Thanks!
adrianmonk
Posts: 9
Joined: Wed Jan 16, 2013 9:12 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2 ?

Post by adrianmonk »

Hi again,

after another fresh and clean installation, the problem is no longer existing here, sorry!
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: How to setup 1 minute polling and graphs in cacti 1.0.2 ?

Post by Osiris »

When you get stuck like this, it's likely being that you fiddled with the cron and base poller intervals (Console > Configuration > Settings > Poller) without re-populating the poller cache. For very large systems, this is not something you should be doing too often as a re-population can take a few hours to complete.

When performing a fresh setup, before you do anything (aka create graphs), you should always confirm with your customer what the Data Source Profiles should look like. How much data (rows) in each granularity (RRA) to store and retain, and then setup the 'Default' Data Source Profile prior to discovery.

At install time, Cacti allows you to select 30 second, 1 minute and 5 minute 'Default' Data Source Profiles, but the duration/length of each RRA, is pretty much a random number. So, tune first.

One nice thing in 1.2.6 is that you now have the ability to change the Data Source Profile on the fly, and salvage data. However, it's a little bit cumbersome right now, and someone should write a script to improve it, but using the updated rrd_splice.php file, you can do the following:

1) Change a Data Source Profile for a Data Source or Data Sources
2) Move the old RRDfile out of the way, but keeping them, you will need them in step 4)
3) Allow Cacti to recreate the Data Source using the new Data Source Profile
4) Stitch in the old RRDfile with the new one basically splicing the Data.

It would be nice if this was all automated, from the GUI, but these types of operations can take a long time if you have 10's of thousands of RRDfiles.
Before history, there was a paradise, now dust.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest