[collectd] snmp_agent DATA block is not being registered in master Agentx
Kalocsai Endre
kalocsai.endre at balasys.hu
Tue Jan 12 12:53:28 CET 2021
Hello,
I'm trying to use collectd with net-snmp.
I used the default configuration of snmp-agent, but apparently the
memory Data block is not registered in snmp master Agentx.
<Plugin snmp_agent>
<Data "memAvailReal">
Plugin "memory"
#PluginInstance "free"
Type "memory"
TypeInstance "free"
OIDs "1.3.6.1.4.1.2021.4.6.0"
</Data>
<Table "ifTable">
IndexOID "IF-MIB::ifIndex"
SizeOID "IF-MIB::ifNumber"
<Data "ifDescr">
<IndexKey>
Source "PluginInstance"
</IndexKey>
Plugin "interface"
OIDs "IF-MIB::ifDescr"
</Data>
<Data "ifOctets">
Plugin "interface"
Type "if_octets"
TypeInstance ""
OIDs "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
</Data>
</Table>
</Plugin>
In the debug logs I see the registration of ifTable, but not the
memAvailReal.
[2021-01-12 10:49:07] plugin_load: plugin "snmp_agent" successfully loaded.
[2021-01-12 10:49:07] snmp_agent: Table:
[2021-01-12 10:49:07] snmp_agent: Name: ifTable
[2021-01-12 10:49:07] snmp_agent: IndexOID: 1.3.6.1.2.1.2.2.1.1
[2021-01-12 10:49:07] snmp_agent: SizeOID: 1.3.6.1.2.1.2.1
[2021-01-12 10:49:07] snmp_agent: Column:
[2021-01-12 10:49:07] snmp_agent: Name: ifDescr
[2021-01-12 10:49:07] snmp_agent: Plugin: interface
[2021-01-12 10:49:07] snmp_agent: IndexKey:
[2021-01-12 10:49:07] snmp_agent: Source: PluginInstance
[2021-01-12 10:49:07] snmp_agent: Type: String
[2021-01-12 10:49:07] snmp_agent: OID[0]: 1.3.6.1.2.1.2.2.1.2
[2021-01-12 10:49:07] snmp_agent: Scale: 1
[2021-01-12 10:49:07] snmp_agent: Shift: 0
[2021-01-12 10:49:07] snmp_agent: Column:
[2021-01-12 10:49:07] snmp_agent: Name: ifOctets
[2021-01-12 10:49:07] snmp_agent: Plugin: interface
[2021-01-12 10:49:07] snmp_agent: Type: if_octets
[2021-01-12 10:49:07] snmp_agent: TypeInstance:
[2021-01-12 10:49:07] snmp_agent: OID[0]: 1.3.6.1.2.1.2.2.1.10
[2021-01-12 10:49:07] snmp_agent: OID[1]: 1.3.6.1.2.1.2.2.1.16
[2021-01-12 10:49:07] snmp_agent: Scale: 1
[2021-01-12 10:49:07] snmp_agent: Shift: 0
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.1.0)
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.1.1)
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.2.1)
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.10.1)
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.16.1)
[2021-01-12 10:49:07] snmp_agent: Data added to table ifTable with index 1
[2021-01-12 10:49:07] Notification: severity = OKAY, host =
monitoring-director, plugin = snmp_agent, message = Data added to table
ifTable with index 1
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.1.2)
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.2.2)
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.10.2)
[2021-01-12 10:49:07] snmp_agent: Registered handler for OID
(1.3.6.1.2.1.2.2.1.16.2)
[2021-01-12 10:49:07] snmp_agent: Data added to table ifTable with index 2
[2021-01-12 10:49:07] Notification: severity = OKAY, host =
monitoring-director, plugin = snmp_agent, message = Data added to table
ifTable with index 2
[2021-01-12 10:49:07] plugin_dispatch_notification: severity = 4;
message = Data added to table ifTable with index 2; time =
1610448547.244; host = monitoring-director;
[2021-01-12 10:49:07] Notification: severity = OKAY, host =
monitoring-director, plugin = snmp_agent, message = Data added to table
ifTable with index 2
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = interface;
plugin_instance = lo; type = if_errors; type_instance = ;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/interface-lo/if_errors to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/interface-lo/if_errors.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = interface;
plugin_instance = lo; type = if_dropped; type_instance = ;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/interface-lo/if_dropped to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/interface-lo/if_dropped.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = memory;
plugin_instance = ; type = memory; type_instance = used;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/memory/memory-used to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/memory/memory-used.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = memory;
plugin_instance = ; type = memory; type_instance = buffered;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/memory/memory-buffered to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/memory/memory-buffered.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = memory;
plugin_instance = ; type = memory; type_instance = cached;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/memory/memory-cached to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/memory/memory-cached.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = memory;
plugin_instance = ; type = memory; type_instance = free;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/memory/memory-free to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/memory/memory-free.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = memory;
plugin_instance = ; type = memory; type_instance = slab_unrecl;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/memory/memory-slab_unrecl to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/memory/memory-slab_unrecl.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] plugin_dispatch_values: time = 1610448547.243;
interval = 10.000; host = monitoring-director; plugin = memory;
plugin_instance = ; type = memory; type_instance = slab_recl;
[2021-01-12 10:49:07] uc_insert: Added
monitoring-director/memory/memory-slab_recl to the cache.
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via rrdtool.
[2021-01-12 10:49:07] rrdtool plugin: rrd_cache_insert: file =
/var/lib/collectd/rrd/monitoring-director/memory/memory-slab_recl.rrd;
values_num = 1; age = 0.000;
[2021-01-12 10:49:07] plugin: plugin_write: Writing values via snmp_agent.
[2021-01-12 10:49:07] snmp_agent: Thread is up and running
I tried to to run collectd only with the memory Data block, but it gives
the below error.
<Plugin snmp_agent>
<Data "memAvailReal">
Plugin "memory"
#PluginInstance "free"
Type "memory"
TypeInstance "free"
OIDs "1.3.6.1.4.1.2021.4.6.0"
</Data>
</Plugin>
[2021-01-12 10:40:22] plugin_load: plugin "snmp_agent" successfully loaded.
[2021-01-12 10:40:23] snmp_agent: snmp_agent_init: plugin not configured
[2021-01-12 10:40:23] Initialization of plugin `snmp_agent' failed with
status -22. Plugin will be unloaded.
[2021-01-12 10:40:23] plugin_unregister_read: No such read function:
snmp_agent
Is there something I do wrong?
Thank you!
Endre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x3D77D3C8817B5CE5.asc
Type: application/pgp-keys
Size: 663 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20210112/ef62238f/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20210112/ef62238f/attachment.sig>
More information about the collectd
mailing list