plugin to monitor remote unix server oracle alert log file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: plugin to monitor remote unix server oracle alert log fi

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: plugin to monitor remote unix server oracle alert log fi

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: plugin to monitor remote unix server oracle alert log fi

Post 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.
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: plugin to monitor remote unix server oracle alert log fi

Post 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...
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: plugin to monitor remote unix server oracle alert log fi

Post by slansing »

Let us know how this works out for you.
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: plugin to monitor remote unix server oracle alert log fi

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: plugin to monitor remote unix server oracle alert log fi

Post 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"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: plugin to monitor remote unix server oracle alert log fi

Post by maxwellmiranda »

the first option worked...
thank you
Locked