We are using our Teltonikas to connect our devices to our back office when our own onboard modem does not have coverage. To know which Teltonika ends up with which device, I would like to send a DHCP status notification when a new device connects to the modem.
I managed to send a status notification; now, I am wondering if it is possible to add more information like the MAC address of the connected device.
Certainly, here’s a step-by-step guide to enable status notifications for new DHCP lease events on the RUT device using the Event Reporting feature:
Access the RUT WebGUI by typing the device’s IP address into your web browser and logging in with your credentials.
Navigate to the “Services” section and then click on “Event Reporting.”
Create a new rule by clicking on the “Add” button and enable the rule by checking the appropriate box.
Fill in the required parameters for the new rule:
Event Type: Select “New DHCP Client” from the dropdown menu.
Event Subtype: Choose “All” unless you want to specify whether notifications are for LAN or Wi-Fi connections only. If you select “All,” it will cover both LAN and Wi-Fi connections.
Action: Set this to “Send Email” to receive email notifications for new DHCP lease events.
Subject: Enter a subject for the notification email. You can use any text that helps you identify the purpose of the notification.
Message text: Enter the content of the email message. Use the format “Event text - %ex” to include the MAC address of the newly connected DHCP lease. You can also add additional parameters as needed.
Configure the recipient’s email address by selecting your email account from the dropdown menu and entering the recipient’s email address in the provided field.
Once all the settings are configured, click on the “Save and apply” button to save the changes and apply the new rule.
Plese refer to the pictures below:
To test the setup, connect a new device to the RUT, and the system should trigger an email notification containing the MAC address of the newly connected DHCP lease. For visual reference, please take a look at the picture below: