@@ -16,7 +16,7 @@ moduleName: Assign the name of the collector in the following schema: PLUGIN/COL
1616import React from 'react' ;
1717import CodeBlock from '@theme/CodeBlock' ;
1818
19- export default function CollectorConfiguration ( { configURL, moduleName } ) {
19+ export function CollectorConfiguration ( { configURL, moduleName } ) {
2020 return (
2121 < >
2222 < p >
@@ -59,3 +59,56 @@ export default function CollectorConfiguration({ configURL, moduleName }) {
5959 </ >
6060 ) ;
6161}
62+
63+ {
64+ /* This piece of code generates the configuration section of a collector
65+ Usage: This file needs to be imported in an MDX file like this:
66+
67+ import CollectorDebug from '@site/src/components/Collectors/_collector-debugging.jsx';
68+
69+ <CollectorDebug
70+ pluginName=""
71+ collectorName=""
72+ />
73+
74+ pluginName: Assign the plugin name, for example go.d.plugin
75+ collectorName: Assign the name of the collector, for example activemq
76+ */
77+ }
78+
79+ export function CollectorDebug ( { pluginName, collectorName } ) {
80+ return (
81+ < >
82+ < p >
83+ To troubleshoot issues with the < code > { collectorName } </ code > collector,
84+ run the < code > { pluginName } </ code > with the debug option enabled.
85+ </ p >
86+
87+ < ol >
88+ < li >
89+ Navigate to your plugins directory, usually at
90+ < code > /usr/libexec/netdata/plugins.d/</ code > . If that's not the case
91+ on your system, open < code > netdata.conf</ code > and look for the
92+ setting < code > plugins directory</ code > .{ ' ' }
93+ </ li >
94+ < li >
95+ In the plugins directory, switch to the < code > netdata</ code > user.
96+ < CodeBlock className = "bash" >
97+ cd /usr/libexec/netdata/plugins.d/ sudo -u netdata -s
98+ </ CodeBlock > { ' ' }
99+ </ li >
100+
101+ < li >
102+ Run the < code > { pluginName } </ code > in debug mode to identify issues:
103+ < CodeBlock className = "bash" >
104+ ./{ pluginName } -d -m { collectorName }
105+ </ CodeBlock >
106+ < p >
107+ The output should give you clues as to why the collector isn't
108+ working.
109+ </ p >
110+ </ li >
111+ </ ol >
112+ </ >
113+ ) ;
114+ }
0 commit comments