Audit Trail Settings
The audit trail is defined as a tool to track changes within processes. The Cedalo MQTT Platform can be enabled to track any changes oder a set of defined changes to a target repository. To enable tracking, you need to define loggers by adding them to the audit trail.
App Log Level
// TODO arnd or tizian -> does it mean, that the operations equal or more important to this setting are logged platform wide?
Overview of existing loggers
The list of loggers are shown in the table below the App Log Level. Here you can see the type or target of the logger, which operation(s) the logger is recording and if the logger is active. You can also edit or remove the logger of a row. Below a sample list with two loggers. The type and log values are described below.
Adding a new logger
A new logger can be added by clicking on "Add Logger" at the top right of the page. Then the following dialog will open to enable you to set all options of a logger.
The following options need to be defined here:
Type
- console: the logger info will be output to your service console
- file: the logger info will be written to a file
- project: the logger info will be stored in memory and can be viewed in the project settings
- syslog: the logger will use a syslog target, that has to be specified by the options below
Options depend on the type
console
None.
file
- Log File Path: File and location of the file to output the audit trail infos
project
None.
syslog
- host: 'The host running syslogd, defaults to localhost.',
- port: "The port on the host that syslog is running on, defaults to syslogd's default port.",
- protocol: 'The network protocol to log over (e.g. tcp4, udp4, tls4, unix, unix-connect, etc), defaults to udp4.',
- protocolOptions: 'Socket connect options. See net.socket.connect for available options.',
- path: 'The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).',
- pid: 'PID of the process that log messages are coming from (Default process.pid).',
- facility: 'Syslog facility to use (Default: local0).',
- localhost: 'Host to indicate that log messages are coming from (Default: localhost).',
- type: "The type of the syslog protocol to use (Default: BSD, also valid: '3164', '5424', 'RFC3164' or 'RFC5424').",
- app_name: 'The name of the application (Default: process.title).',
- eol: 'The end of line character to be added to the end of the message (Default: Message without modifications).',
- secureProtocol: 'See //nodejs.org/api/tls.html#tlscreatesecurecontextoptions for more information on this option, passed through from this constructor.',
- ciphers: 'See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions for more information on this option, passed through from this constructor.',
- ecdhCurve: 'See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions for more information on this option, passed through from this constructor.',
- rejectUnauthorized: 'See //nodejs.org/api/tls.html#new-tlstlssocketsocket-options for more information on this option, passed through from this constructor.',
- requestCert: 'https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options for more information on this option, passed through from this constructor.',
Log Actions
There are four Log operations you can modify:
- create: log, if a new item is created
- read: log if an item is read from the repository
- update: log if an item is changed and saved to the repository
- delete: log if an item is deleted from the repository
Any of these operations can be activated for logging or deactivated by clicking the respective checkbox. The log level defines a property, how the action is categorized. This is to reflect the importance of an operation as you want to prioritize it. 'Debug' is defined as the lowest priority and emergency as the highest. The other according to their position in between.
Finally, one or more filters can be applied to an operation. There are the following settings applicable:
- Type: 'include' or 'exclude' an operation based on the filter
- Use On: This defines, where the filter is applied on. Here you can choose between the 'Request Path', the username or the email address.
- Value: This is the filter (RegEx-)expression that matched against the 'Use On' string.
You can and delete filters using the buttons right next to the filter.
View or track audit trail logs
The audit trail can be viewed depending on the logger type:
- console : observe your service console output
- file : open the file, you defined, when adding the logger
- project : navigate to project settings and then to audit trail
- syslog : open the syslog on the host, port regarding all option you defined, when creating the logger.