@cryptotaxi247 / netdata-1 / commits / 74f8efd9a

docs: add Troubleshoot->Getting Logs section to collectors (#18005)

Ilya Mashchenko committed Jun 24, 2024 at 20:02 UTC 74f8efd9af3938ce00d673a04cdc0eee0ac629f8
1 file changed +33
integrations/templates/troubleshooting.md
+33
@@ -42,6 +42,39 @@ should give you clues as to why the collector isn't working.
42 ```
43
44 [% endif %]
45 +### Getting Logs
46 +
47 +If you're encountering problems with the `[[ entry.meta.module_name ]]` collector, follow these steps to retrieve logs and identify potential issues:
48 +
49 +- **Run the command** specific to your system (systemd, non-systemd, or Docker container).
50 +- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.
51 +
52 +#### System with systemd
53 +
54 +Use the following command to view logs generated since the last Netdata service restart:
55 +
56 +```bash
57 +journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep [[ entry.meta.module_name ]]
58 +```
59 +
60 +#### System without systemd
61 +
62 +Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
63 +
64 +```bash
65 +grep [[ entry.meta.module_name ]] /var/log/netdata/collector.log
66 +```
67 +
68 +**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
69 +
70 +#### Docker Container
71 +
72 +If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
73 +
74 +```bash
75 +docker logs netdata 2>&1 | grep [[ entry.meta.module_name ]]
76 +```
77 +
78 [% else %]
79 [% if entry.troubleshooting.problems.list %]
80 ## Troubleshooting