This is a simple script to inspect fluentd logs.
Node.js >= 10 is required
- Clone the repository
git clone https://github.com/gihan9a/fluentd-log-inspector.git
- Install dependencies
npm ci
- Run
npm run inspect -- --dir=<log directory>
Location of the .log
files directory. Should be absolute path.
Duplicate check mode. Default to first
.
Acceptable arguments,
first
Checks only the first line of log entry. Using this option reduces the final output. So it's easy to the go through the final inspection. Important If it's a stack trace, there can be other instances where this entry has occured. So it's recommendad to check withall
option.all
Checks whole log message to check duplicates. This gives more verbose output in final inspection.
/runtime
directory should be writable by node
After the inspection of log files a node server will be started at http://localhost:9999 OR the given port
- inspectr scans
.log
files in the directory. - It checks how many times an entry has repeated in given logs.
- It ignores following entries in log.
- If the entry is not in
yii.error
category. - 404 errors that have repeated only one time.
- Messages defined in the
/exclude.js
file.
- If the entry is not in