Top 5 Log Monitoring Tools | List of Log Monitoring Tools | scmGalaxy

These days there are various kinds of tools used by professionals in Software industry. From CI tools to Virtualization, to Issues, bug tracking tools to various others tools, the lists goes on and on. Thus, it’s really a tough task for them to select best tools as per their needs. So, today I am going to help System Administrators and operations by providing them the lists of top log monitoring tools.
But before that lets see, what is log monitoring ?
Log monitoring is a process of monitoring and understanding the state of the system, server, network, security devices and different applications and how they are working. Actually when these servers and different applications runs, they generate log files and events like Errors, problems, and more information is constantly logged and saved for analysis as text or binary files in the system. System admin keep reviewing these log files on daily basis so they can understand the condition and functioning of systems and different applications. But reviewing all those log files on daily basis is not an easy task, to do this laborious task log monitor needs to be set on those logs which automatically
monitor, review, analyze and generate reports as per the instructions set by System Admin.
As you saw how helpful this is for system admin but to find a good tool for this process is not an easy task. So, without wasting any time let’s check out the top 5 monitoring tools.
1. Logstash
logstash
Features
  • Extended functionality via plugins.
  • Free and open source.
  • Filters are code.
  • Great integration with other Elastic products.

2. Fluentd
fluentd
Features
  • Handles up to 50,000 messages per second at peak time
  • Data filtering and alerting
  • Apache 2.0 License project
  • Simplify and scale data pipeline management with tags
  • More than 200 community-contributed plugins
  • Real-time monitoring and alerts system
  • Store data in multiple systems
  • Collect and correlate web server access logs and application error logs

 

3. Loggly

loggly
Features
  • Text-based logs from any source
  • Custom source groups
  • Point-and-click trending graphs
  • Automated filters and event parsing
  • Full-system RESTful API to integrate with other applications
  • Unlimited saved searches and users
  • Adaptable interface with multiple views, pages and workspaces
  • Unlimited custom dashboards based on any search
  • Built-in customizable alerts with triggers

4. Graylog2
graylog2
Features
  • Leverages Java, Scala and ElasticSearch technologies
  • Central syslog monitoring
  • Interactive API browser
  • Application debugging
  • Exception monitoring
  • API analytics
  • Intuitive search interface
  • Comprehensive dashboard

5. Splunk
splunk
Features
  • Works with Hadoop & NoSQL
  • Setup standard searches as real-time alerts
  • Trigger automatic responses
  • Scale from a single server to multiple data centers
  • Deployable to on premise sites, hybrid-cloud, and/or private and public cloud based infrastructures
  • Securely make data available
  • Supports various use cases including log consolidation/retention, security, compliance reporting, and more
  • Perform ad hoc queries
So, this is the list my top log monitoring tools, I hope you find this useful and if not than feel free to share your thoughts in comment section below.
Tagged : / / / / / / / / / / / / / / /

JUnit 4 Test Logging Tips using SLF4J

junit-4-test-logging-using-slf4j

When writing JUnit tests developers often add log statements that can help provide information on test failures. During the initial attempt to find a failure a simple System.out.println() statement is usually the first resort of most developers.

Replacing these System.out.println() statements with log statements is the first improvement on this technique. Using SLF4J (Simple Logging Facade for Java) provides some neat improvements using parameterized messages. Combining SLF4J with JUnit 4 rule implementations can provide more efficient test class logging techniques.

Some examples will help to illustrate how SLF4J and JUnit 4 rule implementation offers improved test logging techniques. As mentioned the inital solution by developers is to use System.out.println() statements. The simple example code below shows this method.

01    import org.junit.Test;
02
03    public class LoggingTest {
04
05      @Test
06      public void testA() {
07        System.out.println(“testA being run…”);
08      }
09
10      @Test
11      public void testB() {
12        System.out.println(“testB being run…”);
13      }
14    }

