Select Page

Exported Alert: How to Populate Node Custom Properties Using Alerts

by 22, Jun, 2020Alerting & Custom Alerts, Blog Bites, Network Management

SolarWinds IP Address Manager (IPAM) module is a great tool to directly manage and monitor with rich visual presentation, the usage of IP addresses in a network. SolarWinds® provides multiple options to populate subnet information in our network to IPAM. Subnet information can be added manually, a spreadsheet can be imported, DHCP integration can be used to continually pull directly from DHCP servers and for the more adventurous or needy out there, via the Orion API.

As we can run different SolarWinds modules in a single platform; when we populate our subnets to IPAM and start monitoring IP addresses in our network, that IPAM scope also includes management IP addresses of our nodes that are currently monitored or will be monitored using Network Performance Monitor Server & Application Monitor modules. This is the starting point for our blog post; we can use subnet data in IPAM to enrich node information.

Let’s look at a standard subnet definition in SolarWinds; we must have Subnet Address and CIDR information in our subnet definition but at the same time, we can also customise other fields; description, location, subnet name, etc.

ipam_properties (Insight Image) - Prosperon Networks

These fields can be used to enrich node custom properties and this approach can be automated using “Set Custom Property” action in alerts to update properties for newly populated nodes.

In order to demonstrate that feature, we have defined an alert to populate “Site” custom property of nodes based on “Location” attribute of IPAM subnets.

Requirements:

  • IPAM subnets were defined with “Location” attribute value:
IP Addresses (Insight Image) - Prosperon Networks

Alert Definition:

We defined a new alert as shown below, it is important to use less frequent evaluation time as we don’t need to check new devices every minute. Severity of the alert should also be selected as “Notice” or “Informational” as we are defining this alert for automation rather than the normal monitoring data analysis.

Alert Properties (Insight Image) - Prosperon Networks

In “Trigger Condition” tab, we should select “Custom SQL Alert” in order to define SQL condition to correlated IPAM subnet dat with node information:

Trigger Condition (Insight Image) - Prosperon Networks

SQL Condition:

[code]INNER JOIN
(
SELECT DISTINCT ipaddress,
subnetid
FROM ipam_node) iplist ON nodes.ip_address=iplist.ipaddress INNER JOIN
(
SELECT groupid AS subnetid,
friendlyname AS subnetname,
location
FROM ipam_group
WHERE grouptype=8) subnets ON iplist.subnetid=subnets.subnetid WHERE nodes.site IS NULL[/code]

“Reset Condition” and “Time of Day” tabs can be skipped with default settings, as these are not relevant for our function:

Time of Day (Insight Image) - Prosperon Networks

In “Trigger Action” tab, we should add the “Change Custom Property” action type and we will utilise the advance ability for using a custom SQL query for “Site” custom property value:

Configure Action - Change Custom Property2 (Insight Image) - Prosperon Networks
[code]${SQL: SELECT subnets.location
FROM nodes
INNER JOIN
(
SELECT DISTINCT ipaddress,
subnetid
FROM ipam_node) iplist
ON nodes.ip_address=iplist.ipaddress
INNER JOIN
(
SELECT groupid AS subnetid,
friendlyname AS subnetname,
location
FROM ipam_group
WHERE grouptype=8) subnets
ON iplist.subnetid=subnets.subnetid
WHERE nodes.site IS NULL
AND nodes.nodeid=$
{N=SwisEntity; M=NodeID}}[/code]

“Reset Actions” tab can be skipped without adding any action and alert should be saved using “Submit” button on the last “Summary” tab. Once submitted, the alert will do it’s thing, pulling data from IPAM and inserting into the Custom Property data fields where we should see updated “Site” custom property values for nodes.

Manage Nodes (Insight Image) - Prosperon Networks

This is an example of using the Alerting capabilities to update data, which I hope you find useful. Please feel free to download the created Alert definition for importing into you installation. You will need to create the Custom Property structure or update the alert if your ‘site’ field is named differently.

Custom Alert: Auto Populate Custom Property Using Alert

Ecmel Ozdemir

Ecmel Ozdemir

Snr. SolarWinds Engineer

Ecmel Ozdemir is a Senior SolarWinds Engineer at Prosperon Networks. As a SolarWinds Engineer for over three years, Ecmel has helped hundreds of customers meet their IT monitoring requirements with SolarWinds.

Custom Alert: Auto Populate Custom Property Using Alert

Related Insights From The Prosperon Blog

Share This