One Line diagnostic scripts
Ping failures:
(i.e. the target is unreachable / offline)
Protocol 5 is ICMP (Ping)
--ping select * from history.t_CommandHistory where ProtocolId=5 and message like '%Failed%' order by AttemptDate desc
Credentials
Find credential failure (all projects)
--SSH Login Failure select * from history.t_connectionhistory where ProtocolID=2 and OutcomeID = 3 order by connectionhistoryid desc --Windows Login Failure select * from history.t_connectionhistory where ProtocolID in (3,4) and OutcomeID = 3 order by connectionhistoryid desc --Oracle Login Failure select * from history.t_connectionhistory where ProtocolID=7 and OutcomeID = 3 order by connectionhistoryid desc -- MS SQL Login Failure select * from history.t_connectionhistory where ProtocolID=8 and OutcomeID = 3 order by connectionhistoryid desc
Database Connection Failures:
--Oracle Connection Failure select * from history.t_connectionhistory where ProtocolID=7 and OutcomeID = 3 order by connectionhistoryid desc -– MS SQL Connection Failure select * from history.t_connectionhistory where ProtocolID=8 and OutcomeID = 4 order by connectionhistoryid desc
We can also dig deeper into the Command History to check for specific failures, though that’s a bit tougher as there is a lot of information in that table and the results table – the basic listing is as follows:
select * from history.t_CommandHistory ch join history.t_CommandHistoryResult chr on ch.CommandHistoryID = chr.CommandHistoryID