Configure Nagios plugin " check_logfiles " for scanning log file

I was checking for a nagios plugin which could filter the specified log file which i had mentioned and notify me whenever a warning or error appeared in log. Finally i get in hand check_logfile created by Gerhard Lausser. Check_logfiles is used to scan the lines of a file for regular expressions.

Install the plugin on client system : 

$ wget https://labs.consol.de/assets/downloads/nagios/check_logfiles-3.8.0.2.tar.gz

$ tar xvzf check_logfiles-3.8.0.2.tar.gz

$ cd check_logfiles-3.8.0.2/

$ ./configure

$ make

$ make install

check_logfiles executable file will get installed on location "/usr/local/nagios/libexec"


Configure Check Pattern :

$ nano  /etc/nagios-plugins/config/check_log.cfg

@searches = (
  {
    tag => 'Error',
    logfile => '/var/logs/error.log',
    criticalpatterns => 'Error',
  }
);

Here i am filtering pattern "Error" from log file which i had mentioned in logfile parameter section


Configure nrpe.cfg in client system :

$ nano /etc/nagios/nrpe.cfg

  command[check_Ekam_Cloud]=/usr/local/nagios/libexec/check_logfiles --config /etc/nagios-plugins/config/check_log.cfg


Integration in Nagios server :

define service {
  use                   local-service
  host_name             hostdetails
  max_check_attempts    1
  is_volatile           1
  service_description   check_logfiles
  check_command         check_logfiles
}



Reference : https://labs.consol.de/nagios/check_logfiles/index.html

Comments

  1. If you are looking for a job oriented practical based workday course syllabus curriculum at Workday training institutes in India then you are arrived at the right place called Workday training institutes in ameerpet because this institute is quite popular for this wonderful course not just in Workday training institutes in Jaipur and also proving job assistance for Workday training institutes in Pune

    ReplyDelete
  2. IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Projects for CSE It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai


    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

    ReplyDelete

Post a comment

Popular posts from this blog

Datastax Error : Cannot start node if snitch's data center (dc1) differs from previous data center (dc2)

Datastax Error : Cassandra - Saved cluster name Test Cluster != configured name

Popular posts from this blog

Datastax Error : Cannot start node if snitch's data center (dc1) differs from previous data center (dc2)

Datastax Error : Cassandra - Saved cluster name Test Cluster != configured name