# Monitoring Get raw info -> present it in a useful way -> automatically act on that info based on rules # Metrics Raw data about the system such as real-time metrics (e.g. available memory, storage, current CPU usage), events (specific operations gathered from logs or other notifications) Software like Prometheus collects and stores metrics from hosts in a time series database. It also includes alerting functions via Alertmanager. Common hardware/OS metrics can be collected by [prometheus node exporter](https://github.com/prometheus/node_exporter). Servers can be monitored by installing the exporter and pointing the prometheus server to pull metrics from nodes. (see [prometheus](/sysadmin/prometheus) for more) ## Logs Logs are usually accesed via systemd's journald backend (binary log files) or traditionally via individual log files (for example debian nginx's /var/log/nginx/...) # Dashboards Present collected data for easier analysis by people. Dashboards can be written in software like Grafana to view data in a more useful manner. # Notifications Sending alerts via email is usually good enough. For more critical things, SMS or other solutions, when money can be spared. Notifications should be common to the groups affected by them. Share those through your ChatOps implementation. ## goaccess goaccess is a small C program that parses web server log files and produces TUI or HTML reports. Run it with `goaccess access.log -c` for a TUI or with `goaccess access.log -o report.html --log-format=COMBINED` for a static HTML report. See more at its website: https://goaccess.io/get-started A detailed tutorial from Arnaud's blog at https://arnaudr.io/2020/08/10/goaccess-14-a-detailed-tutorial/