Netdata Community

SNMP device monitoring

Hi
I followed the SNMP device monitoring document and created a /etc/netdata/node.d/snmp.conf file.

{
	"enable_autodetect": false,
	"update_every": 10,
	"max_request_size": 100,
	"servers":[
		{
			"hostname": "x.x.x.x",
			"community": "public",
			"update_every": 10,
			"max_request_size": 50,
			"options": {
				"timeout": 10000
			},
			"charts": {
				"snmp_router_bandwith_gateway": {
					"title": "60B Router Bandwidth for Gateway",
					"units": "kilobits/s",
					"type": "area",
					"priority": 1,
					"family": "ports",
					"dimensions": {
						"in": {
							"oid": "1.3.6.1.2.1.31.1.1.1.6.1",
							"algorithm": "incremental",
							"multiplier": 8,
							"divisor": 1024,
							"offset": 0
						}
					}
				}
			}
		}
	]
}

I then test with and it seems to work:

/usr/libexec/netdata/plugins.d/node.d.plugin 1 snmp
2021-01-15 13:57:08: node.d.plugin: ERROR: Cannot read user-configuration file /etc/netdata/node.d.conf: ENOENT: no such file or directory, open '/etc/netdata/node.d.conf'.
CHART "snmp_router_bandwith_gateway" "snmp_router_bandwith_gateway" "60B Router Bandwidth for Gateway" "kilobits/s" "ports" "" "area" 50001 10
DIMENSION "in" "in" "incremental" 8 1024 
BEGIN snmp_router_bandwith_gateway 
SET in = 0x178595fb1a
END

BEGIN snmp_router_bandwith_gateway 1688000
SET in = 0x1785960ac3
END

I also restarted the agent, but I do not see any new charts for SNMP in cloud.
Am I missing something?

Hi @Morne_Supra,

Can you please check the agent’s dashboard and verify that the charts are missing from that one as well?

Hi @OdysLam
Thanks for the quick reply. No, I do not see the chart:

This is interesting. Can you please share the error.log and grep for node.d?

Pinging @ilyam8 for good measure.

Log entries as requested:

2021-01-15 14:18:51: netdata INFO  : PLUGINSD[node.d] : thread created with task id 17169
2021-01-15 14:18:51: netdata INFO  : PLUGINSD[node.d] : set name of thread 17169 to PLUGINSD[node.d
2021-01-15 14:18:51: netdata INFO  : PLUGINSD[node.d] : connected to '/usr/libexec/netdata/plugins.d/node.d.plugin' running on pid 17182
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read user-configuration file /etc/netdata/node.d/stiebeleltron.conf: ENOENT: no such file or directory, open '/etc/netdata/node.d/stiebeleltron.conf'.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read stock-configuration file /usr/lib/netdata/conf.d/node.d/stiebeleltron.conf: ENOENT: no such file or directory, open '/usr/lib/netdata/conf.d/node.d/stiebeleltron.conf', using internal defaults.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read user-configuration file /etc/netdata/node.d/sma_webbox.conf: ENOENT: no such file or directory, open '/etc/netdata/node.d/sma_webbox.conf'.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read stock-configuration file /usr/lib/netdata/conf.d/node.d/sma_webbox.conf: ENOENT: no such file or directory, open '/usr/lib/netdata/conf.d/node.d/sma_webbox.conf', using internal defaults.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read user-configuration file /etc/netdata/node.d/named.conf: ENOENT: no such file or directory, open '/etc/netdata/node.d/named.conf'.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read stock-configuration file /usr/lib/netdata/conf.d/node.d/named.conf: ENOENT: no such file or directory, open '/usr/lib/netdata/conf.d/node.d/named.conf', using internal defaults.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read user-configuration file /etc/netdata/node.d/fronius.conf: ENOENT: no such file or directory, open '/etc/netdata/node.d/fronius.conf'.
2021-01-15 14:18:52: node.d.plugin: ERROR: Cannot read stock-configuration file /usr/lib/netdata/conf.d/node.d/fronius.conf: ENOENT: no such file or directory, open '/usr/lib/netdata/conf.d/node.d/fronius.conf', using internal defaults.
2021-01-15 14:18:52: node.d.plugin: ERROR: named: local: Failed to make request, message: connect ECONNREFUSED 127.0.0.1:8888
2021-01-15 14:18:52: netdata ERROR : PLUGINSD[node.d] : requested a CHART, without a type.id, on host 'test5.integrem.io'. Disabling it. (errno 9, Bad file descriptor)
2021-01-15 14:18:52: netdata INFO  : PLUGINSD[node.d] : PARSER ended
2021-01-15 14:18:52: netdata ERROR : PLUGINSD[node.d] : '/usr/libexec/netdata/plugins.d/node.d.plugin' (pid 17182) disconnected after 0 successful data collections (ENDs).
2021-01-15 14:18:52: netdata ERROR : PLUGINSD[node.d] : child pid 17182 killed by signal 15.
2021-01-15 14:18:52: netdata INFO  : PLUGINSD[node.d] : '/usr/libexec/netdata/plugins.d/node.d.plugin' (pid 17182) was killed with SIGTERM. Disabling it.
2021-01-15 14:18:52: netdata INFO  : PLUGINSD[node.d] : thread with task id 17169 finished

Looks like I am missing a chart type id.

Perhaps this means that the collector can’t access the machine in question? I haven never used SNMP myself, so I am brainstorming as much as you do :stuck_out_tongue:

:slight_smile:
Yeah, not sure what should be running on 127.0.0.1:8888

When doing a debug test, netdata does connect to my SNMP endpoint and it retrieves data, but when running it via the agent, it fails.

/usr/libexec/netdata/plugins.d/node.d.plugin 1 snmp
CHART "snmp_router_bandwith_gateway" "snmp_router_bandwith_gateway" "60B Router Bandwidth for Gateway" "kilobits/s" "ports" "" "area" 50001 10
DIMENSION "in" "in" "incremental" 8 1024 
BEGIN snmp_router_bandwith_gateway 
SET in = 0x17871f796f
END

BEGIN snmp_router_bandwith_gateway 5806000
SET in = 0x1787200814
END

BEGIN snmp_router_bandwith_gateway 9936000
SET in = 0x178720a364
END

BEGIN snmp_router_bandwith_gateway 10038000
SET in = 0x1787212a94
END

BEGIN snmp_router_bandwith_gateway 9933000
SET in = 0x1787215482
END

Hey,

Apparently, there are some issues with this collector as is quite outdated (and node.d deprecated).

A user mentions that they fixed it by putting nodejs in /usr/local/bin, so perhaps we can start from the location of the nodejs binary.

Hi @Morne_Supra

2021-01-15 14:18:52: netdata ERROR : PLUGINSD[node.d] : requested a CHART, without a type.id, on host ‘test5.integrem.io’. Disabling it. (errno 9, Bad file descriptor)

I believe changing snmp_router_bandwith_gateway to snmp_router.bandwith_gateway will fix the issue.

That type.id parameter must contains ..

Hi @ilyam8
Sorry for only replying now. New users may only reply 20 times on day one.

Thanks, your instructions worked. I had the typo where I used _ instead of .

1 Like