Class DaemonAppEventEntity
One observed change in a supervised application, appended when a heartbeat differs from what was already stored.
public class DaemonAppEventEntity
- Inheritance
-
DaemonAppEventEntity
- Inherited Members
Remarks
This table exists because DaemonAppEntity has no memory. That row is overwritten on every heartbeat, so it says only what is true now. A game server that restart-looped at three in the morning and came back before anybody looked leaves no trace anywhere: the status reads Healthy, the restart counter has been reset, and the event is gone. This is the record of what the supervisor saw while nobody was watching.
It is not process output, and the daemon writes none of it. Every column is either a value from a closed enumeration, an integer, or a name the daemon already reported on its own row — there is no free-text column, and nothing here is a string the daemon chose. The rows are derived server-side by comparing an incoming report against the stored one, which is what keeps a compromised daemon from putting attacker-chosen text on an operator screen. A description of the transition is composed from these values at read time; it is never stored and never supplied. Adding a column the daemon fills with text would undo that in one commit.
Append-only, and free of foreign keys, for the reasons that govern
admin_audit_log: nothing updates or deletes a row, there is no xmin token because
there is no second writer to mediate, and the host and application are copied as text so
that decommissioning a host does not take the history of what it did with it. A cascade
here would delete the evidence exactly when a machine is removed for having misbehaved.
Properties
AppName
The supervised application, by the name the daemon knows it as.
public string AppName { get; set; }
Property Value
HostName
The host that reported it, copied as text with no foreign key.
public string HostName { get; set; }
Property Value
ID
Surrogate key. Also the tie-break for rows inside one timestamp.
public long ID { get; set; }
Property Value
ObservedUtc
When the heartbeat carrying this observation was recorded.
public DateTime ObservedUtc { get; set; }
Property Value
Remarks
The moment the database saw it, not a clock reading from the reporting host. A timestamp chosen by the daemon would let a host with a wrong clock — or a lying one — reorder the history of every other machine on the page.
PreviousProcessID
The process id before, when there was one.
public int? PreviousProcessID { get; set; }
Property Value
- int?
Remarks
The whole story on its own in one case: a status that reads Healthy on both sides with a different process id is a crash and a relaunch that finished inside one poll interval. Without this column that beat is indistinguishable from nothing happening.
PreviousRestartAttempts
The restart count before, or null on a first sighting.
public int? PreviousRestartAttempts { get; set; }
Property Value
- int?
Remarks
Not in the original sketch for this table, and added because a decrease is meaningful: the daemon zeroes its counter the moment an application checks out healthy again, so a fall from three to zero is the recovery. A row that carried only the new value would show a zero indistinguishable from an application that never failed.
PreviousStatus
What was stored before this observation, or null when this is the first sighting.
public DaemonAppStatus? PreviousStatus { get; set; }
Property Value
Remarks
Null is a fact rather than a gap: it means no row existed for this application, which is what a newly configured application — or one the panel has never seen a heartbeat for — looks like.
ProcessID
The process id now, when it is running.
public int? ProcessID { get; set; }
Property Value
- int?
RestartAttempts
Restarts in the current failure cycle, as reported.
public int RestartAttempts { get; set; }
Property Value
Status
What the daemon observed this time.
public DaemonAppStatus Status { get; set; }