Frage

I want to understand what are prominent use case to add a SNMP support to a database server. I understand that one can send a SNMP trap but how does one use this .

War es hilfreich?

Lösung

There are many open-source and commercial products for monitoring live statistics on servers. These include Nagios, Cacti, Cricket, MRTG (open-source); and HP OpenView (commercial).

Enabling SNMP support on a server makes it listen for SNMP queries (just as a web server listens for HTTP queries). The SNMP agent on your server will respond to client queries with the values particular keys have.

You can think an SNMP agent as a key-value store. Except that, unlike memcached, the keys are long unique strings of numbers, and the values are computed on each request.

If you add SNMP support to a Linux server you will probably get interface statistics out of the box. In other words - you could point a common open-source product at your server and it will start graphing how many bytes are going in and out of your server over time.

If you have a common type of database there are probably SNMP agents to expose various statistics about the DB usage and corresponding templates for graphing them.

SNMP statistics are most commonly polled once every 5 minutes and a "rate" is derived by subtracting one value from another and dividing over time (like calculating speed given two distances and the time taken to travel them).

Traps

I advise against traps for the beginner. Traps are the opposite of standard SNMP queries - which are initiated by a client to your server. Traps are initiated by the server and sent to a pre-configured destination, or trap-receiver. It is advanced, unreliable (because SNMP is carried over UDP and traps can be lost), and best to be avoided unless you absolutely need them.

Andere Tipps

There are two things SNMP can do. One is answer questions how much disk space is left? or how much load is the cpu under? - this is known as an snmp get. A monitoring or graphing box will ask these questions, or you can ask them by hand. The other type is an snmp trap - this is where your database server sends an outgoing message to a pre-arranged server - these are usually problems - help! I'm out of diskspace! or help! my harddrive has just failed!, or even someone just logged in as root

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top