[smokeping-users] Rasp-Pi smokeping slaves

ITheodoridis at bankofgreece.gr ITheodoridis at bankofgreece.gr
Mon Aug 26 17:25:59 CEST 2013


Hello all! 
hi Greg nice to see how far you got with this!
Josh, we did discuss this quite a bit on email with Greg (Sloop) after
my original email. I believe his needs are excessive on that little
piece of hardware and really squeeze the juice from it ;) . If it worked
for Greg's setups, I am sure any setup you have in mind will not be a
big deal for the pi. Make sure you get a fast SD card just in case.
I don't know how many targets you got in mind. 
I used a box to hit a few websites and a few servers and routers  and
left it there for a week or two. It didn't break a sweat.

For me it was ideal because of the tiny size, no sound or thermal output
and so I can use this for example to monitor higher administration
network performance right next to their workstations without them even
noticing the device (fast and easy deployment too). Or send it to a
remote location and have a colleague just plug it in (again super fast &
easy deployment). So the basic idea here for me is a very good way to
respond fast in network performance troubleshooting from the users,
wherever they may be.
Unfortunately, after initial acceptance, my organization has pretty much
ignored me ever since on this.. Still trying to rouse the interest
again, summer has that effect on people here in Greece.
I am really glad that this idea is helping people. Greg is ideal to give
advice on this but I will also help where I can if needed..
Let us know how it went for you too.
Ioannis.

-----------------------------------------------------
Ioannis Theodoridis
Network & Systems Engineer
Network & Telecommunications Support
Informatics
Bank of Greece
-----------------------------------------------------


-----Original Message-----
From: Gregory Sloop [mailto:gregs at sloop.net] 
Sent: Wednesday, May 01, 2013 2:44 AM
To: Joshua Zitting
Cc: smokeping-users at lists.oetiker.ch
Subject: Re: [smokeping-users] Rasp-Pi smokeping slaves


>> 
>> Perhaps slightly off-topic, but I thought it might be interesting to 
>> others and a starter for ideas for others...
>> 
>> ---
>> Building on the concept of using a Raspberry Pi as a smokeping slave 
>> [Thanks to Ioannis Theodoridis] for the push!] I've completed one.

JZ> This is an AWESOME idea and I would love a copy of the code.
JZ>  We just bought 2 Pis for this purpose.
JZ>  If we decide to run one as a master do they still handle the load
and the config ok?
JZ> Thanks a ton! 
JZ> Josh

I tested a few different configs: [These were all the the "B" version Pi
with 512M RAM.]

---
1) Smokeping/MRTG/Nagios - as a stand-alone master. [With Smokeping
hitting say - 30-40 devices/60 secs with fping, MRTG polling a hundred
SNMP devices/ports/60secs and Nagios handling essentially the same hosts
as Smokeping - mostly for notification purposes. [I actually had nagios
watching the SP RRD files and not doing it's own checks.]

In this case, the Pi was pretty buried. If you OverClocked it to 900 Mhz
[IIRC] it would just barely stay below a 1.0 load average - at least
some of the time. But it was very touch and go - I never had a problem,
but when the 15 min load avg is really close to 1 and sometimes over,
then it's likely you're going to have problems at some point. Since this
is a critical warning/monitoring system, I'm not so hip on running them
on the ragged edge. :)

---
2) Running it as just a smokeping and MRTG master - same number of
targets etc. This works great and load is much less. I'm not sure why
Nagios is such a pig, but it is...

---
3) Running smokeping as a slave over an SSH tunnel back to the
mothership. And running MRTG as a "master" [not that there's any other
way to run MRTG] on the Pi, storing all the MRTG data locally on the SD
card, and generating all the graphs locally etc.

Again, this is absolutely no problem with any semi-reasonable number of
targets. [Say less than 100 smokeping and 100 MRTG targets.]

And with smokeping "phoning" home to give the data to a master, I can
run nagios there and generate all the alerts from a central location.

Load averages, even when cranking MRTG graphs [which only occur when
you're viewing pages with routers2.cgi] is really no problem at all.
Load is nearly always very low, or well below 1.

So, I tossed my configs and have it setup as an image, with option 3.
I have a few tweaks I need to make to that image, but other than that
it's ready for anyone to use.

It would be quite trivial to take that image and make smokeping a master
on if that's what you want - as everything it needs is already installed
etc.

I'm not sure exactly how/where to place the image so more than a single
person or two could pull it - it's about 2G.

Before running it, you'll want to write it on at least a 4G card [if
you're going to store much on the SD card, say running MRTG with big
RRD's, like I do] and you'll want to resize the partition. [Easy with
raspi-config.]

I run in on the RPi-Debian distro.

---
Finally, I've tried to secure it pretty substantially - blocking all
inbound ports except http/81 [can't use 80, since smokeping uses it to
talk to the master] https/443 and ssh/22.

I've setup apache to do auth for connects to MRTG too.

So, with the image - it's literally about 15 minutes to setup a full,
secure SSH tunnel smokeping slave from start-to-finish.

MRTG setup with say a router or two, and a switch is another few minutes
- depending on how much massaging you need to do the MRTG config files.
[I have some great sed scripts to hack those up quick in most of the
cases I have to use it in...though those aren't part of the image.]

Suggestions, questions, thoughts? I'm glad to answer.

-------------- next part --------------
==============================================================================================================
?? ??? ????????? ?????? ??????? ??????????? ???. ???? ?????? ???????????? ???????????? ??? ??? ??????? ??? ??????? (???) ???????????? ????????? ???? ??? ?? ???????? ???? ??????????? ?? ?? ?????????? ? ???????? ????????? ? ???? ???????? ??? ???.

?? ?????? ???????????? ???????????? ??????????? ???? ???????????? ????? ??? ????????, ??? ?????? ? ????????? ??????????? ???? ??????????? ??? ?????????. ? ?????????? ??? ? ??? ??? ???????????? ?????? ?????? ??? ???????????, ????????? ??? ????????????, ??????? ? ????????????? ????????? ??? ?????????, ??? ???????, ??????? ? ?????????? ??? ????????? ? ??? ????????? ????? ??? ??? ???? ?? ????? ??? ????? ??????? ? ????? ?????? ??? ??? ??? ????? ???????????? ??????.

??? ?????? ???? ????? ?? ????? ?????? ???????????? ????????????, ??????????? ?? ???????????? ?????? ???? ???????????? ???????????? ??? ????????? ??? ?? ?????????? ?? ??????. ??????????? ??????????, ??????? ? ????? ?????? ? ????????? ??? ????????? ????? ????? ???????????? ??????? ??? ?????? ?? ???????? ??????? ??? ?????? ??????.


Any e-mail message from the Bank of Greece (BoG) is sent in good faith but shall neither be binding nor construed as constituting or affecting a contractual arrangement or other commitment by the BoG.

The e-mail is intended for the exclusive use of the person whose e-mail address appears in caption as recipient. The sender and the BoG decline liability for inaccuracy, breach of integrity, loss or delayed delivery of the message, for any failure in, interruption to or degradation of either the service or the message, as well as for any loss or damage sustained thereof to the fullest extent provided by law.

If this e-mail was not intended for you, please notify the sender immediately via e-mail and delete it at once. Any unauthorized disclosure, dissemination or use, either in whole or in part is strictly prohibited and may give rise to both criminal and civil liability. All rights reserved.
==============================================================================================================




More information about the smokeping-users mailing list