<div dir="ltr"><div>Hi,</div><div><br></div><div>I have gone through the document <a href="http://labs.consol.de/nagios/check_logfiles/index.html">labs.consol.de/nagios/check_logfiles/index.html</a>. I am running the below command</div><div><br></div><div>/usr/lib/nagios/plugins/check_logfiles --logfile=/opt/tomcat_gnip/logs/hashapi/gnipclienttest.log --criticalpattern "Error message received as stream result. Quitting connection"</div><div><br></div><div>OK - no errors or warnings|default_lines=0 default_warnings=0 default_criticals=0 default_unknowns=0</div><div><br></div><div>cat /opt/tomcat_gnip/logs/hashapi/gnipclienttest.log</div><div>[ERROR] 2016-11-24 04:02:49.176 [pool-4-thread-1] GnipClientLog - Error message received as stream result. Quitting connection.</div><div>[ERROR] 2016-12-01 00:54:18.541 [pool-4-thread-1] GnipClientLog - Error message received as stream result. Quitting connection.</div><div><br></div><div>I am not sure why the command returns OK inspite of having Error in the /opt/tomcat_gnip/logs/hashapi/gnipclienttest.log file</div><div><br></div><div>/usr/lib/nagios/plugins/check_logfiles --version</div><div>check_logfiles v3.7.6.3</div><div><br></div><div>/usr/lib/nagios/plugins/check_logfiles</div><div>Usage: check_logfiles [-t timeout] -f <configfile> [--searches=tag1,tag2,...]</div><div>check_logfiles [-t timeout] --logfile=<logfile> --tag=<tag> --rotation=<rotation></div><div>--criticalpattern=<regexp> --warningpattern=<regexp></div><div><br></div><div>/usr/lib/nagios/plugins/check_logfiles --help</div><div>This Nagios Plugin comes with absolutely NO WARRANTY. You may use</div><div>it on your own risk!</div><div>Copyright by ConSol Software GmbH, Gerhard Lausser.</div><div><br></div><div>This plugin looks for patterns in logfiles, even in those who were rotated</div><div>since the last run of this plugin.</div><div><br></div><div>You can find the complete documentation at</div><div><a href="http://labs.consol.de/nagios/check_logfiles/">labs.consol.de/nagios/check_logfiles/</a></div><div><br></div><div>Usage: check_logfiles [-t timeout] -f <configfile></div><div><br></div><div>The configfile looks like this:</div><div><br></div><div>$seekfilesdir = '/opt/nagios/var/tmp';</div><div># where the state information will be saved.</div><div><br></div><div>$protocolsdir = '/opt/nagios/var/tmp';</div><div># where protocols with found patterns will be stored.</div><div><br></div><div>$scriptpath = '/opt/nagios/var/tmp';</div><div># where scripts will be searched for.</div><div><br></div><div>$MACROS = { CL_DISK01 => "/dev/dsk/c0d1", CL_DISK02 => "/dev/dsk/c0d2" };</div><div><br></div><div>@searches = (</div><div>{</div><div>tag => 'temperature',</div><div>logfile => '/var/adm/syslog/syslog.log',</div><div>rotation => 'bmwhpux',</div><div>criticalpatterns => ['OVERTEMP_EMERG', 'Power supply failed'],</div><div>warningpatterns => ['OVERTEMP_CRIT', 'Corrected ECC Error'],</div><div>options => 'script,protocol,nocount',</div><div>script => 'sendnsca_cmd'</div><div>},</div><div>{</div><div>tag => 'scsi',</div><div>logfile => '/var/adm/messages',</div><div>rotation => 'solaris',</div><div>criticalpatterns => 'Sense Key: Not Ready',</div><div>criticalexceptions => 'Sense Key: Not Ready /dev/testdisk',</div><div>options => 'noprotocol'</div><div>},</div><div>{</div><div>tag => 'logins',</div><div>logfile => '/var/adm/messages',</div><div>rotation => 'solaris',</div><div>criticalpatterns => ['illegal key', 'read error.*$CL_DISK01$'],</div><div>criticalthreshold => 4</div><div>warningpatterns => ['read error.*$CL_DISK02$'],</div><div>}</div><div>);</div><div><br></div><div>I will appreciate if anyone can help me understand what is going wrong in my above command line. Please share me some working examples to understand more about the usage of check_logfiles nagios plugin.</div><div><br></div><div>Thanks in Advance.</div><div><br></div><div>Regards,</div><div><br></div><div>Kaushal</div></div>