Cacti each minute???

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

Moderators: Developers, Moderators

fata51

Cacti each minute???

Post by fata51 »

Hello,

First of all, I would to congratulate people wworking on Cacti because I think it's a wonderful tool!!

My Cactid runs each 5min but I would like to have a better resolution and get informations each minute

I will have to change my crontab it's clear but are there others things to change?
I think maybe RRA's in Cacti or something in the graph to adapt the update frequency but it's not clear in my mind... :o

Have you ever try this? Does it work?

Thank you for your help

Bye
fata51

Post by fata51 »

Actually, I'm using cacti with a weathermap tool which display WAN links use in a geographic card with arrows and utilisation rates. (I don't know if what i say is clear...excuse my english!!)

Even if I change my crontab and put all lines (cactid and weathermap) to "*/1 * * * *" (execute commands each minute), the rates on weathermap change each 5min

So, I think I must create a new RRA (Console/Data Sources/RRAs) in order to define my RRA files to be updated each minute

But it's not clear in my mind so if someone could explain me and tell me how do this...I will be so happy and grateful... :)

Thank u
fata51

Post by fata51 »

Actually, I'm using cacti with a weathermap tool which display WAN links use in a geographic card with arrows and utilisation rates. (I don't know if what i say is clear...excuse my english!!)

Even if I change my crontab and put all lines (cactid and weathermap) to "*/1 * * * *" (execute commands each minute), the rates on weathermap change each 5min

So, I think I must create a new RRA (Console/Data Sources/RRAs) in order to define my RRA files to be updated each minute

But it's not clear in my mind so if someone could explain me and tell me how do this...I will be so happy and grateful... :)

Thank u
jminne
Posts: 1
Joined: Tue Nov 16, 2004 10:40 am

Are there instructions for this anywhere?

Post by jminne »

I think this is a good question. What is procedure for changing the sampling period from 5 minutes?

steps so far:

1. Change the cron job entry (for every minute, */5 to */1)
2. Change the related DataTemplate or DataSource "Step" to 60 instead of 300.

What else would someone need to do? The graphs' x axis still seems to be using 5:00.
addlema
Cacti User
Posts: 81
Joined: Wed Aug 18, 2004 8:26 am
Location: Bloomington, IN
Contact:

Post by addlema »

It would be awesome if we could do this per graph or per host on the fly inside Cacti....

man that would be awesome.
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

sounds like you would want Cacti to run as a daemon instead of as a cron job and then be able to setup polling times per host and the daemon could then kick off the polling as determined per host setting.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

egarnel wrote:sounds like you would want Cacti to run as a daemon instead of as a cron job and then be able to setup polling times per host and the daemon could then kick off the polling as determined per host setting.
As egarnel said, you would really need a daemon to do this. Polling every minute in most situation is a bad idea. Poll cycles, which are dependant on how many devices being polled, typically are longer than 1 minute. With the use of cactid you can greatly reduce the polling times, but in large enviroments, even cactid can take more than 1 minute to poll.

To get 1 minute resolution, you are going to have to do 2 things, setup your rrd's to allow 1 minute resolution and poll every 1 minute.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
breed
Posts: 4
Joined: Wed Nov 17, 2004 12:03 pm
Contact:

custom polling intervals... ala hotsanic?

Post by breed »

So, if this would need to run more like a daemon and less like a cronjob, would it model the kind of runtime stuff that HoTSanic uses?

How hard would that be to add or modify?

- breed
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I don't know, but I would say they will not intergrate well.

But I must say again, polling every minute is the issue here. Even if you use a daemon, it still may take more than 1 minute to poll all the devices. If that happens, then you get gaps in the graphs.

If you are using the Cacti polling from cron, then you might have problems with more than one polling cycle over lapping. This can over the course of 30 minutes bring your polling box to it's knees. The reseasons being that one poller start, second poller starts, third poller starts, fouth poller start, first poller exits, fifth poller starts, sixth poller starts, seventh poller starts, second poller exits. It's growing problem, the more pollers running the longer each one takes to run, till more than you care to be running are running.

Typically, you want the poller to finish up before the next one starts. This way you avoid any future problems with load.

But, to be honest, this might be a moot point for this discussion, because if it takes less than 1 minute to poll, then polling every minute will not be an issue.

:D
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
breed
Posts: 4
Joined: Wed Nov 17, 2004 12:03 pm
Contact:

Post by breed »

No doubt. Whoever wants to poll each minute would have to be extremely cognizant of how long the polling cycle takes to finish. I know for me, personally, the only things I would like to poll each minute are router (layer3) interfaces. SNMP get's for network devices are usually pretty quick... right...? :roll:
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

Data sourcers -> RRAs -> add "Hourly (1 Minute Average)"
select "average" and "max"
x-files: 0.5
Steps: 1
Rows: 500
Timespan: 14400

It just works :)
don't forget to add "hourly" to "Associated RRA's" for each data source (templates) and delete the old .rrd files.
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
breed
Posts: 4
Joined: Wed Nov 17, 2004 12:03 pm
Contact:

Post by breed »

Alice wrote:Data sourcers -> RRAs -> add "Hourly (1 Minute Average)"
select "average" and "max"
x-files: 0.5
Steps: 1
Rows: 500
Timespan: 14400

It just works :)
don't forget to add "hourly" to "Associated RRA's" for each data source (templates) and delete the old .rrd files.
I tried this (all steps) and I still get graphs that are rounded off to 5 minute averages (plateaus)

- breed
User avatar
Alice
Cacti User
Posts: 111
Joined: Tue Oct 28, 2003 4:54 pm
Location: Bucharest, RO.

Post by Alice »

You must also modify the cron job to be executed every minute... it MUST work :)

omg... forgot smthing:
In Data sources (templates): Step must be 60 and Heartbeat should be 120.
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
breed
Posts: 4
Joined: Wed Nov 17, 2004 12:03 pm
Contact:

Post by breed »

Alice wrote:You must also modify the cron job to be executed every minute... it MUST work :)

omg... forgot smthing:
In Data sources (templates): Step must be 60 and Heartbeat should be 120.
/me is impressed

It does work! I had the crontab covered, but was missing the last data source template change... Thanks Alice!

- breed
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

Cacti Each Minute

Post by hosierd »

Alice wrote:You must also modify the cron job to be executed every minute... it MUST work :)

omg... forgot smthing:
In Data sources (templates): Step must be 60 and Heartbeat should be 120.
Newbiew question so please excuse the ignorance inherent in this question:


I assume you are saying if I want to measure traffic every 60 seconds (in addition to running the poller every 60 seconds) I need to go to

Templates
Data Templates
Interface - Traffic

and then change Heartbeat from the default 300 to 120. I don't see where "step" is to modify that.

Running CACTI 0.8.6c.

Thanks

Never mind I just found it. I am blind and ignorant

Doug
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests