master
md 143 lines 4.02 KB
Rendered Raw
1 [% if entry.integration_type == 'collector' %]
2 [% if entry.meta.plugin_name is in(['go.d.plugin', 'python.d.plugin', 'charts.d.plugin']) %]
3 ## Troubleshooting
4
5 ### Debug Mode
6
7 [% if entry.meta.plugin_name == 'go.d.plugin' %]
8 **Important**: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.
9 [% endif %]
10
11 To troubleshoot issues with the `[[ entry.meta.module_name ]]` collector, run the `[[ entry.meta.plugin_name ]]` with the debug option enabled. The output
12 should give you clues as to why the collector isn't working.
13
14 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on
15 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
16
17 ```bash
18 cd /usr/libexec/netdata/plugins.d/
19 ```
20
21 - Switch to the `netdata` user.
22
23 ```bash
24 sudo -u netdata -s
25 ```
26
27 [% if entry.meta.plugin_name == 'go.d.plugin' %]
28 - Run the `go.d.plugin` to debug the collector:
29
30 ```bash
31 ./go.d.plugin -d -m [[ entry.meta.module_name ]]
32 ```
33
34 To debug a specific job:
35
36 ```bash
37 ./go.d.plugin -d -m [[ entry.meta.module_name ]] -j jobName
38 ```
39
40 [% elif entry.meta.plugin_name == 'python.d.plugin' %]
41 - Run the `python.d.plugin` to debug the collector:
42
43 ```bash
44 ./python.d.plugin [[ entry.meta.module_name ]] debug trace
45 ```
46
47 [% elif entry.meta.plugin_name == 'charts.d.plugin' %]
48 - Run the `charts.d.plugin` to debug the collector:
49
50 ```bash
51 ./charts.d.plugin debug 1 [[ entry.meta.module_name ]]
52 ```
53
54 [% endif %]
55 ### Getting Logs
56
57 If you're encountering problems with the `[[ entry.meta.module_name ]]` collector, follow these steps to retrieve logs and identify potential issues:
58
59 - **Run the command** specific to your system (systemd, non-systemd, or Docker container).
60 - **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.
61
62 #### System with systemd
63
64 Use the following command to view logs generated since the last Netdata service restart:
65
66 ```bash
67 journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep [[ entry.meta.module_name ]]
68 ```
69
70 #### System without systemd
71
72 Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:
73
74 ```bash
75 grep [[ entry.meta.module_name ]] /var/log/netdata/collector.log
76 ```
77
78 **Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.
79
80 #### Docker Container
81
82 If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:
83
84 ```bash
85 docker logs netdata 2>&1 | grep [[ entry.meta.module_name ]]
86 ```
87
88 [% else %]
89 [% if entry.troubleshooting.problems.list %]
90 ## Troubleshooting
91
92 [% endif %]
93 [% endif %]
94 [% elif entry.integration_type == 'cloud_notification' %]
95 [% if entry.troubleshooting.problems.list %]
96 ## Troubleshooting
97
98 [% endif %]
99 [% elif entry.integration_type == 'agent_notification' %]
100 ## Troubleshooting
101
102 ### Test Notification
103
104 You can run the following command by hand, to test alerts configuration:
105
106 ```bash
107 # become user netdata
108 sudo su -s /bin/bash netdata
109
110 # enable debugging info on the console
111 export NETDATA_ALARM_NOTIFY_DEBUG=1
112
113 # send test alarms to sysadmin
114 /usr/libexec/netdata/plugins.d/alarm-notify.sh test
115
116 # send test alarms to any role
117 /usr/libexec/netdata/plugins.d/alarm-notify.sh test "ROLE"
118 ```
119
120 Note that this will test _all_ alert mechanisms for the selected role.
121
122 [% elif entry.integration_type == 'exporter' %]
123 [% if entry.troubleshooting.problems.list %]
124 ## Troubleshooting
125
126 [% endif %]
127 [% elif entry.integration_type == 'secretstore' %]
128 [% if entry.troubleshooting.problems.list %]
129 ## Troubleshooting
130
131 [% endif %]
132 [% elif entry.integration_type == 'service_discovery' %]
133 [% if entry.troubleshooting.problems.list %]
134 ## Troubleshooting
135
136 [% endif %]
137 [% endif %]
138 [% for item in entry.troubleshooting.problems.list %]
139 ### [[ item.name ]]
140
141 [[ item.description ]]
142
143 [% endfor %]