log monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Mike
Posts: 76
Joined: Wed Apr 03, 2013 11:37 am

log monitoring

Post by Mike »

Hello ,

i have tried check_log3.pl but i am getting error :

This Nagios Plugin comes with absolutely NO WARRANTY. You may use




and also check_logfiles plugin and am getting error :

Return code of 127 is out of bounds - plugin may be missing)

But in in command line its working fine

Can you tell me where am i going wrong?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: log monitoring

Post by abrist »

Your plugin may not be in the right folder, or you service/command definitions may have the wrong paths. Can you post a copy of the command definition and the service check definition?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: log monitoring

Post by slansing »

Does the plugin have execute permissions?:

Code: Select all

chmod +x /path/to/plugin
Mike
Posts: 76
Joined: Wed Apr 03, 2013 11:37 am

Re: log monitoring

Post by Mike »

Hello,



command defined for check_log3 is
$USER$/check_log3 -l $HOSTNAME$ -l $ARG$ -s $ARG$ -p $ARG$ -w $ARG$ -c $ARG$

service definition
for $ARG$ /var/log/messages
for $ARG$/tmp/log/
for $ARG$"error"
for $ARG$ 1
for $ARG$ 2


command definition for check_logfiles is
$USER1$/check_logfiles -H localhost --logfile=$ARG1$ --criticalpattern=$ARG2$ --warningpattern=$ARG3$

service definition
for $ARG$ /var/log/messages
for $ARG$ error
for $ARG$ error
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: log monitoring

Post by slansing »

You are not using the "$USER1$" macro for pathing? You are using $USER$? I'd double check this, also, did you check what I asked?
$USER$/check_log3 -l $HOSTNAME$ -l $ARG$ -s $ARG$ -p $ARG$ -w $ARG$ -c $ARG$
Mike
Posts: 76
Joined: Wed Apr 03, 2013 11:37 am

Re: log monitoring

Post by Mike »

Oops!

i tried it again with $USER1$ but still i am getting the same error for check_log3.pl



what about the check_logfiles plugin .where am i going wrong?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: log monitoring

Post by slansing »

Something must be defined wrong here:

Code: Select all

$USER1$/check_logfiles -H localhost --logfile=$ARG1$ --criticalpattern=$ARG2$ --warningpattern=$ARG3$
Otherwise the plugin should not spit out usage information, it's trying to tell you that you are missing a flag or definition somewhere, are you sure you followed it's guidelines and included everything required? Are you able to run the command from the command line to that plugin and does it work?
Locked