Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Edit: I am in the process of designing a Java-based monitoring tool that will send back periodic "health checks" of a Java app deployed to a cluster of GlassFish servers. I am trying to figure out the best protocol for this monitoring tool to send information back to the monitoring server on.

After an initial research effort on my part, it seems like SNMP is just a protocol for monitor-type applications to communicate the "health status" of something (a part of a network, a server, a cluster, an application, etc.) to the rest of the network.

  • If the above is incorrect, please correct me!!!

Assuming the generalization is more or less accurate, my next question is: why is this a protocol!?!?

In the age of REST/SOAP/TCP protocols, why is there the need for a standardized protocol that only fits one type of application (monitoring)? In other words, if I'm a developer assigned to building a new monitoring tool that periodically polls a server and reports on its CPU and available memory, what advantages does SNMP give me over just POSTing to a RESTful API via plain 'ole HTTP?

I'm sure I'm missing something here - I just need someone to help connect the dots! Thanks in advance!

share|improve this question

closed as off topic by techie007, Nifle, random May 5 '12 at 2:33

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I see this has already receives a closevote. I come to superuser.com to learn, and have no problem with criticism, so long as it is reasonable! I would like to ask why this was closevoted!?! –  pnongrata Apr 7 '12 at 2:57
1  
I see that the closevote reason was "not a real question". I humbly diagree!! To sum this question up in 1 sentence: "What are the benefits in this day and age of using SNMP over a REST- or SOAP-based solution?" I believe that is absolutely a real question! –  pnongrata Apr 7 '12 at 3:00
    
What's the solvable computer problem you're having? –  techie007 Apr 7 '12 at 3:03
    
@techie007 - please understand that this response is not a challenge to what you just wrote, it is merely an attempt to gain clarity as to where I should post questions like this in the future. Is "solvable computer problem" really the definitive criteria for a SuperUser question? Because, that's pretty vague, and would include StackOverflow, ServerFault, and most other tech-centric StackExchange sites. If it is, then I say this is a solvable problem: I want to when and where I should use SNMP. If it is not the criteria, then what is/are? That answer will determine where this belongs! –  pnongrata Apr 7 '12 at 3:07
1  
Even after your edit, your still asking for 'the best' protocol to use, which is generally only answerable with opinion. –  techie007 Apr 7 '12 at 3:15
show 4 more comments

3 Answers

up vote 3 down vote accepted

the need for a standardized protocol... Cause it's standardised? It also predates HTTP (1988 vs 1991). REST would have been with HTTP 1.0, 1996. Once something is in use, it's often easier to stick with it, if only for legacy support.

In response to your edit: Do you want/need other, pre-existing tools to be able to communicate with your application? If not, you can use whatever method you feel like, but you will need to use your own monitoring tools. If yes, you'll need to use something that is already commonly supported, such as SNMP.

share|improve this answer
    
So in your mind it doesn't give me any benefits over a REST- or SOAP-based solution? –  pnongrata Apr 7 '12 at 2:58
    
@AdamTannon SNMP is more established, and has considerably less overhead to set up than anything involving HTTP. –  techie007 Apr 7 '12 at 3:05
    
Again, not arguing here, just trying to understand. With frameworks like Jersey and my own homegrown libraries, and can get a RESTful web service up and running with 30 lines of code. Can you clarify what you mean by "overhead"? –  pnongrata Apr 7 '12 at 3:08
    
@Bob - as the only answer-er I'd be happy to give you the "green check" if can you cite specific advantages that SNMP has over more modern (REST/SOAP/etc.) approaches. –  pnongrata Apr 7 '12 at 11:12
1  
@AdamTannon It's probably better that you wait for someone else to answer. I'm not familiar enough with SNMP, nor other approaches. All I can say is SNMP has been in use for a longer time, and it's standard enough you can find a generic SNMP logger and expect it to work. –  Bob Apr 7 '12 at 11:21
show 1 more comment
RESTful API via plain 'ole HTTP

This has the following dependencies:

  • an HTTP server
  • a backend process invoked by that server that maintains state
  • enough memory, bandwidth, and storage resources to handle all possible concurrent connection attempts on top of what the device is supposed to be doing (we're assuming you want your device to do other things than respond to status requests)
  • and the subdependencies of all frameworks needed to implement the above, if frameworks are used (i.e. if your backend process is written in Perl, then that's more resources needed, etc.)

The above is trivial these days (and many devices, etc. have HTTP servers built in these days), but when SNMP was developed it wasn't.

SNMP is a lot simpler and can be handled easier by low-resource embedded devices (think older switches, etc.), and the software that responds to SNMP requests can be written easier with less chance of security vulnerabilities.

share|improve this answer
add comment

Far from being an expert on this, I would suggest the following:

SNMP has one fixed Management Information Base containing hierarchies of classes of information (e.g. actual bandwidth of the interfaces). As such you can easily add nodes to the network you are monitoring, without a lot of configuring.

Even more there are some machines where you might have no access to. (Either because of permissions or because they are simplistic routers.) In this case SNMP will be the easy way to get and set configuration parameters.

share|improve this answer
add comment

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