I am having difficulty understanding some of the terms used when talking about SNMP, and in particular who is responsible for the MIB -- the agent or management station.

Lets look a simple scenario:

  • I monitor my linux machine by known OID (like CPU utilization)
  • When I send an SNMP request for the CPU Utilization OID who handles the request - the agent or management station?
  • If all that done is to read the data from the MIB, what is the agent's role here?
  • The agent has synchronize API for get, but if i go directly to the storage why i have this get.

Can anyone help me to understand this simple CPU OID example, what happening there?


It's really simple, actually.

The SNMP agent is running on the machine you want to manage and can read (and possible set) data from the machine in an arbitrary way (read a /proc entry, communicate with a process via IPC, read from a file or whatever other method someone can come up with). It then represents this data according to one or more definition files, the MIB, in a well-structured way.

The management station (or SNMP client) can then communicate with the agent to read (or set) data from the agent according to this MIB.

Additionally, some agents (who are normally only acting when asked by the management station) can be configured to send messages to the management station when some condition is met to inform it about this. This is called an SNMP trap.

For the CPU example:

  • Agent is running on machine and can read system data.
  • Management station is polling agent for the CPU load OID.
  • Agent is looking up how to get the data for this OID, reads the data point (CPU load) and sent it back to the management station.
  • I thought MIB is a physical storage (like DB) that is on the linux machine and any program can write to it , so client only get there and take the value? so if i understand you correct there is no physical storage? – Avihai Marchiano Aug 26 '12 at 11:21
  • How should i expose my application that run on this machine to snmp GET ? I want to be able to also monitor my application by SNMP (i thought that its physical so i just need to write to the MIB tree and than i can query it by SNMP) – Avihai Marchiano Aug 26 '12 at 11:30
  • It's a kind of database, but it's only written to by the agent, which gets the data by polling the system in some way or via SNMP SET operations. The important part for you is the MIB definition file, which shows how the database is designed and how to get data out of it. – Sven Aug 26 '12 at 11:31
  • You need to write your own MIB with OIDs in the private enterprise range and then tell an SNMP agent (e.g. Net-SNMP on Linux) how to read the data for every OID defined. How it get's data from your program is entirely up to you. – Sven Aug 26 '12 at 11:33
  • Sorry (last one) lost you here, so i understand correct this is kind of DB , so if i can get directly to it i can bypass the agent, so it dosnt has any meaning. – Avihai Marchiano Aug 26 '12 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.