Closed Famku closed 2 years ago
Hi, @Famku.
But units shows as "ports" with values that not make sense.
./go.d.plugin -d -m snmp
outputThis is my mirror wan port:
netdata@docker2:/usr/libexec/netdata/plugins.d$ ./go.d.plugin -d -m snmp
[ DEBUG ] main[main] main.go:111 plugin: name=go.d, version=v0.32.2
[ DEBUG ] main[main] main.go:113 current user: name=netdata, uid=114
[ INFO ] main[main] agent.go:106 instance is started
[ INFO ] main[main] setup.go:40 loading config file
[ INFO ] main[main] setup.go:48 looking for 'go.d.conf' in [/etc/netdata /usr/lib/netdata/conf.d]
[ INFO ] main[main] setup.go:55 found '/etc/netdata/go.d.conf
[ INFO ] main[main] setup.go:62 config successfully loaded
[ INFO ] main[main] agent.go:110 using config: enabled 'true', default_run 'true', max_procs '0'
[ INFO ] main[main] setup.go:67 loading modules
[ INFO ] main[main] setup.go:86 enabled/registered modules: 1/64
[ INFO ] main[main] setup.go:91 building discovery config
[ INFO ] main[main] setup.go:121 looking for 'snmp.conf' in [/etc/netdata/go.d /usr/lib/netdata/conf.d/go.d]
[ INFO ] main[main] setup.go:137 found '/etc/netdata/go.d/snmp.conf
[ INFO ] main[main] setup.go:142 dummy/read/watch paths: 0/1/0
[ INFO ] discovery[manager] manager.go:90 registered discoverers: [file discovery: [file reader]]
[ INFO ] discovery[manager] manager.go:95 instance is started
[ INFO ] run[manager] run.go:30 instance is started
[ INFO ] build[manager] build.go:106 instance is started
[ INFO ] discovery[file manager] discovery.go:71 instance is started
[ INFO ] discovery[file reader] read.go:39 instance is started
[ INFO ] discovery[file reader] read.go:40 instance is stopped
[ DEBUG ] build[manager] build.go:153 received config group ('/etc/netdata/go.d/snmp.conf'): 1 jobs (added: 1, removed: 0)
[ DEBUG ] build[manager] build.go:302 building snmp[switch] job, config: map[__provider__:file reader __source__:/etc/netdata/go.d/snmp.conf autodetection_retry:0 charts:[map[dimensions:[map[algorithm:incremental divisor:1024 multiplier:8 name:in offset:0 oid:1.3.6.1.2.1.2.2.1.10] map[divisor:1024 multiplier:-8 name:out offset:0 oid:1.3.6.1.2.1.2.2.1.16]] family:ports id:bandwidth_port multiply_range:[1 24] title:Switch Bandwidth for port titleoid":1.3.6.1.2.1.31.1.1.1.18 type:area units:kilobits/s]] community:public hostname:192.168.1.21 module:snmp name:switch options:map[timeout:20 version:2] priority:70000 update_every:5]
[ INFO ] snmp[switch] snmp.go:115 hostname=192.168.1.21,port=161,snmp_version=2c,community=public
[ DEBUG ] run[manager] run.go:41 tick 0
[ INFO ] snmp[switch] job.go:171 check success
[ INFO ] snmp[switch] job.go:191 started, data collection interval 5s
[ DEBUG ] run[manager] run.go:41 tick 1
[ DEBUG ] run[manager] run.go:41 tick 2
[ DEBUG ] run[manager] run.go:41 tick 3
[ DEBUG ] run[manager] run.go:41 tick 4
[ DEBUG ] run[manager] run.go:41 tick 5
CHART 'netdata.execution_time_of_snmp_switch' '' 'Execution time' 'ms' 'go.d' 'netdata.go_plugin_execution_time' '' '145000' '5' '' 'go.d' 'snmp'
DIMENSION 'time' '' '' '1' '1' ''
CHART 'snmp_switch.bandwidth_port_1' '' 'Switch Bandwidth for port 1' 'ports' 'ports' 'snmp.bandwidth_port' 'area' '70000' '5' '' 'go.d' 'snmp'
DIMENSION '1.3.6.1.2.1.2.2.1.10.1' 'in' 'incremental' '8' '1024' ''
DIMENSION '1.3.6.1.2.1.2.2.1.16.1' 'out' '' '-8' '1024' ''
BEGIN 'snmp_switch.bandwidth_port_1'
SET '1.3.6.1.2.1.2.2.1.10.1' = 99192786
SET '1.3.6.1.2.1.2.2.1.16.1' = 2051325991
END
CHART 'snmp_switch.bandwidth_port_2' '' 'Switch Bandwidth for port 2' 'ports' 'ports' 'snmp.bandwidth_port' 'area' '70001' '5' '' 'go.d' 'snmp'
DIMENSION '1.3.6.1.2.1.2.2.1.10.2' 'in' 'incremental' '8' '1024' ''
DIMENSION '1.3.6.1.2.1.2.2.1.16.2' 'out' '' '-8' '1024' ''
BEGIN 'snmp_switch.bandwidth_port_2'
SET '1.3.6.1.2.1.2.2.1.10.2' = 0
SET '1.3.6.1.2.1.2.2.1.16.2' = 0
END
Thanks for looking into it
This is the dashboard from my old config
@Famku you need to add algorithm: "incremental"
to - name: "out"
The units/ports problem is a bug, indeed.
@Famku
algorithm
for the 2nd dimension. Adding it will fix the issue. But we need to implement guessing based on OID value type (e.g. Counter64 - use incremental if not set).omg, I didn't see this, It works now.
Thank you very much!
Is it possible to change the name "ports" manually?
I will wait for the next release, thanks again
@Famku , did you happen to get titleoid working with the go.d version of snmp? I see it in your config-file, but it seems to me that's no longer working since I moved from node.d to go.d. Thank you!
Hi, @ghoekstra. The 'titleoid' feature didn't make it into the go version. Having instance-specific data in a chart title is a problem when aggregating on the Cloud (see relevant issue https://github.com/netdata/netdata/issues/12641). We need to think about what we can do.
This issue has been mentioned on the Netdata Community Forums. There might be relevant details there:
https://community.netdata.cloud/t/go-d-snmp-plugin-titleoid-support/3367/2
Bug description
Hi,
I try to change my snmp config for my Mikrotik switch to go.d.
My old config for node.d worked perfectly for years:
For go.d my config looks like this:
I checked this with ./go.d.plugin -d -m snmp and I can see all ports in the dashboard.
But units shows as "ports" with values that not make sense.
Can someone give me a hint what I doing wrong?
Expected behavior
go.d snmp work the same way as node.d snmp
Steps to reproduce
sudo ./edit-config go.d/snmp.conf
enter config template from https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/snmp)
change values
Installation method
kickstart.sh
System info
Netdata build info
Additional info
No response