Remediation Tool - viewLinc 5.1

Resolving Alarm Records without a Deactivation Timestamp in viewLinc ES 5.1 Technical Note

Product status
Document code
DOC261519-A
ft:locale
en-US
Product
viewLinc 5.1
Document type
Technical note

This tool applies to viewLinc 5.1.3 and later 5.1 Service Updates. Earlier versions and viewLinc 5.2.x are out of scope.

Identification

Tool name

fix_all_open_alarms.py

Type

Vaisala-supplied Python script, executed by the Python interpreter included with the viewLinc installation.

Distribution

Provided to the customer by Vaisala Technical Support as part of a documented support engagement. The script is not part of the viewLinc product installer and is removed from the customer system after use.

Applicable versions

viewLinc 5.1.3 and later 5.1 Service Updates.

Execution mode

Command-line, executed on the viewLinc server with viewLinc services stopped. The script needs to be deployed from the same folder that viewLinc was installed in (default: C:\Program Files\Vaisala\Vaisala viewLinc\python).

Function

The script finds historical alarm records in viewLinc 5.1 that contain an activation event but no matching deactivation event, then writes a synthetic deactivation event so the alarm no longer appears active.

For an operator-specified month (yyyy-mm), the script:
  1. Reads activation records from the historical database for the specified month.
  2. Reads deactivation records from the historical database from that month onward.
  3. Reads alarm ticket records from the active configuration database (viewLinc.sqlite).
  4. Identifies activations, by ticket identifier, with no matching deactivation in either the historical database or the active configuration database.
  5. For each such record, writes a deactivation event to the historical database with a timestamp set about 24 hours after the activation timestamp (specifically, 86,400.4 seconds later).

Two-stage execution

The script runs in two stages so the operator can review the records before any database changes are written.

Stage Behavior
Inspection (no write)
Command:
python.exe fix_all_open_alarms.py -st yyyy-mm
The script reports the alarm records it would modify. No data is written to the historical database in this stage.
Repair (write)
Command:
python.exe fix_all_open_alarms.py -st yyyy-mm -r
The script writes a synthetic deactivation record for each open activation identified in the inspection stage.
The repair stage requires an authorized operator to confirm two interactive prompts. The script cannot run unattended or as a scheduled task.

Characteristics of the inserted deactivation record

The deactivation record inserted by the tool is synthetic. It is created to close the alarm ticket in the historical database and is not based on a recorded operator action, sensor event, or device event. The following characteristics apply:
  • The deactivation timestamp is set to about 24 hours after the alarm's activation timestamp (specifically, 86,400.4 seconds later). It does not represent the actual time the alarming condition ended and should not be interpreted that way.
  • Only records that contain an activation event but no matching deactivation event are modified. Other historical records, including activation events, acknowledgement events, comments, and sensor measurement data, are not changed.
  • The tool only affects the historical database. It reads the active configuration database (viewLinc.sqlite) to exclude alarm tickets that are still active, but it does not modify that database.
  • Records inserted by the tool use the same format as deactivation events generated during normal system operation. The historical database has no separate field to distinguish a tool-inserted deactivation record from one generated normally.
Because the inserted deactivation timestamp uses a fixed offset of about 24 hours after activation rather than the actual end of the alarm, the historical database will not reflect the true duration of the affected alarms after the tool is run.