queryAuditLog (contextFilter) 8.1.37

Upgraded to 8.1.37 and my calls to system.util.queryAuditLog looks to have changed. I use the contextFilter = 0x01 and they do not appear to be filter the context. I get the same values with or without.

What version did you upgrade from? What kind of audit profile are you querying?

I went from 8.1.33 to 8.1.37. I think you may have fixed another "feature" that I was taking advantage of. When I wrote to a MQTT Engine tag, I would get an audit record from the user and another from the gateway. I think it previously contexted the gateway writes differently (null if I remember correctly). This way when I used the context filter = 0x01 it would only show the user write. I think I need to include a systemFilter = '%/project" if I want it to work similar as it was.


startDt = system.date.addDays(system.date.now(),-3)
endDt = system.date.now()
actor = ''
srcPath = '%Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint%'
#srcPath = system.tag.readBlocking([srcPath + ".path"])[0].value

print startDt, endDt, srcPath

ad = system.util.queryAuditLog(auditProfileName = 'Audit', startDate = startDt, endDate = endDt, targetFilter=srcPath, actorFilter=actor, contextFilter=0x01) # 20230620 added contextFilter (only shows user gateway writes)
ad = system.dataset.sort(ad,"Timestamp",False)

print ad
cols = ad.getColumnNames()
print cols
for a in range(ad.getRowCount()) :
	print [ ad.getValueAt(a, col) for col in cols ]

== output ==

Thu Feb 29 10:29:39 CST 2024 Sun Mar 03 10:29:39 CST 2024 %Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint%
Dataset [6R ⅹ 11C]
[Timestamp, Actor, Actor Host, Action, Action Target, Action Value, Result Code, Result, System, Context Code, Context]
[Sun Mar 03 07:09:45 CST 2024, u'aXXXXXX', u'scadaXXXXXXXX', u'tag write', u'[MQTT Engine]Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint', u'[0, Good, Sun Mar 03 07:09:45 CST 2024 (1709471385289)]', 0, u'AuditStatus[0x00000000, Severity=Good, Subcode=NotSpecified]', u'Ignition-SCADAXXXXXXXX', 1, u'Gateway']
[Sun Mar 03 07:09:45 CST 2024, u'aXXXXXX', u'XXX.XX.XXX.XXX', u'tag write', u'[MQTT Engine]Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint', u'0', 0, u'AuditStatus[0x00000000, Severity=Good, Subcode=NotSpecified]', u'sys:Ignition-SCADAXXXXXXXX:/project:DiscoverySCADA:/project:DiscoverySCADA', 1, u'Gateway']
[Fri Mar 01 14:40:27 CST 2024, u'aXXXXXX', u'scadaXXXXXXXX', u'tag write', u'[MQTT Engine]Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint', u'[800, Good, Fri Mar 01 14:40:27 CST 2024 (1709325627504)]', 0, u'AuditStatus[0x00000000, Severity=Good, Subcode=NotSpecified]', u'Ignition-SCADAXXXXXXXX', 1, u'Gateway']
[Fri Mar 01 14:40:27 CST 2024, u'aXXXXXX', u'XXX.XX.XXX.XXX', u'tag write', u'[MQTT Engine]Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint', u'800', 0, u'AuditStatus[0x00000000, Severity=Good, Subcode=NotSpecified]', u'sys:Ignition-SCADAXXXXXXXX:/project:DiscoverySCADA:/project:DiscoverySCADA', 1, u'Gateway']
[Fri Mar 01 14:02:49 CST 2024, u'aXXXXXX', u'scadaXXXXXXXX', u'tag write', u'[MQTT Engine]Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint', u'[850, Good, Fri Mar 01 14:02:49 CST 2024 (1709323369911)]', 0, u'AuditStatus[0x00000000, Severity=Good, Subcode=NotSpecified]', u'Ignition-SCADAXXXXXXXX', 1, u'Gateway']
[Fri Mar 01 14:02:49 CST 2024, u'aXXXXXX', u'XXX.XX.XXX.XXX', u'tag write', u'[MQTT Engine]Edge Nodes/HORIZONTAL/Highland Super Battery/Block A/Wells/Pad 1/Well 1/Gas Lift/Injection Flow Rate Setpoint', u'850', 0, u'AuditStatus[0x00000000, Severity=Good, Subcode=NotSpecified]', u'sys:Ignition-SCADAXXXXXXXX:/project:DiscoverySCADA:/project:DiscoverySCADA', 1, u'Gateway']
>>> ```