×


Blog


SNMP Trap v3 Configuration in Nagios - How to get it done ?

This article covers How to configure SNMP Trap v3 on the Nagios XI server.

The main difference between v2 and v3 traps is the authentication mechanisms. v2 is much simpler by design whereas v3 has multiple layers of authentication to strengthen it. Probably the biggest difference is that the SNMP Trap Daemon (snmptrapd) is configured by default to accept v2 traps from any device regardless of what SNMP community is provided. 

However snmptrapd cannot be configured to accept traps v3 from any device, it must be configured before it can receive an SNMP v3 trap.


The default SNMP Trap configuration is stored in the /etc/snmp/snmptrapd.conf file and contains just two lines:

disableAuthorization yes
traphandle default /usr/sbin/snmptthandler

 

The disableAuthorization directive allows SNMP v2 traps from any device to be sent to Nagios XI. 

Even if this line exists the Nagios XI server will not be able to receive SNMP v3 traps unless the server has been specifically configured for SNMP v3 traps.


Install PHP 8 on CentOS 7 / CentOS 8 - Step by Step Process ?

This article covers how to install PHP 8.0 on CentOS 8/7 and RHEL 8/7.

PHP is the most used scripting language for web development, both websites and web applications.

This guide will show you how to install PHP 8.0 on CentOS 8 | CentOS 7. 

Please note the GA release is fit for running in Production if the application already supports it.


To install any additional PHP package use command syntax:

$ sudo yum install php-xxx

To Check PHP version:

$ php --version


Install PHP 8 on Ubuntu 20.04 or 18.04 - Step by Step Process ?

This article covers steps to install PHP 8 on Ubuntu. PHP is arguably one of the most widely used server-side programming languages. It's the language of choice when developing dynamic and responsive websites. Basically, popular CM platforms such as WordPress, Drupal, and Magento are based on PHP.


To Install PHP as Apache Module

Run the commands:

$ sudo apt update
$ sudo apt install php8.0 libapache2-mod-php8.0

Once the packages are installed, restart Apache for the PHP module to get loaded:

$ sudo systemctl restart apache2


To Configure Apache with PHP-FPM

Php-FPM is a FastCGI process manager for PHP. 

1. Run the following command to install the necessary packages:

$ sudo apt update
$ sudo apt install php8.0-fpm libapache2-mod-fcgid

2. By default PHP-FPM is not enabled in Apache. 

To enable it, run:

$ sudo a2enmod proxy_fcgi setenvif
$ sudo a2enconf php8.0-fpm

3. To activate the changes, restart Apache:

$ systemctl restart apache2 


To install PHP 8.0 with Nginx

Nginx doesn't have built-in support for processing PHP files. We'll use PHP-FPM ("fastCGI process manager") to handle the PHP files.

Run the following commands to install PHP and PHP FPM packages:

$ sudo apt update
$ sudo apt install php8.0-fpm

Once the installation is completed, the FPM service will start automatically. 

To check the status of the service, run

$ systemctl status php8.0-fpm

Do not forget to restart the Nginx service so that the new configuration takes effect:

$ sudo systemctl restart nginx


Configure RDS User Profile Disks on Windows

This article covers method to configure and use User Profile Disks on a server with Remote Desktop Services role running on Windows Server 2012 / 2012 R2 / 2016.

In a single RDS collection, there can exist only one VHDX profile file for one user. If a user connects to the resources from two different collections, a separate profile disk should be created for each of them.

Also note that the UPD drive is bound to the RDS server Windows OS version. You can’t transfer (use) an UPD user profile from an RDS server from one version of Windows Server to another.


To Setup & Enable RDS User Profile Disks:

1. Create a shared network location for the disks.

2. Launch SERVER MANAGER.

3. Expand REMOTE DESKTOP SERVICES > COLLECTIONS.

4. Click on your Collection.

5. Click TASKS > EDIT PROPERTIES (top right corner).

6. Click USER PROFILE DISKS (bottom of the menu on the left).

7. Click ENABLE USER PROFILE DISKS.

8. Set the location to what you created in step 1

i.e. \\YourServerNameHere\UserProfileDisks$

9. Set the maximum size of those disks.

10. Scroll down and set what you want to have stored on those VHD's.


How to Resize User Profile Disks Using PowerShell ?

You can extend the virtual vhdx drive with the user's UPD profile using the PowerShell cmdlet Resize-VirtualDisk from the Hyper-V module:

Net use U: \\rdvh1\DemoLabOficeApps
Resize-VHD -Path u:\UVHD-<SID>.vhdx -SizeBytes 40GB
Net use U: /delete

If you want to run the Resize-VHD cmdlet from a desktop with Windows 10, you must install the feature Hyper-V -> Hyper-V Platform -> Hyper-V Services.


Send test SNMP trap in Nagios - How does this work ?

This article covers how to send a trap to Nagios server to test SNMP Trap functionality.

Basically, when troubleshooting an SNMP Trap issue, it can be very helpful to remove the actual device that could be causing problems and use the snmptrap command instead.

So in this guide, you will learn all the methods of sending a trap to your Nagios server to test SNMP Trap functionality.


SNMP Trap Definition

The following trap definition can be placed in /etc/snmp/snmptt.conf which will allow the test traps sent above to be passed through to Nagios:

EVENT netSnmpExampleHeartbeatRate .1.3.6.1.4.1.8072.2.3.0.1 "netSnmpExampleHeartbeatRate" Normal
FORMAT SNMP netSnmpExampleHeartbeatRate
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "" "netSnmpExampleHeartbeatRate"


The default SNMP Trap configuration is stored in the /etc/snmp/snmptrapd.conf file and contains just two lines:

disableAuthorization yes
traphandle default /usr/sbin/snmptthandler


SMTP error no route to host - Fix it Now ?

This article covers methods to resolve SMTP error no route to host.

This error happens when the port is blocked at the hosting end or ISP.

In this guide we have outlined different methods to fix this SMTP error.