Alarmes

Structure

Voici la structure d'une alarme.

{
"_id" :                         // alarm ID, generated by Canopsis
"t" :                           // creation date UNIX timestamp
"d" :                           // entity ID related to the alarm
"v" : {
    "state" : {
        "_t" :                  // current state
        "t" :                   // latest state change date as a UNIX timestamp
        "a" :                   // latest state change author
        "m" :                   // latest state change output
        "val" :                 // current state value
    },
    "status" : {
        "_t" :                  // current status value
        "t" :                   // latest status change date as a UNIX timestamp
        "a" :                   // latest status change author
        "m" :                   // latest status change output
        "val" :                 // current status value
    },
    "steps" : [                 // alarm history
        {
          ...
        }
    ],
    "component" :               // component name
    "connector" :               // connector type
    "connector_name" :          // connector identifier
    "creation_date" :           // alarm creation date as a UNIX timestamp
    "display_name" :            // randomly generated string
    "initial_output" :          // output value on alarm creation
    "output" :                  // current output
    "initial_long_output" :     // long output value on alarm creation
    "long_output" :             // current long output
    "long_output_history" : [   // history of values for the long output
        ...
    ],
    "last_update_date" :        // latest date as a UNIX timestamp
    "last_event_date" :         // latest date as a UNIX timestamp
    "tags" : [],
    "total_state_changes" :     // number of times the alarm state changed
    "extra" : {},               // extra datas added with external scripts, e.g `activation_date`
    "infos" : {}                // extra infos added with engine-dynamic-infos
}
}

Collection MongoDB

Les alarmes sont stockées dans la collection periodical_alarm du MongoDB de Canopsis.

Elles ne sont pas purgées automatiquement.

Une procédure existe pour procéder manuellement à leur nettoyage.


Dernière mise à jour: 2020-01-20