I have server daemons running on several machines. I decide to expose the internal stats of the server daemons for monitoring and statistic, using HTTP protocol.
So, what’s the simplest way to do this?
- The less 3rd-party jar dependencies, the better.
- The lighter the framework is, the better.
- The less complexity, the better.
If the stats are a small number of fairly basic statistics, and you aren’t wedded to the HTTP server concept, use JMX. I used it to instrument a daemon process and it was pretty simple. You can monitor remotely (on another computer) via an ugly, but serviceable UI.
Here’s a tutorial instrumenting a web server app Probably very close to what you want.
Here’s a StackOverflow link on remote monitoring