Audit log options

Hello,

I have configured my audit profile and everything works.

Now I want to add two things to my audit log;

I want te computer name added to the table. In the configuration settings at the advanced settings the host for the query is filled in “ACTOR_HOST” but it doesn’t show up when I link the audit profile to the table. How do I add the computer name to this table?

A second thing I wanted to do is add a timeline so users can filter to specific times themselves. When you link the audit profile you have to fill in when it has to log. Is there a possibility so users can enter specific times themselves?

Thanks in advance!

Okay I found how to add a date to the audit log by putting a “date range” object on the screen and linking the dates in the options of the audit log.

Now I only need to find out how to get the PC name in the columns if anyone could help me with that it would be great!

I generally use a DB query to get this info. It does not appear to be exposed in the built in function.

SELECT * FROM audit_events

You can filter on the ACTOR_HOST column in your query.

Just beware, HOSTNAME can be in-accurate depending on the network environment. Our company uses a lot of laptops and during roaming and DHCP there can be scenarios where hostname can be incorrect. I think Ignition does a better job than windows networking to report hostname, but I throw out the warning anyways. You don’t want to rely on the hostname to be 100% accurate.

Hello ryanjmclaughlin this works great. Except I need to manually be able to edit the dates. I have a “date range” on the screen with an SQL query I don’t think it’s possible to adjust the dates?

Easy! Check out the Dynamic Filters section on this page of the docs for a dynamic date example in SQL

https://docs.inductiveautomation.com:8443/display/DOC79/SQL+Query+Binding

1 Like

Thank you ryanjmclaughlin this worked!

2 posts were split to a new topic: Issues querying audit log