Monitoring Devolo DLAN with synagios

270 views
Skip to first unread message

Thomas Wittmann

unread,
Jul 1, 2016, 4:24:07 AM7/1/16
to synagios-users
So we have this new shiny Nagios running on our Synology. But monitoring the NAS itself is quite boring right? For example, i have several Devolo DLAN adapters running to have network from top to basement.
Luckily there is a Nagios plugin for this: https://exchange.icinga.org/tdoe/check_dlan_connection
What is absolutely needed for this is an adpater which has an IP address. In my case this is a single "Devolo dLAN 1200+ WiFi ac". The plugin is executed against this IP.
And here we go:

1. chroot /volume1/@appstore/Synagios/nagios-chroot/ /bin/bash
2. dpkg-reconfigure locales   (https://www.thomas-krenn.com/de/wiki/Perl_warning_Setting_locale_failed_unter_Debian, German, unfortunately)
    I selected:   en_US ISO-8859-1
              en_US.ISO-8859-15 ISO-8859-15
              en_US.UTF-8 UTF-8 
              de_DE ISO-8859-1 
              de_DE.UTF-8 UTF-8 
              de_DE@euro ISO-8859-15
   Explanation: if you do not select locales, you will have this errors while compiling (step 5-6):
       perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LANG = "en_US.utf8"
           are supported and installed on your system.
    You can skip this step completely (it is not needed for Step 5-6) but later on the plugin won't work so you need it before Step 7 at the latest.
3. apt-get install build-essential
4. /usr/bin/perl -MCPAN -e shell
5. install LWP::Simple   (takes some time)
6. install JSON
7. Get the plugin, copy it to /usr/local/nagios/plugins, make it executable and add it as command  in Nagrestconf (there are already several of Mark's tutorials for this)

The command check_dlan in Nagrestconf looks like this: $USER5$/check_dlan_connection.pl --host $HOSTADDRESS$ $ARG1$, where $HOSTADDRESS$ is the IP of the before mentioned DLAN adapter.
If you want to check the connections it works like this: check_dlan! --device "start-dlan" --router "end-dlan" --warntx 80 --crittx 60 --warnrx 80 --critrx 60
Explanation: The "start-dlan" and "end-dlan" are self-explained i think (from-to), the values behind warntx etc are meant to be in MBit, can be set to whatever you want and Nagios warns if they fall under the values you set. 
In my final setup it looks like this then:




Mark Clarkson

unread,
Jul 1, 2016, 8:23:45 AM7/1/16
to synagios-users
Nice write up! Makes me want to buy a devolo dlan just to try it! I've added a link directly to this post on the Nagrestconf Web site. Many thanks for contributing :)

Thomas Wittmann

unread,
Jul 4, 2016, 3:01:42 AM7/4/16
to synagios-users
Hi Mark!
I'd appreciate that :-)
Since i was fuzzing around alot until it worked i don't know exactly if some package i installed over IPKG in the meantime has made it working, too.
Perhaps you can install it and give me feedback, if everything works then at least the plugin should execute without errors and i can unistall the unnecessary packages.
Many thanks for adding this to your main site but i saw that there is an "n"  missing in my name in the Nagrestconf link ;-)


Tom

Mark Clarkson

unread,
Jul 4, 2016, 4:24:08 AM7/4/16
to synagios-users


On Monday, 4 July 2016 08:01:42 UTC+1, Thomas Wittmann wrote:
Since i was fuzzing around alot until it worked i don't know exactly if some package i installed over IPKG in the meantime has made it working, too.
Perhaps you can install it and give me feedback, if everything works then at least the plugin should execute without errors and i can unistall the unnecessary packages.

I will try it for sure. Hopefully tonight, but almost definitely this week.
 
Many thanks for adding this to your main site but i saw that there is an "n"  missing in my name in the Nagrestconf link ;-)


 Oops sorry, fixed now!

Mark Clarkson

unread,
Jul 10, 2016, 2:18:23 PM7/10/16
to synagios-users
On Friday, 1 July 2016 09:24:07 UTC+1, Thomas Wittmann wrote

