check_log script errors
Carroll, Jim P [Contractor]
jcarro10 at sprintspectrum.com
Fri Jan 31 01:23:26 CET 2003
I'm rather partial to the check_log2.pl Perl script (in the contrib
directory). Since it uses seek/tell, it's quite a bit more economical with
disk space/IO than the original check_log Bourne shell script, at least if
you end up dealing with large logfiles.
If you decide to go this route and need help, let me know.
jc
> -----Original Message-----
> From: Daniel_Casey at jbhunt.com [mailto:Daniel_Casey at jbhunt.com]
> Sent: Thursday, January 30, 2003 4:14 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_log script errors
>
>
> Nagios 1.0 on AIX 4.3.3
>
> Around line 186 in the check_log plugin script, there is a
> piece of code
> that reads:
>
> # The old log file exists, so compare it to the original log now
>
> # The temporary file that the script should use while
> # processing the log file.
> if [ -x mktemp-x /usr/local/bin/mktemp
> tempdiff=`mktemp`
> else
> tempdiff=`/bin/date '+%H%M%S'`
> tempdiff="/tmp/check_log.${tempdiff}"
> /bin/touch $tempdiff
> chmod 600 $tempdiff
> fi
>
> Can't figure what the first if statement should be. My guess
> is that it's
> checking to see
> if the /usr/local/bin/mktemp is executable (-x) and if so,
> then run assign
> mktemp to the
> tempdiff variable, else, tempdiff get a different assignment.
> So possibly:
>
> if [ -x /usr/local/bin/mktemp ]; then
> .
> .
>
> However, when I run the script manually, I get an error about diff:
>
> diff: 0653-802 Specify two file names.
>
> Has anyone done any work to this script? I'll see if I can
> get it working
> and post the
> results to the list, but would appreciate any help.
>
> Thanks.
>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
More information about the Users
mailing list