Global

Members

MonitorJS

MonitorJS is a simple & flexible library for monitoring and analyzing data. It offers functionalities to track, analyze, and set alerts based on monitored data.
Version:
  • 1.0.0
Author:
  • Mahdi Najafzadeh
Source:

Type Definitions

AlertSchema

Represents the schema for defining alerts in MonitorJS.
Type:
  • Object
Properties:
Name Type Attributes Description
name string The name of the alert (required).
condition string | function The condition for triggering the alert, either a string from predefined conditions or a custom function (required).
value number The value used in the comparison for triggering the alert (required).
function function <optional>
An optional custom function associated with the alert.
times Array.<string> <optional>
An array of time units for which the alert should be checked.
Source:

ItemSchema

Represents the schema for defining items in MonitorJS.
Type:
  • Object
Properties:
Name Type Attributes Default Description
name string The name of the item (required).
setter function <optional>
The function used to set or retrieve the value of the item.
interval number <optional>
1000 The interval in milliseconds for updating the item's value.
alerts Array.<AlertSchema> <optional>
[] An array of alerts associated with the item, defined by the AlertSchema.
times Array.<string> <optional>
[] An array of time units for checking alerts associated with the item.
max number <optional>
100 The maximum value threshold for the item.
min number <optional>
0 The minimum value threshold for the item.
bufferSize number <optional>
200 The size of the buffer storing historical values for the item.
Source: