LOG BASED ALARM

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

LOG BASED ALARM

Post by ericssonvietnam »

Need to configure log bases alarm i am using the below Arguments :
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ARG1 : "-C /home/nagios/bin/check_logfiles -f /home/nagios/logfile_basedir/conf/Charging status.conf"
AEG2 : -t 30 -o StrictHostKeyChecking=no -l nagios -E
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Also attaching the screenshot of the log based monitoring logic.

Let me know what parameters require changes so that i can fulfill the requirement of the log based check Charging_status as stated in below points :

1. check inter should be 10 min where i need to check for setting.
2. It should be raised as major severity.
3. OK pattern stick value 30 what does -t in ARG2 stands for.

Also sharing my configuration file which i am using :
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[nagios@nagiosxi ~]$ cat Charging_status.conf
$seekfilesdir = '/home/nagios/logfile_basedir/tmp';
$protocolsdir = '/home/nagios/logfile_basedir/tmp';
$scriptpath = '/home/nagios/bin';
#$MACROS = { CL_DISK01 => "/dev/dsk/c0d1", CL_DISK02 => "/dev/dsk/c0d2" };

@searches = (
{
tag => 'Charging_status',
criticalpatterns => [ 'charging.connector.timeout.error', 'SCAPTxTimeoutException' ] ,
logfile => '/opt/mrbt/jboss/server/all/log/mrbt.log'
}
);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
You do not have the required permissions to view the files attached to this post.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: LOG BASED ALARM

Post by tacolover101 »

i would reccomend looking into Nagios log server for your checking of files like this. it simply makes more sense, and for what you're doing it would provide full historical audits in a much cleaner way.

as for your question at hand - your #1 will be set at the check_interval, #2 nagios sets it as critical in the 'criticalpatterns' section - that is also where you define your keyword to search for. (Charging_status.conf), #3 not sure what y ou're rferring to here - -t is generally timeout, in your case for seconds.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: LOG BASED ALARM

Post by tgriep »

Thanks@ tacolover101 for the help.
@ericssonvietnam , if you have any more questions, let us know.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ericssonvietnam
Posts: 239
Joined: Mon Jun 27, 2016 11:05 pm

Re: LOG BASED ALARM

Post by ericssonvietnam »

tgriep wrote:Thanks@ tacolover101 for the help.
@ericssonvietnam , if you have any more questions, let us know.
What is the purpose of below line in the log configuration file

options => 'sticky=1800,noprotocol,report=long,allyoucaneat',
kyang

Re: LOG BASED ALARM

Post by kyang »

After doing some searching I found this.

Code: Select all

sticky[=seconds] --> Controls whether an error is propagated through successive runs of check_logfiles. Once an error was found, the exitcode will be non-zero until an okpattern resets it or until the error expires after <second> seconds. Do not use this option until you know exactly what you do.

Code: Select all

noprotocol --> Normally all the matched lines are written into a protocol file with this file’s name appearing in the plugin’s output. This option switches this off.

Code: Select all

report=[short|long|html] --> This option turns on multiline output (Default: off). The setting html generates a table which display the last hits in the service details view.

Code: Select all

allyoucaneat--> With this option check_logfiles scans the entire logfile during the initial run (when no seekfile exists)
Those can be found here, along with more information about the parameters.

https://labs.consol.de/nagios/check_logfiles/

Does this help?
Locked