Multiple pollers.

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
christiaan
Posts: 10
Joined: Mon Jul 28, 2003 3:37 am
Location: The Netherlands

Multiple pollers.

Post by christiaan »

Hi all, I was wondering if someone already have something like this running.
I am running Cacti 0.8.5 and polling around 1700 polls (I need to extend this to around 2200). I try several time to run cactid but with no luck. For now I stay with cmd.php poller.
I query many Cisco and servers on 5 main locations. Because the cdm.php took longer than 5 min. so I run the cmd.php 30 times. Each of the script runs a different portion of the polling (each script does 100 polls).

Code: Select all

cmd00.php:#$polling_items = db_fetch_assoc("select * from data_input_data_cache");
cmd00.php:$polling_items = db_fetch_assoc("select * from data_input_data_cache limit 0,100");
cmd01.php:#$polling_items = db_fetch_assoc("select * from data_input_data_cache");
cmd01.php:$polling_items = db_fetch_assoc("select * from data_input_data_cache limit 100,100");
cmd02.php:#$polling_items = db_fetch_assoc("select * from data_input_data_cache");
cmd02.php:$polling_items = db_fetch_assoc("select * from data_input_data_cache limit 200,100");
cmd03.php:#$polling_items = db_fetch_assoc("select * from data_input_data_cache");
cmd03.php:$polling_items = db_fetch_assoc("select * from data_input_data_cache limit 300,100");
etc.
But I am thinking now to build on each of the 5 main locations a poller. On the location I like to query the “local” stuff and send the results to the main Cacti server.
I have almost everything up and running, but I am blocked for the moment. What I was thinking to do was to modify the line in the cmd.php script like this:

Code: Select all

$zoeken = $_SERVER["argv"][1];
$polling_items = db_fetch_assoc("select * from data_input_data_cache where hostname like $zoeken ");
Than I can start the cmd.php with to line: php cmd.php \”10.120.%\”
This than will poll the entire hosts with the ip addresses starting with 10.120.
The only problem is that I have lots of different ip series and will need to create a line for each.

So I was thinking is it possible to add a other field in the database called LOCATION ?
On this I will fill-in the names of the locations.
And change the line to :

Code: Select all

$zoeken = $_SERVER["argv"][1];
$polling_items = db_fetch_assoc("select * from data_input_data_cache where LOCATION like $zoeken ");
And add in host.php also an extra field to fill-in the location name.
Or even better: to create somewhere a list of locations. And than make a pull down field in host.php to select a location.

Hope someone can help me with this!!!
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Before you add GUI part let me ask you how are you going to resolve the problem of updating RRD file. Remote polling is quite easy part and you hose the best approach. Take in mind however that after running scripts and SNMP commands cmd.php updates RRD files. These files are placed on your cacti server. How are you going to update them by remote cmd.php processes? If by mapped folder via network (samba, etc.) it may take some time to update them I guess.

- Piotr
User avatar
dieter
Cacti User
Posts: 164
Joined: Fri Feb 20, 2004 3:08 pm

Post by dieter »

I use the GUI on the server and the polling is done via cactid on another PC. I made a couple of adjustments to config.php and I think functions.php too and now my RRD files (which reside on the server or wherever you want) are being updated. Just make a shared folder. Now the poller (updating rrds) and the gui (drawing graphs from rrd) can both access the rrd files via \\computername\sharedfolder

I'm using windows
I have no problems at all concerning update time...
Tufqi
Posts: 3
Joined: Tue Mar 30, 2004 3:26 am

Distributed polling / Centralized RRDs

Post by Tufqi »

bulek wrote:Before you add GUI part let me ask you how are you going to resolve the problem of updating RRD file. Remote polling is quite easy part and you hose the best approach. Take in mind however that after running scripts and SNMP commands cmd.php updates RRD files. These files are placed on your cacti server. How are you going to update them by remote cmd.php processes? If by mapped folder via network (samba, etc.) it may take some time to update them I guess.

- Piotr
Maybe by using a special polling entry on the "master" host wich in fact fetchs the values from the remote poller and then the poller act as if it did the poll on its own ?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

All,

Ian and I are working on this for 0.8.6. We have created new tables in Cacti to contain query results. Once all polling servers have completed, the server will then update all the RRD files. Please be informed that the beta's are NOT ready for testing at this time.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
christiaan
Posts: 10
Joined: Mon Jul 28, 2003 3:37 am
Location: The Netherlands

Post by christiaan »

Perfect, I am looking forward for the new (pre-) release.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests