It is often times necessary to generate reports on historical data, which can be equally as important as reporting on real time data. Histories in the station may be configured to record information at specified intervals, a change of value or state, or only when certain other conditions exist. There are also standard logs in the station like the audit log and log history which record operator actions and system errors.
If a tenant has access to override set points or scheduled periods of operation, then it may be a requirement to document these actions. The standard audit log can be used to track the actions, or additional histories could be configured to track the actions as well.
The audit log can be searched for records where a specific set point or component has been overridden. The audit log record displays the timestamp, operation (added, removed, invoked, changed, etc), target (path to component), slot name, old value (occupied, unoccupied, 78 deg F, etc), value (the new value), and the user who performed the operation.
The bql query builder (see Figure 13) can be used to create the query or you can simply type the syntax below.
history:/demo/AuditHistory│bql:select *
This basic query returns a list of every record in the audit log and every available data column. Since the objective is to only display records relating to an overridden point, the query can be modified as below (see Figure 14) to limit the return based on the operation
history:/demo/AuditHistory│bql:select * where operation like 'Invoked'
The modified query only returns records where the operation is 'invoked'; however, the return is for every component in the station. The query can be further modified as below to limit the return based on the (target) component. (see Figure 15)
history:/demo/AuditHistory│bql:select * where operation like 'Invoked' and target like '/Schedule/Suite100AfterHours'
Configuring the Displayed Columns
The return could be cleaned up by further modifying the query as below (see Figure 16) to limit the displayed columns.
history:/demo/AuditHistory│bql:select timestamp as 'Timestamp',value as 'Override Value',userName as 'User Name' where operation like 'Invoked' and target like '/Schedule/Suite100AfterHours'
The return is now limited to actions which have been invoked on a specific component in the station by any operator. It may be necessary to further filter the results to a single operator or a specific action. The bql query can be modified as below (see Figure 17) to limit the return to the specific operation of operator override to the active state.
history:/demo/AuditHistory│bql:select timestamp as 'Timestamp',value as 'Override Value',userName as 'User Name' where operation like 'Invoked' and target like '/Schedule/Suite100AfterHours' and slotName like 'active'
The bql query now produces a fairly presentable table which displays the timestamp, value and operator for each record. The return contains records from any time period in the audit log. Depending on how many records are maintained in the audit log, this could be a fairly large list. It is likely that the query will need to be modified as below to limit the return based on desired date ranges.
history:/demo/AuditHistory?period=lastMonth│bql:select timestamp as 'Timestamp',value as 'Override Value',userName as 'User Name' where operation like 'Invoked' and target like '/Schedule/Suite100AfterHours'
The bql query builder does not support the '?period=' syntax, although it is a valid query. It is necessary to delete this
syntax from the query prior to opening the bql query builder.
Copyright © 2000-2014 Tridium Inc. All rights reserved.