Multipoller with Spine and Cacti

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

Moderators: Moderators, Developers

Author
Message
der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Multipoller with Spine and Cacti

#1 Post by der_doc » Tue May 03, 2011 6:16 am

Hi,
can I get an value to the spine call in poller.php for the "poller_id"?
So I will take an multipoller with spine.
The poller_id is the ID of the pollingserver and in the poller_item the polling_id registered too.

Now is the poller_id set to 0 and that is my problem. The poller_id must set to the value what it get from poller.php.

poller.php
After this line.
/* exit poller if spine is selected and file does not exist */


edit cacti-spine-0.8.7e/spine.c
db_insert(&mysql, "insert into poller_time (poller_id, start_time, end_time) values (1, NOW(), NOW())");
1 poller_id from pollerserver.

Sorry for the bad english Iam a boy from germany.
Der_Doc
From Braunschweig, Germany
Image
ImageImage

der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Re: Multipoller with Spine and Cacti

#2 Post by der_doc » Wed May 04, 2011 12:53 pm

Ok,
with the Version 0.87g off spine it work perfect.
The point in the poller.php is always located.
Now the problem is that the PHP Version 5.2.4 not work with the function gethostname() :cry:
So I update my systems off cacti 087g and than ........ I precent the result.

MfG
Der_Doc
Image
ImageImage

noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Multipoller with Spine and Cacti

#3 Post by noname » Wed May 04, 2011 1:08 pm

der_doc wrote:Now the problem is that the PHP Version 5.2.4 not work with the function gethostname() :cry:
Try php_uname('n') instead of gethostname().

der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Re: Multipoller with Spine and Cacti

#4 Post by der_doc » Thu Jun 09, 2011 2:15 pm

Hi,
after a lot off time and one more coffee :lol: is the result on really good working Cacticluster.
The Cluster is composed of 5 Linux VMWare Ubuntu 10.04 LST 64Bit machines.
The hardware basis are 2 IBM Blades (HS21 with 8 Core CPU an 16 GB Ram)
The storage is an Netapp storage. On this storage are the folloing folders are connected with nfs.
- all VMwares
- rrdfiles
- cactifiles
- cactilog
The installation is Cacti/Spine 0.87g PluginA 2.8 Pollerserver Plugin (from Der_Doc) and php 5.3 :wink:
In this version the pollerserver selection is directly edit in the file host.php. I dont know how i put a dropbox in the
host.php with the plugin. I hope an cactiuser can help me.

The pollerplugin is for the configuration of the pollers.
The databasechanges are not so havey.

Table
poller_server --> for the pollerserver infos
host --> poller_id on the end off the table.

The other files how i change are poller.php , /lib/api_poller.php and /lib/poller.php :oops:
Config of the 5 VMs
1. cmaster - is for the config, show graphs and poll plugins.
2. cmysql - is the mysqlserver for cacti (i the next step i will test an mysqlcluster)
3. poller1 - is the first poller (54 Hosts)
4. poller2 - is the second poller (114 Hosts)
5. poller3 - is the testpoller for me :P

I dont know how match interest is in the community.
So I can post screenshots.

Sorry for the english Iam from germany. 8)
Cacti rockt :wink:

Same pics:
cacti1.gif
Cacti with Multipoller
cacti1.gif (37.64 KiB) Viewed 5431 times
cacti2.gif
Pollerservertable
cacti2.gif (12.2 KiB) Viewed 5431 times
cacti3.gif
Config Pollerserver
cacti3.gif (13.46 KiB) Viewed 5431 times
cacti4.gif
Logfiles from Cacti with all pollers
cacti4.gif (26.23 KiB) Viewed 5431 times
MfG
Der_Doc
Image
ImageImage

c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: Multipoller with Spine and Cacti

#5 Post by c3226026 » Sat Jun 18, 2011 3:54 pm

Hello der_doc,

cacti cluster function is very interresting, could you give us your Pollerserver Plugin?

Thanks in advance.

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Multipoller with Spine and Cacti

#6 Post by gandalf » Sun Jun 19, 2011 4:32 am

I'm discussing this feature with the OP. We will see were we get with it. No promise made
R.

der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Re: Multipoller with Spine and Cacti

#7 Post by der_doc » Sun Jun 19, 2011 4:38 am

Hi,
jepp i can do.
But in moment i made holiday. Next time at work i put all to zip-files and upload it here.
But note the Pollerserver-Plugin is only the utility to config the Server. In the next version i think i made diff files and put them to the plugin.

MfG
der_doc
Image
ImageImage

c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: Multipoller with Spine and Cacti

#8 Post by c3226026 » Sat Jun 25, 2011 4:21 pm

der_doc wrote:Hi,
jepp i can do.
But in moment i made holiday. Next time at work i put all to zip-files and upload it here.
But note the Pollerserver-Plugin is only the utility to config the Server. In the next version i think i made diff files and put them to the plugin.

MfG
der_doc
Thanks for your return, I hope to test it.

der_doc
Cacti User
Posts: 51
Joined: Mon Jul 24, 2006 7:20 am
Location: Braunschweig, Germany

Re: Multipoller with Spine and Cacti

#9 Post by der_doc » Sun Jun 26, 2011 3:48 am

Hi,
on monday iam back at work and make a test packet for you. :wink:

Der_Doc
Image
ImageImage

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Multipoller with Spine and Cacti

#10 Post by gandalf » Sun Jun 26, 2011 7:51 am

I would be happy with a diff against either current 087g or 087g with PIA installed.
I need both the code/instructions for the changes required to implement multi-polling as well as those changes related to the web interface.
R.

c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: Multipoller with Spine and Cacti

#11 Post by c3226026 » Mon Jun 27, 2011 5:54 am

In the same idea, it will be wonderfull to displaced the polling of the poller beetwen poller servers.

For exemple with two poller servers (with a polling every 5 min), the first ("master") poller server polling every 5 min and the other polling ("slave") every 5min also but displaced of 2.5 min compared the first poller server.
So if one of the two poller servers are not available there is always one server available and when the two servers are available no data are on the same time (because 2.5 min displaced) , so normaly no "corruption" on mysql data base and rra and in this case you can have a final graph more fine (because twice more data).

What do you think about that ?

c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: Multipoller with Spine and Cacti

#12 Post by c3226026 » Fri Jul 01, 2011 7:37 am

Hello der_doc,

Any news before the WE ? :wink:


c3226026
Cacti User
Posts: 87
Joined: Mon Jan 17, 2011 12:15 pm

Re: Multipoller with Spine and Cacti

#14 Post by c3226026 » Mon Jul 04, 2011 4:36 am

gandalf wrote:starting to work on it
R.
Hello,

Very good news.
Do you think it will be also possible to inclued displaced polling of the poller beetwen poller servers (for exemple when the first poller ("master") as started, the second ("slave") start polling with a displaced time) ?
May be it's not very easy to do that .... and may be it's not an interesting way for cacti community.

Best Regards

User avatar
gandalf
Developer
Posts: 22375
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Multipoller with Spine and Cacti

#15 Post by gandalf » Mon Jul 04, 2011 2:10 pm

There are no plans for "interleaved" polling, as far as I do understand your request. But you may want to explain why and how this would help ...
R.

Post Reply