With Atatus Log Monitoring, you can monitor specific log files.
Setup & Configuration
This module is included with the Atatus Infra agent by default, please follow the below steps to enable.
Add the following lines in the file
/etc/atatus-infra-agent/atatus.yml
.copylogs_enabled: true
Copy the files example configuration file.
copycd /etc/atatus-infra-agent/conf.d/files.d/ sudo cp files.yml.template files.yml
Update the file
/etc/atatus-infra-agent/conf.d/files.d/files.yml
with below configurations.copy#Log section logs: # - type: (mandatory) type of log input source (file) # paths: (mandatory) Set paths if type is file # service: (mandatory) name of the service owning the log # source: (mandatory) attribute that defines which integration is sending the log # severity: (optional) status type of the log (info / error / warn). Default info - type: file paths: - /var/log/my-app/info-file*.log service: my_service source: my_source # Processing rules are the way to group multiple consecutive messages into single one. # Below processing rule will group messages which has one or many spaces at the beginning of a message. processing_rules: - type: 'multiline' pattern: '^[[:space:]]' negate: false group: 'after' - type: file paths: - /var/log/my-app/error-file.log service: my_service1 source: my_source1 severity: error processing_rules: - type: 'multiline' pattern: '^[[:space:]]' negate: false group: 'after'
Restart the atatus infrastructure agent.
copysudo service atatus-infra-agent restart