-
Re: Unmanaged interfaces in the future report?
azabielski Mar 21, 2015 11:35 AM (in response to patricktw)Here is what i believe you want
select i.InterfaceName,n.Caption,i.UnManageFrom,i.UnManageUntil from Interfaces as i
left join Nodes as n on n.NodeID = i.NodeID
where GETDATE() <= i.UnManageFrom
Let me know if this is correct of if you have any questions
-
Re: Unmanaged interfaces in the future report?
JiriPsota Mar 23, 2015 2:00 AM (in response to patricktw)There are two ways how you can unmanaged interface.
1. unmanage whole node
2. unmanage specific interface
Following select should cover both cases (it's UNION of two selects so you can remove one if you would like to see interfaces unmanaged with the first or the second way):
--Unmanage Nodes with interfaces
SELECT n.Caption
, i.Caption
, DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), n.UnManageFrom) AS UnmanagedFrom
, DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), n.UnmanageUntil) AS UnmanagedUntil
,'NO' AS OnlyInterface
FROM Nodes n JOIN Interfaces i ON (n.NodeID=i.NodeID)
WHERE n.UnManageFrom>GETUTCDATE()
AND (i.UnManageFrom IS NULL or i.UnManageFrom<GETUTCDATE())
UNION
--Unmanaged interfaces
SELECT n.Caption
, i.Caption
, DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), i.UnManageFrom) AS UnmanagedFrom
, DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), i.UnmanageUntil) AS UnmanagedUntil
,'YES' AS OnlyInterface
FROM Nodes n JOIN Interfaces i ON (n.NodeID=i.NodeID)
WHERE i.UnManageFrom>GETUTCDATE()
UnManageFrom and UnManageUntil is in UTC so it has to be converted to Local time. "NO" in "OnlyInterfaces" column means the whole node was unmanaged. "YES" means, specific interface was unmanaged.
-
Re: Unmanaged interfaces in the future report?
patricktw Mar 23, 2015 12:20 PM (in response to patricktw)Hey guys,
Thank you very much for helping with this. Running both reports from the server itself in Report Writer brings up a great list of our unmanaged interfaces coming up -- but when I try to run it from our web front end, the report results with "No Activity to Report".
I'm not sure what is failing here. I've tried logging out and back in, and the reports were saved successfully after I added them as an advanced sql report.
-
Re: Unmanaged interfaces in the future report?
JiriPsota Mar 24, 2015 2:50 AM (in response to patricktw)What's your NMP version? Are there some errors in logs? What about account limitations?
-