Hands-on task
Counters by log level
In /root/app.log lines start with a level: ERROR, WARN or INFO. Count how many lines of each level there are and write to /root/levels.prom the Prometheus metrics log_lines_total{level="error"} N, …{level="warn"} N, …{level="info"} N (level in lowercase).
- prometheus
- awk
- counting by level
- labels
- case conversion