13.2 Managing Automatic Audit

After you enable automatic audit as described in 13.1 Automatic Audit Configuration, this feature runs continuously with the time interval(s) that you set for the property mz.audit.uptime.interval and/or the property mz.audit.throughput.interval. If you enable both properties, the messages are sent to two separate tables in the database that you create for the messages.

Uptime Messages

If you have enabled the property mz.audit.uptime.interval, for each time that the connection to the PostgreSQL database instance that you have specified is checked, a message is sent to the database. 

To be able to see the messages sent to the uptime table in the database, enter the following in the PostgreSQL shell:

SELECT * FROM <customer name>_uptime;


See the example below for how these messages are displayed:

Example - uptime table in the database populated with uptime messages

   pico   |       started         |      last_seen        | interval
----------+---------------------+---------------------+----------
 platform | 2018-04-09 12:49:41 | 2018-04-09 12:51:27 |        5
 platform | 2018-04-05 09:50:26 | 2018-04-05 09:51:58 |        3
 platform | 2018-04-09 13:37:41 | 2018-04-09 13:38:07 |        5
 platform | 2018-04-04 17:01:53 | 2018-04-04 17:03:27 |        3
 platform | 2018-04-09 15:04:44 | 2018-04-09 15:38:44 |        5

In the example, the pico column indicates the pico started; the started column indicates the date and time when the pico was started; the last_seen column indicates the last time the database was reached; the interval column indicates how often the connection to the PostgreSQL database is checked.

When the PostgreSQL database instance cannot be reached, no message is sent to the database, but the connection failure is logged in the Platform log.

Throughput Messages

If you have enabled the property mz.audit.throughput.interval, at each interval, the average throughput per second for the running workflows is written to the PostgreSQL database instance.

To be able to see the messages sent to the throughput table in the database, enter the following in the PostgreSQL shell:

SELECT * FROM <customer name>_throughput;

See the example below for how these messages are displayed:

Example - throughput table in the database populated with throughput messages

      workflow_id        |      logged_time      |  throughput        
----------+---------------------+---------------------+--------
 Default.test.workflow_1 | 2018-05-15 12:33:35 | 16521739     
 Default.test.workflow_1 | 2018-05-15 12:34:35 | 16536118     
 Default.test.workflow_1 | 2018-05-15 12:35:35 | 16524328      
 

In the example, the workflow_id column indicates the workflow that is running; the logged_time column indicates the last time the average throughput per second was calculated; the throughput column indicates the average throughput per second for the running workflow.

When the PostgreSQL database instance cannot be reached, no message is sent to the database, but the connection failure is logged in the Platform log.