1. chroot /volume1/@appstore/Synagios/nagios-chroot/ /bin/bash
2. dpkg-reconfigure locales   (https://www.thomas-krenn.com/de/wiki/Perl_warning_Setting_locale_failed_unter_Debian, German, unfortunately)
    I selected:   en_US ISO-8859-1
              en_US.ISO-8859-15 ISO-8859-15
              en_US.UTF-8 UTF-8 
              de_DE ISO-8859-1 
              de_DE.UTF-8 UTF-8 
              de_DE@euro ISO-8859-15
   Explanation: if you do not select locales, you will have this errors while compiling (step 5-6):
       perl: warning: Please check that your locale settings:
   LANGUAGE = (unset),
   LC_ALL = (unset),
   LANG = "en_US.utf8"
           are supported and installed on your system.
    You can skip this step completely (it is not needed for Step 5-6) but later on the plugin won't work so you need it before Step 7 at the latest.

2.5 apt-get update
 
3. apt-get install build-essential
4. /usr/bin/perl -MCPAN -e shell
5. install LWP::Simple   (takes some time)
6. install JSON

6.5 exit
 
7. Get the plugin, copy it to /usr/local/nagios/plugins, make it executable and add it as command  in Nagrestconf (there are already several of Mark's tutorials for this)

7. cd /usr/local/nagios/plugins
8. wget https://exchange.icinga.org/tdoe/check_dlan_connection/files/1205/check_dlan_connection
9. chmod +x check_dlan_connection
10. Add it as a command ... :
 

The command check_dlan in Nagrestconf looks like this: $USER5$/check_dlan_connection.pl --host $HOSTADDRESS$ $ARG1$, where $HOSTADDRESS$ is the IP of the before mentioned DLAN adapter.
If you want to check the connections it works like this: check_dlan! --device "start-dlan" --router "end-dlan" --warntx 80 --crittx 60 --warnrx 80 --critrx 60
Explanation: The "start-dlan" and "end-dlan" are self-explained i think (from-to), the values behind warntx etc are meant to be in MBit, can be set to whatever you want and Nagios warns if they fall under the values you set. 
In my final setup it looks like this then:


Not owning a dlan card I can't test it but nice write-up anyway. One thing to note is upgrades. The whole operating system is replaced when it is upgraded and the following directories/files are saved and put back after the upgrade:

   etc/nagios3/ \
    etc/nagrestconf/ \
    etc/pnp4nagios/ \
    etc/apache2/ \
    var/lib/pnp4nagios/ \
    var/cache/nagios3/objects.cache \
    var/lib/nagios3/retention.dat \
    var/log/nagios3/ \
    usr/share/pnp4nagios/html/templates.dist/

So, after an upgrade you would have to repeat this process. I've created issue #59 for this.

Thomas Wittmann

unread,
Jul 12, 2016, 5:09:53 AM7/12/16
to synagios-users
Hi Mark
thanks alot for the feedback!
The DLAN is not a card though but an adapter which sends network traffic over the powerline in hour house :)
At least here in Germany Devolo (who actually pioneered this about 10 years ago here) is the most popular manufacturer although there are many others now.

Tom

Thomas Wittmann

unread,
Oct 31, 2017, 1:39:12 PM10/31/17
to synagios-users
Hi Mark
recently i needed to remove Nagios and reinstall it. But unfortunately the apt-get install build-essential command renders the (working) installation useless.
It seems to uninstall essential things but i am not able to determine it exactly.

BR Tom


Am Sonntag, 10. Juli 2016 20:18:23 UTC+2 schrieb Mark Clarkson:

Mark Clarkson

unread,
Oct 31, 2017, 5:51:22 PM10/31/17
to synagio...@googlegroups.com
Oh no! Well, on the latest Synagios for x86 (0.14.7) I did:

apt-get update
apt-get install build-essential

and all seems to be working ok - I built that just a few days ago. Hopefully you can use 0.14.7 for x86.
--
You received this message because you are subscribed to the Google Groups "synagios-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to synagios-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Wittmann

unread,
Nov 1, 2017, 4:12:17 AM11/1/17
to synagios-users
Hi Mark
sorry i forgot to mention a few more details.
Since i own a DS216j i have to use the arm package (0.14.4).
What happens is: the nagrestconf website is removed (returns 404)
Nagios core is stoppend and removed (site still available), though i can still see the program (in /etc/init.d/nagios3)

BR Tom
Reply all
Reply to author
Forward
0 new messages