AIX File Logs
AIX file logs are configured uniformly through [logs] and can collect system logs and middleware logs. Middleware inputs collect only metrics; log files are configured uniformly in [[logs.files]].
Configuration¶
File log collection is disabled by default:
[logs]
# Whether to enable file log collection.
enabled = false
# Scan interval.
interval = "10s"
# Maximum bytes read from each file per scan. 0 means unlimited.
max_bytes_per_file = 1048576
[[logs.files]]
# Whether to enable this log file collection.
enabled = false
path = "/var/adm/messages"
# source/service tags generated for log points.
source = "aix"
service = "system"
# Lines matching this regex are merged into the previous log entry.
multiline_pattern = "^\\s"
# false means starting from the end of the file on first startup.
from_beginning = false
# include keeps matching content; exclude drops matching content.
# include = "ERROR|WARN|Failed|failure"
# exclude = "last message repeated|Connection reset by peer"
Multiple [[logs.files]] blocks can be configured:
[[logs.files]]
enabled = true
path = "/home/db2inst1/sqllib/db2dump/db2diag.log"
# source/service tags generated for log points.
source = "db2"
service = "db2inst1"
# Lines matching this regex are merged into the previous log entry.
multiline_pattern = "^\\s"
# include keeps matching content; exclude drops matching content.
include = "ERROR|WARN|ADM"
exclude = "ADM7513W|DIA3603I"
from_beginning = false
Logs¶
File logs are reported to /v1/write/logging as log data.
log¶
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| source ( tag) |
Log source. |
| service ( tag) |
Service name. |
| filename ( tag) |
Log file path. |
| message | Log content. Type: string |
| truncated | Set to 1 when an overlong log line is truncated.Type: int | (gauge) |