SMS SQL to show Heartbeat Discovery times
Some simple SQL to show quick status on heartbeat discovery for all your SMS clients.
----Begin SQL----
select AgentName, DatePart(dd, AgentTime) 'Day',
DatePart(hh, AgentTime) 'Hour' ,
Count(*) 'Count'
from v_AgentDiscoveries
Where AgentName = 'Heartbeat Discovery' and AgentTime > '2007-06-18'
Group by AgentName, DatePart(dd, AgentTime),
DatePart(hh, AgentTime)
Order By AgentName, DatePart(dd, AgentTime), DatePart(hh, AgentTime)
----End SQL----
----Begin SQL----
select AgentName, DatePart(dd, AgentTime) 'Day',
DatePart(hh, AgentTime) 'Hour' ,
Count(*) 'Count'
from v_AgentDiscoveries
Where AgentName = 'Heartbeat Discovery' and AgentTime > '2007-06-18'
Group by AgentName, DatePart(dd, AgentTime),
DatePart(hh, AgentTime)
Order By AgentName, DatePart(dd, AgentTime), DatePart(hh, AgentTime)
----End SQL----
About the Author
Emmanuel Tsouris is a Systems Management veteran and Developer Advocate specializing in PowerShell and Cloud Automation. He maintains DotVBS to preserve legacy knowledge for the "archaeologist admin."
Ready to move from VBScript to the Cloud? Check out his book, Pro PowerShell for Amazon Web Services.
Visit EmmanuelTsouris.com for his latest projects.
As an Amazon Associate, I earn from qualifying purchases at no cost to you.
Comments