Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way of adding SNMP support to your own application on Debian

I am working on Debian and I have this server we want to monitor.
The application is ours and there are around a hundred real-time counters we want to export for monitoring purposes, graphs and alarms.

I've been looking at the Debian way of doing this because we do use Debian packaging to install the app, and Debian uses snmpd daemon, based on net-snmp, to export SNMP. So far every approach I've seen looks very complicated, from recompiling snmpd to load a dynamic library into it, and compiling a form of subagent that replicates what snmpd does.

While all of those options make me think I should go for something else than SNMP I don't want to give up that early and I was wondering if anybody has found a feasible implementation.

Ideally it should be coded in C or C++ as the app is in C++, but I'm open to wrappers or other kind of suggestions.

like image 262
Arkaitz Jimenez Avatar asked Dec 14 '10 21:12

Arkaitz Jimenez


People also ask

Does Linux support SNMP?

The most common SNMP configuration on Linux/UNIX is by using the net-snmp package maintained by http://www.net-snmp.org/ (aka "the nice BSD folks"). Installing and configuring net-snmp varies slightly depending on the specific Linux/UNIX distribution you are working with.

What is the difference between SNMP and snmpd?

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.


1 Answers

net-snmp supports both the smux and agentx agent extension protocols, allowing sub-agents to live in different processes. They also have a tutorial on writing AgentX subagents in C.

like image 101
Martin v. Löwis Avatar answered Oct 24 '22 22:10

Martin v. Löwis