Raspberry Pi Dynamic Remote Poller for Cacti 1.x

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
phalek
Cacti Guru User
Posts: 2710
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Raspberry Pi Dynamic Remote Poller for Cacti 1.x

#1 Post by phalek » Wed Aug 29, 2018 7:30 am

Hi Community

I'm currently working on a dynamic remote poller system using the latest Cacti 1.x and a Raspberry PI 3 B+ device.

The goal is to get a system up and running which is automatically registering itself on the Master system and is using DHCP for getting its' address.

This allows for an easy distribution of remote pollers in remote sites for .e.g URL or application monitoring from an end-user perspective.

The current working status as of 29/Aug 2018 is as follows:
  • Raspberry PI 3 B+ running Raspbian Stretch and backported Cacti 1.1.38
  • The system is retrieving its IP using DHCP
  • After initial boot, the system is registering with the Master server as a new poller
  • The hostname/database hostname are updated on the Master after each IP address change automatically
  • Master System(IP, DB settings) need to be configured correctly in the respective config files
The goal is to have this as easy as possible with an installation tool to configure the basic settings, so an image of the SD-Card can be taken afterwards and distributed.


Anyone likes to join this ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

netniV
Cacti Guru User
Posts: 2667
Joined: Sun Aug 27, 2017 12:05 am

Re: Raspberry Pi Dynamic Remote Poller for Cacti 1.x

#2 Post by netniV » Mon Sep 03, 2018 9:31 am

If I had a Pi, I would probably help you out. Especially given we've updated the installer in 1.2 quite dramatically (I'm working on a CLI version to allow a scripted install!). Hopefully, you will get responses from others to help out :)

User avatar
phalek
Cacti Guru User
Posts: 2710
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Raspberry Pi Dynamic Remote Poller for Cacti 1.x

#3 Post by phalek » Tue Sep 04, 2018 3:05 am

The current Pi is using the Debian installer, which works just fine, except it install a full Master systems.

So I changed the configs to point to the true master (spine.conf / config.php ) and set the poller-id to 999.

A small script checks that poller_id and registers the Pi with the master if it's still 999 or updates the hostname/dbhost if it's not 999.
That registering part is actually small code part from the actual cacti installer.

That's currently working just fine and tested with several remote locations.

I'm looking into making this more intuitive, so you only need to setup one Pi using an easy installer and then you can distribute the image to other PIs ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusTransporter | CereusReporting | nmidWebService | nmidSmokeping | nmidWeb2 |

Code: Select all

CereusServer Master:  SYSTEM STATS: Time:2.5621 Method:spine Processes:1 Threads:16 Hosts:446 HostsPerProcess:446 DataSources:14683 RRDsProcessed:7573
CereusServer Agent:   SYSTEM STATS: Time:27.4840 Method:spine Processes:1 Threads:8 Hosts:16 HostsPerProcess:16 DataSources:114576 RRDsProcessed:48061
[/size]

Post Reply