Netdata Community

How to find the logs of my Netdata Agent

To find the logs of your Netdata Agent, follow our documentation. To show them in the terminal for deugging purposes use: less /var/log/netdata/error.log.

When searching for a specific keyword, you can use grep to only output the lines that have that keyword, like grep <keyword> /var/log/netdata/error.log.

1 Like

To complement this awesome tip, I will also suggest users to use the option -w to get a more specific information, for example,

bash-5.1$ grep alert /var/log/netdata/error.log 
2021-03-10 14:15:21: go.d ERROR: prometheus[alertmanager_github_webhook_receiver_local] Get "http://127.0.0.1:9393/metrics": dial tcp 127.0.0.1:9393: connect: connection refused
2021-03-10 14:15:21: go.d ERROR: prometheus[alertmanager_github_webhook_receiver_local] check failed
2021-03-10 14:15:21: go.d ERROR: prometheus[alertsnitch_local] Get "http://127.0.0.1:9567/metrics": dial tcp 127.0.0.1:9567: connect: connection refused
2021-03-10 14:15:21: go.d ERROR: prometheus[alertsnitch_local] check failed
2021-03-10 14:15:22: go.d ERROR: prometheus[github_vulnerability_alerts_exporter_local] Get "http://127.0.0.1:9597/metrics": dial tcp 127.0.0.1:9597: connect: connection refused
2021-03-10 14:15:22: go.d ERROR: prometheus[github_vulnerability_alerts_exporter_local] check failed
2021-03-10 14:15:22: go.d ERROR: prometheus[alertmanager_silences_exporter_local] Get "http://127.0.0.1:9666/metrics": dial tcp 127.0.0.1:9666: connect: connection refused
2021-03-10 14:15:22: go.d ERROR: prometheus[alertmanager_silences_exporter_local] check failed
2021-03-10 14:15:22: go.d ERROR: prometheus[phabricator_webhook_for_alertmanager_local] Get "http://127.0.0.1:8292/metrics": dial tcp 127.0.0.1:8292: connect: connection refused
2021-03-10 14:15:22: go.d ERROR: prometheus[phabricator_webhook_for_alertmanager_local] check failed
2021-03-10 14:15:22: go.d ERROR: prometheus[telegram_bot_for_alertmanager_local] Get "http://127.0.0.1:9087/metrics": dial tcp 127.0.0.1:9087: connect: connection refused
2021-03-10 14:15:22: go.d ERROR: prometheus[telegram_bot_for_alertmanager_local] check failed
2021-03-10 14:15:22: go.d ERROR: prometheus[jiralert_local] Get "http://127.0.0.1:9097/metrics": dial tcp 127.0.0.1:9097: connect: connection refused
2021-03-10 14:15:22: go.d ERROR: prometheus[jiralert_local] check failed
bash-5.1$ grep -w alert /var/log/netdata/error.log 
bash-5.1$ 

As it is possible to see on this example, thanks the fact I did not have any message with alert word, the others were ignored. This is useful to look for plugin information.