The obvious improvement here is to use logging statements rather than the System.out.println() statements. Using SLF4J enables us to do this simply whilst allowing the end user to plug in their desired logging framework at deployment time. Replacing the System.out.println() statements with SLF4J log statements directly results in the following code.
view source

01    import org.junit.Test;
02    import org.slf4j.Logger;
03    import org.slf4j.LoggerFactory;
04
05    public class LoggingTest {
06
07      final Logger logger =
08        LoggerFactory.getLogger(LoggingTest.class);
09
10      @Test
11      public void testA() {
12        logger.info(“testA being run…”);
13      }
14
15      @Test
16      public void testB() {
17        logger.info(“testB being run…”);
18      }
19    }

Looking at the code it feels that the hard coded method name in the log statements would be better obtained using the @Rule TestName JUnit 4 class. This Rule makes the test name available inside method blocks. Replacing the hard coded string value with the TestName rule implementation results in the following updated code.

01    import org.junit.Rule;
02    import org.junit.Test;
03    import org.junit.rules.TestName;
04    import org.slf4j.Logger;
05    import org.slf4j.LoggerFactory;
06
07    public class LoggingTest {
08
09      @Rule public TestName name = new TestName();
10
11      final Logger logger =
12        LoggerFactory.getLogger(LoggingTest.class);
13
14      @Test
15      public void testA() {
16        logger.info(name.getMethodName() + ” being run…”);
17      }
18
19      @Test
20      public void testB() {
21        logger.info(name.getMethodName() + ” being run…”);
22      }
23    }

SLF4J offers an improved method to the log statement in the example above which provides faster logging. Use of parameterized messages enable SLF4J to evaluate whether or not to log the message at all. The message parameters will only be resolved if the message will be logged. According to the SLF4J manual this can provide an improvement of a factor of at least 30, in case of a disabled logging statement.

Updating the code to use SLF4J parameterized messages results in the following code.

01    import org.junit.Rule;
02    import org.junit.Test;
03    import org.junit.rules.TestName;
04    import org.slf4j.Logger;
05    import org.slf4j.LoggerFactory;
06
07    public class LoggingTest {
08
09      @Rule public TestName name = new TestName();
10
11      final Logger logger =
12        LoggerFactory.getLogger(LoggingTest.class);
13
14      @Test
15      public void testA() {
16        logger.info(“{} being run…”, name.getMethodName());
17      }
18
19      @Test
20      public void testB() {
21        logger.info(“{} being run…”, name.getMethodName());  }
22      }
23    }

Quite clearly the logging statements in this code don’t conform to the DRY principle.

Another JUnit 4 Rule implementation enables us to correct this issue. Using the TestWatchman we are able to create an implementation that overrides the starting(FrameworkMethod method) to provide the same functionality whilst maintaining the DRY principle. The TestWatchman Rule also enables developers to override methods invoked when the test finishes, fails or succeeds.

Using the TestWatchman Rule results in the following code.

01    import org.junit.Rule;
02    import org.junit.Test;
03    import org.junit.rules.MethodRule;
04    import org.junit.rules.TestWatchman;
05    import org.junit.runners.model.FrameworkMethod;
06    import org.slf4j.Logger;
07    import org.slf4j.LoggerFactory;
08
09    public class LoggingTest {
10
11      @Rule public MethodRule watchman = new TestWatchman() {
12        public void starting(FrameworkMethod method) {
13          logger.info(“{} being run…”, method.getName());
14        }
15      };
16
17      final Logger logger =
18        LoggerFactory.getLogger(LoggingTest.class);
19
20      @Test
21      public void testA() {
22
23      }
24
25      @Test
26      public void testB() {
27
28      }
29    }

And there you have it. A nice test code logging technique using JUnit 4 rules taking advantage of SLF4J parameterized messages.

I would be interested to hear from anyone using this or similar techniques based on JUnit 4 rules and SLF4J.

Reference: http://www.catosplace.net/

Tagged : / / / / / / / / / / / / / / / / / /