Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a dozen server applications installed on my customers intranets (they can send http requests over the internet but cannot be called from outside). They're written in various technologies, mainly java and Go.

I want them to regularly push information about their state towards a central server which is visible on internet. Some of this information is generic (is it ON ?), some is specific (size of a cache in an application for example). The main goal is to be able to make a small web page on which I could instantly check the state of every servers. And maybe later add some kind of notification in case of problem.

Obviously I can do this by writing a few dozen lines of code each side (or a little more if I put this data in a database) but in order to ease future evolution, it could be interesting to use some existing norms or libraries.

So, what are the current opensource free and light solutions to do this, preferably with no central configuration when I add a server ? I'd prefer a norm over a library.

share|improve this question
1  
The goto free tool for this task is Nagios, it requires centralised configuration though but it is impressive. See nagios.org –  Rob May 14 '12 at 13:20
1  
ask on ServerFault for nagios. –  gbjbaanb May 14 '12 at 13:31
    
Maybe I'm wrong but nagios really seems overkill for what I need. And I didn't see if I can really implement this inversion of control (only the monitored servers having the knowledge of the central server). –  dystroy May 14 '12 at 13:34
    
nope, nagios is a perfect fit for your needs - you can build server monitoring pages that also show whether the unresponsive app is due to the app itself, or the CPU running at 100%. That re-use is worth all the time it takes to figure out how to send data to nagios itself (which, BTW, is really easy) –  gbjbaanb Jun 27 '12 at 22:28
add comment

closed as off topic by gbjbaanb, Steve Evers, MainMa, Walter, ChrisF Jul 11 '12 at 12:53

Questions on Programmers Stack Exchange are expected to relate to software development 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.

2 Answers

The traditional monitoring setup is the correct solution- it's a bit awkward if the monitor does not know what's being monitored- how does it know if someone is not reporting correctly? You could say, if I receive a message from source X, then if I don't receive another message within t seconds I'll raise an alert, but IMHO that's a bit ugly.

If you want to insist on that approach, you'll probably have to do lots of custom development, which will likely offset the cost of installing an off-the-shelf monitoring solution.

As for how to implement the monitors, the supposedly standard Java-ish solution is JMX; it basically implements a small in-process server which exposes monitors in a standardized way- it comes with a few monitors already implemented and configured (detailed memory usage and GC diagnosing, etc.), and you can easily write new monitors which expose application-specific data. Some Java software also comes with JMX monitors built-in (IIRC, Tomcat will expose its threadpool status, for instance). I'm only familiar with jConsole, which is really more of a desktop application to snoop on a JMX-enabled app in realtime, but I'm sure monitoring solutions exist.

share|improve this answer
add comment

Nagios for the win!

  • Extensible
  • Dozens of protocols
  • Alert systems via electronic or mobile communications
  • Scripting with X language of choice

Not much you cannot do with it. It might be a bit long to set up, but it's so versatile you can bet you'll manage to do what you want with it, and once it's set up and you've found your way around it it's awesome (it does take a bit of time to get used to it at first: it's not magic in any way, it takes a lot of work if you need bespoke stuff, but it does the job).

share|improve this answer
add comment

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