Monitoring
Logs
FMD Server writes logs to stderr and to syslog.
To view the messages in syslog:
journalctl -t fmd-server
journalctl -q _SYSTEMD_UNIT=fmd-server.service
less /var/log/syslog | grep fmd-server
Metrics
FMD Server exposes metrics that can be scraped by Prometheus. There is also a Grafana template.
By default, metrics are exposed on http://[::1]:9100/metrics.
Using localhost is intentional, for security reasons.
Note that the metrics address/port is independent of the main server address/port. FMD Server can serve both independently of each other, including on separate addresses and ports.
You can change the metrics endpoint to a different address and port using
the MetricsAddrPort field in the config.yml.
For example, when running in a container you want to listen on a specific IP address
or on all interfaces inside the container.
Metrics default to IPv6
If you get errors such as:
FTL failed to serve with HTTP error="listen tcp [::1]:9100: bind: cannot assign requested address”
then your host likely has IPv6 disabled. To fix this, you can change the metrics address to IPv4 localhost:
MetricsAddrPort: "127.0.0.1:9100"