controlio-monitor
The core system.
Description
The core app that handles everything.
TODO
-
inspector/status: Rewrite/Simplify status information to make more sense. Split config and status.
-
inspector: Track duration and output of every result
-
Log all pertinent information (check results, results and their output, status changes etc) to a useful database.
- Database options: SQLite, MongoDB, MySQL
- Check values must be parseable
-
valueChange
- Trigger results when a monitored value changes from last time
-
inspector.getOption: Generate error when parameters are missing
Status data
Host
For every hos two states are kept:
-
current
: The latest data. -
previousStatus
: When theok
status for the hostchanges,current
is copied topreviousStatus
.
Each state has the following values:
-
counter
: Is incremented with every execution of a check that set tochangeReachable
. -
ok
: Boolean value determining whether the host is reachable. Used to decide whether checks for this host should be executed.
Check
For every check three states are kept:
-
current
: The latest data. -
previous
: Beforecurrent
is updated with the latest check results, it is copied toprevious
. -
previousStatus
: When the value forok
changes,current
is copied topreviousStatus
.
Each state has the following values:
-
counter
: Number of checks with the currentok
value. Is reset whenok
changes. -
since
: Date on whichok
last changed. -
ok
: Boolean value determining whether the check was successful or not. Set tonull
on launch or when the check can't be executed due to the host being unreachable. -
msg
: Message from check execution. -
output
: Output from check execution. -
values
: Data values from check execution. -
start
: Start of the last check execution. -
end
: End of the last check execution. -
duration
: Duration of the last check execution.
Additionally each check has a meta
object with the following values:
-
counter
: Number of checks since app launch. Incremented with each check update. -
running
: Boolean value that is set totrue
while the check is being executed. -
runningSince
: Date when the check was started. Isnull
while the check is not running. -
next
: Date for which the next check execution is scheduled.
on
Each on
event has the following status values:
-
counter
: Number of times this event was executed. -
running
: Boolean value that is set totrue
while the event is being executed. -
start
: Start of the last event execution. -
end
: End of the last event execution. -
duration
: Duration of the last event execution. -
error
: Error (if any) of the last event execution. -
output
: Output (if any) of the last event execution.