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.
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
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: