-
-
Save bragonznx/4da47f411d1ec974d2ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We are using latest collectd and the plugin SNMP but we are facing an issue. | |
When a network switch device is not responsing, a segfault event is raised and collectd daemon gets killed. | |
Through the use of { snmp_gets }, we get the following: | |
snmpwalk -v 2c -c comstrg swicth IF-MIB::ifInOctets | |
Timeout: No Response from switch | |
This same switch configured in collectd fires a timeout (as a collectd error and a segfault event) even though it is the only device configured in collectd configuration file. | |
Here is some stacktrace: | |
[2014-11-13 15:55:01] snmp plugin: host esomehost: snmp_sess_synch_response failed: Timeout | |
Nov 13 15:55:01 machine kernel: collectd[41452]: segfault at 18 ip 000000363b075fb3 sp 00007f4cb1602580 error 4 in libc-2.12.so[363b000000+18a000] | |
We're using : CentOS 6.6 | |
Collectd commit : ec0e109 | |
./configure --prefix=/usr/local/monitoring/snmp --disable-apple_sensors --disable-aquaero --disable-mic --disable-netapp --disable-nut --disable-lpar --disable-oracle --disable-pf --disable-onewire --disable-redis --disable-routeros --disable-tokyotyrant --disable-tape --disable-sigrok --disable-write_mongodb --disable-write_redis --disable-zfs_arc --disable-xmms --disable-rrdcached --disable-pinba --disable-modbus --disable-gmond --disable-libvirt --disable-java --disable-madwifi --disable-wireless --disable-olsrd --disable-teamspeak2 --enable-write_riemann --disable-amqp --enable-snmp --enable-write_graphite--disable-perl | |
Configurations : | |
############### | |
collectd.conf | |
############### | |
Hostname "SNMP" | |
#FQDNLookup true | |
BaseDir "/usr/local/monitoring/snmp/var/lib/collectd" | |
PIDFile "/usr/local/monitoring/snmp/var/run/collectd-snmp.pid" | |
PluginDir "/usr/local/monitoring/snmp/lib/collectd" | |
TypesDB "/usr/local/monitoring/snmp/share/collectd/types.db" | |
Interval 300 # 20 | |
readthreads 10 | |
writethreads 10 | |
#Timeout 2 # 5 | |
# Log file support | |
LoadPlugin "logfile" | |
<Plugin "logfile"> | |
LogLevel "debug" | |
File "/var/log/collectd-snmp.log" | |
Timestamp true | |
</Plugin> | |
# System logging | |
LoadPlugin "syslog" | |
<Plugin syslog> | |
LogLevel "info" | |
NotifyLevel "OKAY" | |
</Plugin> # END_OF_SYSLOG | |
LoadPlugin "write_graphite" | |
<Plugin write_graphite> | |
<Carbon> | |
Host "carbon2.somefqdn" | |
Port "2003" | |
Protocol "tcp" | |
Prefix "collectd." | |
AlwaysAppendDS false | |
SeparateInstances false | |
EscapeCharacter "_" | |
</Carbon> | |
</Plugin> | |
LoadPlugin "write_riemann" | |
<Plugin "write_riemann"> | |
<Node "kiss"> | |
Host "fqdn" | |
Port "5555" | |
Protocol UDP | |
StoreRates true | |
AlwaysAppendDS false | |
TTLFactor 2.0 | |
</Node> | |
Tag "riemann" | |
</Plugin> | |
<Include "/usr/local/monitoring/snmp/etc/collectd.d/"> | |
Filter "*.conf" | |
</Include> | |
########## | |
snmp.conf | |
########## | |
LoadPlugin snmp | |
<Plugin snmp> | |
<Data "uptime"> | |
Type "uptime" | |
Table false | |
Instance "" | |
Scale 0.01 | |
Values "DISMAN-EVENT-MIB::sysUpTimeInstance" | |
</Data> | |
<Data "memory_free"> | |
Type "memory_free" | |
Table true | |
Instance "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolName" | |
Values "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolFree" | |
</Data> | |
<Data "memory_used"> | |
Type "memory_used" | |
Table true | |
Instance "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolName" | |
Values "CISCO-MEMORY-POOL-MIB::ciscoMemoryPoolUsed" | |
</Data> | |
<Data "CPU_usage"> | |
Type "percent" | |
Table false | |
Instance "cpmCPUTotalMonIntervalValue" | |
Values "CISCO-PROCESS-MIB::cpmCPUTotalMonIntervalValue.1" | |
</Data> | |
<Data "std_traffic"> | |
Type "if_octets" | |
Table true | |
Instance "IF-MIB::ifDescr" | |
Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets" | |
</Data> | |
<Host "some.fqdn.net"> | |
Address "x.x.x.x" | |
Version 2 | |
Community "Readonlypassword" | |
Collect "memory_free" "memory_used" "std_traffic" "uptime" | |
# Interval 300 | |
</Host> | |
</Plugin> | |
###################################### | |
Thanks for your support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment