Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Last Visible or Last Successful Heartbeat

Any chance we can get a date/time field in PDQ Inventory for the last time a computer was online or a last successful heartbeat?

1

Comments

4 comments
Date Votes
  • I don't know why it's not available as a column on the main page, but you can create a SQL Report with LastIsOnlineTime.

    SELECT
    Name
    , LastIsOnlineTime
    FROM
    Computers
    WHERE
    <ComputerFilter>
    0
  • Thank you. When does that timestamp register exactly?

    I have a few servers saying "2021-07-21 06:06:30" which are up and running and PDQ sees them.

    1
  • I was wrong about what LastIsOnlineTime represents. I did some experimentation and figured out that it's the last time the target went from offline to online.

    • LastIsOnlineTime - The last time IsOnline changed from 0 to 1
    • LastIsOfflineTime - The last time IsOnline changed from 1 to 0
    • HeartbeatDate - The last time a Heartbeat was sent to the target

    If IsOnline = 1, then HeartbeatDate is the last successful Heartbeat. If IsOnline = 0, then LastIsOfflineTime is when the target went offline. Here's a SQL Report that pulls that logic into 1 field. Technically, when IsOnline = 0, this report is off by whatever your Heartbeat Interval is since it will show the Heartbeat after the last successful one, but hopefully it's close enough. You can remove the extra fields if you don't want them.

    SELECT
    Name
    , IsOnline
    , LastIsOnlineTime
    , LastIsOfflineTime
    , HeartbeatDate
    , CASE
    WHEN IsOnline = 0 THEN
    LastIsOfflineTime
    ELSE
    HeartbeatDate
    END 'Last Heartbeat'
    FROM
    Computers
    WHERE
    <ComputerFilter>
    2
  • Fantastic! Thanks Colby. This helps alot.

    1