I am new to the SNMP protocol.
I try to configure SNMP-traps for Zabbix but I am confused what daemons I have to use. I need to install snmptrapd
, but somehow snmpd
is required for that:
sudo apt install snmptrapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
snmpd
The following NEW packages will be installed:
snmpd snmptrapd
0 upgraded, 2 newly installed, 0 to remove and 75 not upgraded.
What is the relationship between these 2 packages? Am I right that these 2 are daemons?
And what is inside the Ubuntu SNMP-package? What's the relationship between the snmp
and snmpd
packages?
A basic understanding of the SNMP protocol is really broader than what can be squeezed into this answer (and I'm probably not familiar enough to do a competent job) but in brief
snmp
contains tools to talk to SNMP "agents".snmpd
contains a server which you can install on a device to implement such an "agent". It listens for SNMP client connections and delivers responses to requests for status reports.snmptrapd
is a server for listening to and reacting to a particular kind of messages from agents.A device which supports SNMP can tell you when something happens via a trap message. It can also provide statistics about its operation which you can request when you need them.
So in an example scenario, you might install
snmpd
on a machine to report its disk usage, CPU, etc when you need these numbers, and in addition, perhaps configure it to generate a trap and send it to a central location when the disk utilization crosses a particular threshold. The central server connects periodically to collect statistics, and in addition, is prepared to receive a trap at any time.http://www.net-snmp.org contains a better and more comprehensive overview of the protocol and the components in this package.