[arm-allstar] Nagios Client Packages?

Lee Woldanski ve7fet at tparc.org
Sat Dec 23 20:34:23 EST 2017


Hi David,

Thanks for the comments.

5666 isn't open to the internet, it resides behind a firewall on our
"HamWAN" (https://www.bcwarn.net), so no concerns there.

We'll see if I need to tweak the monitoring for the asterisk process. It
hasn't been an issue on DIAL. If there are multiple processes spawned, so
far they have disappeared by the time Nagios has checked.

I have no concerns over NRPE using resources. It is only polled
periodically by the host Nagios server, and uses very minimal resources.

For extra credit, there is also a nifty plugin to monitor the Pi's
temperature too:
https://github.com/larsen0815/check_rasp_temp

Only difference is that the plugins are located
in /usr/lib/monitoring-plugins/

And, in /etc/nrpe/nrpe.cfg you can use:
command[check_rasp_temp]=/usr/lib/monitoring-plugins/check_rasp_temp -w 60
-c 70


Lee

On Sat, Dec 23, 2017 at 5:17 PM, "David McGough via arm-allstar" <
arm-allstar at hamvoip.org> wrote:

>
> Lee,
>
> A few comments...
>
> First, there can occasionally be multiple instances of an asterisk process
> running. This can happen from cron jobs or even if you connect to
> asterisk remotely. Don't be alarmed is multiple instances briefly show up.
>
> Second, PLEASE don't open TCP port 5666 to the Internet! This has
> classically been a hack-hole! If nothing else, you'll have hackers
> pounding on this port just to see what's there.
>
> Aside from possible security issues, use great caution when setting up any
> type of monitoring application on a RPi2/3 board---You don't want the
> resource monitoring tool to become THE source of resource exhaustion!
>
>
> 73, David KB4FXC
>
>
>
>
>
> On Sat, 23 Dec 2017, "Lee Woldanski via arm-allstar" wrote:
>
> > Ok, here is an update to close the loop.
> >
> > I have Nagios running on a server on our network, so all I wanted to do
> is
> > be able to check my Allstar Pi, make sure it is alive, and make sure
> > Asterisk is running. That calls for getting NRPE running on the Pi.
> >
> > Basic how-to on getting this going...
> >
> > Install the required packages from the available repository:
> > pacman -S monitoring-plugins nrpe
> >
> >
> > Edit /etc/nrpe/nrpe.cfg:
> >
> > Add your Nagios server to the allowed hosts...
> > allowed_hosts=44.128.1.1,127.0.0.1
> >
> > Need to set this to 1:
> > dont_blame_nrpe=1
> >
> > If you want to check the hard disk (flash card) and make sure it isn't
> > getting full, hda1 isn't on dev/hda1, it is on mmcblk0p1... (just change
> > the /dev so that stock scripts can still check_hda1):
> > command[check_hda1]=/usr/lib/monitoring-plugins/check_disk -w 20% -c
> 10% -p
> > /dev/mmcblk0p1
> >
> > Add a custom command down at the bottom to make sure one and only one
> > process called 'asterisk' is running:
> > command[check_asterisk]=/usr/lib/monitoring-plugins/check_procs -c 1:1
> -C
> > asterisk
> >
> > Save nrpe.cfg.
> >
> >
> > Edit /etc/openvpn/firewall and add:
> >
> > ### Allow all Internet traffic for Nagios
> > $IPTABLES -A INPUT -p tcp --dport 5666 -j ACCEPT
> >
> > ### Allow ICMP traffic from internet
> > $IPTABLES -A INPUT -p ICMP --icmp-type 8 -j ACCEPT
> >
> > Run /etc/openvpn/firewall to re-load the firewall rules.
> >
> >
> > Edit /etc/rc.local and add:
> >
> > # Start NRPE so Nagios can monitor us
> > /usr/bin/nrpe -c /etc/nrpe/nrpe.cfg -d
> >
> > Start NRPE up, (/usr/bin/nrpe -c /etc/nrpe/nrpe.cfg -d).
> >
> >
> > Now, go to your Nagios server and create your necessary object config
> file
> > to monitor this new host. You can now use "check_command
> >  check_nrpe!check_asterisk" to check if Asterisk is running on the Pi.
> >
> >
> > Cheers!
> >
> >
> > Lee
> >
> >
> > On Sun, Dec 17, 2017 at 6:34 PM, "Don Backstrom AA7AU via arm-allstar" <
> > arm-allstar at hamvoip.org> wrote:
> >
> > > On Sun 17-Dec-17 16:29, "Lee Woldanski via arm-allstar" wrote:
> > >
> > >> Has anyone got the Nagios client tools (nrpe) running on their Pi,
> yet?
> > >>
> > >
> > >         I have had an on-going instance of Nagios3 service running on
> > > Rasparian (Wheezy/Jesse) on a rPi (v1) for several years, monitoring a
> > > number of different switches/servers/services in different locations -
> and
> > > it really works great. It even includes some terrific internal
> monitoring
> > > on the PI itself (even for the original Pi-1 models).
> > >
> > >         While it's been on my to-do list, I have not yet attempted an
> > > install with the Hamvoip/Archlinux rPi3 so I can't add much to your
> > > specific question. I will be *very* interested in what others have to
> add
> > > in response to your question. Also it's on my list to use for my new
> AREDN
> > > MeshNet proof-of-concept system.
> > >
> > >         In general, Nagios3 is a terrific add-on and well worth the
> effort
> > > to configure/install as a linux-based service.
> > >
> > >         Cheers,
> > >
> > >         - Don - AA7AU
> > > _______________________________________________
> > >
> > > arm-allstar mailing list
> > > arm-allstar at hamvoip.org
> > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> > >
> > > Visit the BBB and RPi2/3 web page - http://hamvoip.org
> > >
> >
> >
> >
> >
>
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>



-- 
Lee Woldanski, AScT
VE7FET


More information about the arm-allstar mailing list