get-scomalert | get-member -membertype property
Powershell中的部分输出:
Name MemberType Definition
---- ---------- ----------
TimeAdded Property datetime TimeAdded {get;}
TimeRaised Property datetime TimeRaised {get;}
两个字段的定义链接:alert-logging-latency
TimeRaised:时间戳,在代理上引发警报时创建。
TimeAdded:时间戳,在将 Alert 写入 OpsMgr 数据库时创建。
time added 和 timeraised 的值应该如何:
- 正如定义所暗示的那样,timeadd 应该大于(延迟)timeraised,因为警报将首先引发然后存储到数据库中。
get-scomalert | select name, timeraised, timeadded
Powershell 中的输出:
Name TimeRaised TimeAdded
---- ---------- ---------
All Management Servers Pool Unavaila... 5/14/2018 11:25:30 AM <time raised^ > 5/14/2018 11:18:16 AM
All Management Servers Pool Unavaila... 5/14/2018 11:17:30 AM 5/14/2018 11:10:16 AM
All Management Servers Pool Unavaila... 5/14/2018 11:09:30 AM 5/14/2018 11:02:16 AM
All Management Servers Pool Unavaila... 5/14/2018 11:01:30 AM 5/14/2018 10:54:16 AM
Power Shell Script failed to run 4/30/2018 4:26:53 PM <time added^ > 4/30/2018 6:06:50 PM
Power Shell Script failed to run 4/30/2018 4:26:53 PM 4/30/2018 6:06:50 PM
- 为什么会有 time added 早于 timeraised 的警报?