Page 2 of 2
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 11:38 am
by scottwilkerson
I installed this plugin and used the data you had displayed and it worked fine
You do need to know that the the plugin stores the position of the last scan in the seek file specified with the -s flag so it will only report new items found
For example, I ran the following
Code: Select all
./check_log3.pl -l '/tmp/logtest' -s alertlog.seek -p autobackup
WARNING: Found 4 lines (limit=1/0): Control autobackup written to DISK device
however when I ran it again I got the following because there were no new items
Code: Select all
./check_log3.pl -l '/tmp/logtest' -s alertlog.seek -p autobackup
OK - No matches found.
If I remove the seek file I see the warning again
Code: Select all
rm -f /tmp/logtest
./check_log3.pl -l '/tmp/logtest' -s alertlog.seek -p autobackup
WARNING: Found 4 lines (limit=1/0): Control autobackup written to DISK device
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 12:48 pm
by maxwellmiranda
now i got it...
my requirement is that we need to be alerted until the error in the log is fixed..is there a way to skip the seek file and let the plugin start all over again to search for a particular pattern
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 12:58 pm
by slansing
If you look at the plugin, it states that the seek file is mandatory. It is called a number of times throughout the script. You may be able to butcher the plugin and tailor fit it based on the authors policies however.
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 1:04 pm
by maxwellmiranda
okay let me see what i can do....i will tweak the code and set the seek line to start from 1 always....let me try...
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 1:05 pm
by slansing
Let us know how this works out for you.
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 2:44 pm
by maxwellmiranda
i am using this command...this doesnt work.....even if i specify the seek file it displays the below message...
> ./check_by_ssh -H remhau -C "/users/nagios/check_log3.pl -l '/u01/oracle/admin/remprd10/bdump/alert_remprd10.log' -s '/users/nagios/alertlog.seek' -p 'ORA-' -c 1"
Seek file not specified.
the command works on the remote server correctly
/users/nagios/check_log3.pl -l '/u01/oracle/admin/remprd10/bdump/alert_remprd10.log' -s '/users/nagios/alertlog.seek' -p 'ORA-' -c 1
OK - No matches found.
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 3:07 pm
by scottwilkerson
I have a feeling this may be a quoting issue Can I have you try the following
Code: Select all
./check_by_ssh -H remhau -C "/users/nagios/check_log3.pl -l /u01/oracle/admin/remprd10/bdump/alert_remprd10.log -s /users/nagios/alertlog.seek -p ORA- -c 1"
or
Code: Select all
./check_by_ssh -H remhau -C "/users/nagios/check_log3.pl -l \'/u01/oracle/admin/remprd10/bdump/alert_remprd10.log\' -s \'/users/nagios/alertlog.seek\' -p \'ORA-\' -c 1"
Re: plugin to monitor remote unix server oracle alert log fi
Posted: Wed Sep 19, 2012 3:32 pm
by maxwellmiranda
the first option worked...
thank you