I am having problems generating an alert on all IP's that changed status from Available to Used. I could not find anything out of the box to get me what I need. However I was able to find an SQL script for SolarWinds alert . The script partly works. It does not provide the IP address from the alert. Please see attachment. I would like to see the IP address in the "Triggered by:" field. I need assistance with generating this type of alert.
This is the script:
WHERE ipnodeid in (
SELECT a.ipnodeid
FROM IPAM_IPHistoryReport a
INNER JOIN
(
SELECT
ipnodeid,
max(IPAM_IPHistoryReport.Time) as tt
from IPAM_IPHistoryReport
Group by ipnodeid
) b
on a.IPNodeId=b.IPNodeId
and
a.Time=b.tt
where a.FromValue='Available' and a.IntoValue='Used')
Thanks,
Markus A.