Reputation: 818
We need to monitor application stability. On of the part of this process is notifying operators (via xmpp, email, ...) about the potential issues in the business process.
That tools is more preferable for this kind of activity? Is it a good idea to use monitoring solutions like nagios or zabbix, or maybe some advanced java libraries exist for this?
Upvotes: 1
Views: 120
Reputation: 9162
Log4J is useful for monitoring events (Ex: something has crashed, takes too long to complete, etc)
If you need realtime monitoring you should use JMX beans. This technology is designed for monitoring the activity of the applications. With this technology you could notify when some threshold is breached. (queue is filled by 75%)
There are several tools to connect to JMX enabled systems and to monitor them.
Upvotes: 0
Reputation: 75426
As the program can discover issues itself, you could use the facilites available with a modern logging framework. You code against the slf4j API and use a logging backend configured to handle e.g. error messages special.
You then just have to have such a snippet in your code:
} catch (Exception e) {
log.error("FooBar processing failed", e);
}
This generic approach at compile time can then do one or more of the following at runtime:
or you can write your own code doing what you need to have done.
Upvotes: 1
Reputation: 68992
You could use log4j SMTPAppender to send eMails to operators for selected error-level log - entries that require analization of an issue.
For log based monitoring you might want to check Chainsaw
Upvotes: 0