How To Monitor Synology NAS With Zabbix Over SNMP v3

Today I will show you how you can monitor your Synology NAS (DSM 7.1) with Zabbix v6.2 over SNMPv3.

Note – These directions are for a setup on a local LAN (not over a WAN) and assume you have a working installation of Zabbix 6.2 running that has bi-drectional reach-ability to a Synology NAS running DSM v7.1

Phase 1 – Setup SNMPv3 on Zabbix server ->

1 – Update repositories and install libsnmp-dev

sudo apt-get update
sudo apt install libsnmp-dev

2 – stop snmpd demon

sudo service snmpd stop

3 – Create SNMPv3 user authPrivUser on Zabbix server

net-snmp-config --create-snmpv3-user -ro -a SHA -A "myauthphrase" -x AES -X "myprivphrase" authPrivUser

My Example:

sudo net-snmp-config --create-snmpv3-user -ro -a SHA -A "stringbean1" -x AES -X "stringbean2" authPrivUser

4 – Start snmpd service

sudo service snmpd start

Note – releveant conf files ->

/var/lib/snmp/snmpd.conf
/etc/snmp/snmpd.conf

Testing SNMPv3 user on Zabbix server with these commands ->

snmpget -v 3 -u authPrivUser -l AuthPriv -a SHA-512 -A myauthprhase -x AES -X myprivphrase 127.0.0.1 1.3.6.1.2.1.1.1.0

Test to actual host you want to monitor ->

snmpget -v 3 -u authPriveUser -l AuthPriv -a SHA-512 -A myauthprhase -x AES -X myprivphrase <client host ip> 1.3.6.1.2.1.1.1.0

Phase 2 – Configure SNMPv3 on Synology

1 – Navigate to control panel>search ‘snmp’ (terminal & snmp > SNMP)
2 – Check mark ‘enable SNMP service’
3 – Check mark ‘enable SNMPv3 service’
4 – Input username ‘authPriveUser’ (note – it is CASE SENSITIVE)
5 – Set protocol to ‘SHA’
6 – Set password (use whatever you set as ‘myauthphrase’ on Zabbix server)
6 – Check mark ‘enable SNMP privacy’
7 – Set protocol to ‘AES’
8 – Set password (use whatever you set as ‘myprivphrase’ on Zabbix server)

Phase 3 – Configure Zabbix host in Zabbix

1 – Download & install SNMPv3 zabbix template
(https://www.zabbix.com/integrations/synology)
2 – Create host in Zabbix
3 – For interfaces, click add>SNMP and change SNMP version to SNMPv3
4 – Change ‘security level’ to authPriv
5 – Set appropriate authentication protocol.

Note -‘authentication passphrase’ = ‘myauthprhase’ and ‘privacy passphrase’ = ‘myprivphrase’

Download template_synology_diskstation_snmpv3

Install Zabbix 6.4 On Ubuntu Server 22.04.1 In Under 10 Minutes

This guide will assume you have a working Ubuntu Server already installed with SSH enabled and ready to go. If you need help with installing Ubuntu server, refer here

If you’re more visual and prefer to watch an installation walk through, refer here

Aside from that, lets jump straight into installing Zabbix 6.4 PRE-RELEASE on top of Ubuntu Server 22.04.1 which as  the time of this writing, is latest and greatest versions of both ->

1. Install ubuntu server 22.04.1 and enable ssh

2. SSH to your Ubuntu server to run install commands

3. Install and configure Zabbix for your platform

Run the following cmds:

sudo wget https://repo.zabbix.com/zabbix/6.3/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.3-3%2Bubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.3-3+ubuntu22.04_all.deb
sudo apt update 
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

4. Install sql server

sudo apt-get install mysql-server
sudo systemctl start mysql

5. Create initial database

sudo mysql
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;

6. On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

7. Disable log_bin_trust_function_creators option after importing database schema.

sudo mysql
set global log_bin_trust_function_creators = 0;
quit;

8. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf and set the DB password with ->

sudo vim /etc/zabbix/zabbix_server.conf

9. Start Zabbix server and agent processes

systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

10. Open Zabbix UI web page and proceed with web ui config (should be self explanatory)

The default URL for Zabbix UI when using Apache web server is http://host/zabbix

Video walk through ->

Questions, comments, concerns? Feel free to contact us @ [email protected] Always glad to help.

 

 

Set Up Your Own Internally Hosted Private Wiki On Ubuntu Server

We used DokuWiki to create and host our own internal Wiki on the latest version of Ubuntu Server (22.04.1 at the time of this writing). How cool is this? We’ll, it’s actually more than just ‘cool’ and can make for an invaluable tool used to centrally store crucial information while making it conveniently accessible to you and your teams.

If you’re new to DokuWiki and unfamiliar with PHP, installation and setup can be a daunting task. But not to worry because today we are going to fly you through installation step by step and as a bonus, show you the basics to get your Wiki up and running in no time.

From the horses mouth ->

DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn’t require a database. It is loved by users for its clean and readable syntax. The ease of maintenance, backup and integration makes it an administrator’s favorite. Built in access controls and authentication connectors make DokuWiki especially useful in the enterprise context and the large number of plugins contributed by its vibrant community allow for a broad range of use cases beyond a traditional wiki.

Full list of installation commands ->

1 – Update System
sudo apt-get update

2 – Install Apache And PHP
sudo apt-get install apache2 php php-gd php-xml php-json -y

3 – Start Apache Service
systemctl start apache2
systemctl enable apache2

4 – Install DokuWiki
cd /var/www
sudo wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
sudo tar xvf dokuwiki-stable.tgz
sudo mv dokuwiki-*/ dokuwiki

5 – Change Permissions
sudo chown -R www-data:www-data /var/www/dokuwiki

6 – Change Document Root In Apache To Point To /var/www/dokuwiki
sudo vim /etc/apache2/sites-enabled/000*.conf

Replace
DocumentRoot /var/www/html
with
DocumentRoot /var/www/dokuwiki

7 – Change AllowOverrides Setting In Apache2 To Use .htaccess files For Security
sudo vim /etc/apache2/apache2.conf

For directory /var/www/ replace
AllowOverride None
with
AllowOverride All

8 – Restart Apache2 Service
sudo service apache2 restart

9 – Visit http://IP-address-of-your-server/install.php to initially configure your DokuWiki.

10 – Delete The Install.php File After Finished Installing
sudo rm /var/www/dokuwiki/install.php