Categories
plugin

log file monitoring the OEM way

Log file monitoring has been around for a years now with OEM but not many sites really use it to it’s full potential.

For those who know about it, it’s always been a great (and free) add on to complement a monitoring solution, particularly where heads-up notification is needed around component failure. It’s also pretty useful to monitor components lacking full plugin integration into OEM.

We recently had a customer ask about NGINX target monitoring, specifically of log files, through our NGINX plugin. Of course, if the agent is local to OEM, this is easy.

With any target type in OEM, log file monitoring can be enabled through the Log File Monitor metric against the ‘host’ target. It’s pretty simple – point to a log file, configure the string you want to alert on and how many line counts of this warrant an alert (eg > 0 in most cases).

A quick example:

we have a log file, /tmp/log.txt

if it contains the string ‘bad’ at least once, we’ll generate a critical alert:

An alert can then be simulated by echoing ‘bad’ to the log file.

After a while (we’re capturing the metric every minute in this example), we see an alert in OEM:

The alert can be wired to the OEM notification system through incident rules.

For example, email the DBAs or place an incident on a helpdesk queue.

This document (see section 28.5.4) details more on how you can configure log file monitoring.

It’s a pretty cool feature of OEM and works really well for monitoring of log files.


Subscribe to receive notification of updates to our blog posts…


AIDEV have the following plugins available and listed on the Oracle Extensibility Exchange:

  • mongoDB
  • SSL certificate
  • REDIS data store
  • HBASE
  • NGiNX

For more information on our OEM plugins or how we can create plugins for your applications, reach out to us.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s