controlio-monitor

0.0.14 • Public • Published

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 the ok status for the hostchanges, current is copied to previousStatus.

Each state has the following values:

  • counter: Is incremented with every execution of a check that set to changeReachable.
  • 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: Before current is updated with the latest check results, it is copied to previous.
  • previousStatus: When the value for ok changes, current is copied to previousStatus.

Each state has the following values:

  • counter: Number of checks with the current ok value. Is reset when ok changes.
  • since: Date on which ok last changed.
  • ok: Boolean value determining whether the check was successful or not. Set to null 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 to true while the check is being executed.
  • runningSince: Date when the check was started. Is null 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 to true 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.

Readme

Keywords

none

Package Sidebar

Install

npm i controlio-monitor

Weekly Downloads

1

Version

0.0.14

License

MIT

Last publish

Collaborators

  • lasar