vhaphisasset has asked for the wisdom of the Perl Monks concerning the following question:

Has anyone used logdog to monitor their Linux system? I am running RHEL 6 and the scripts are written in Perl. I have installed it on a test system and configured it per the install directions. I have checked to make sure all permissions correct, all files exist and the entry of:

*.info            |${FIFO}

is set in the syslog.conf and restarted syslogd. It is old code and I have reached out to the developer with no success. http://caspian.dotconf.net/menu/Software/LogDog/

The error I get is: Mar 18 09:09:41 unknown logdog.pl9300: ERROR => Timeout while opening FIFO /var/log/fifo.logdog. Possible solution: configure syslogd to log to this FIFO and restart syslogd.

As I stated it is set in syslog.conf and I even opened all files up too 777 for testing. Any ideas from anyone that has used it?

Replies are listed 'Best First'.
Re: LOGDOG Issue
by jmacloue (Beadle) on Mar 18, 2015 at 16:07 UTC

    Maybe a dumb question - but does /var/log/fifo.logdog actually exist? What is the exact line of syslog.conf - is it as you quoted or as follows:

    *.info |/var/log/fifo.logdog

    Also it's worth checking fuser /var/log/fifo.logdog - this should show if both endpoints are connected

      The file does exist and I set it to be wide open

      prwxrwxrwx. 1 root root 0 Mar 18 08:33 fifo.logdog

      When I run the fuser /var/log/fifo.logdog I get no return.

      BTW. Thanks for your input!

      So I commented out this in the logdog.pl file

      ##if (openFIFO($conf{'fifo'})) { quit("ERROR => Connecting to fifo [$conf{'fifo'}] returned the error: $!", 1); }

      Here is where it is located:

      ############################# ## ## MAIN PROGRAM ## ############################# ## Initialize initialize(); ## All other initialization stuff processCommandLine(); handleHUP(); ## Open fifo ##if (openFIFO($conf{'fifo'})) { quit("ERROR => Connecting to fifo [$c +onf{'fifo'}] returned the error: $!", 1); }

      Of course the program started but no info on a user to access the fifo file. I'll keep digging

        So... Did you check that /etc/syslog.conf is correct?

        Edit the configuration and replace the

        *.info |${FIFO}
        with
        *.info |/var/log/fifo.logdog
        (be sure that there are TABs, not spaces, separating the sides.) Then send SIGHUP to syslogd...

        With stepping through the code here is where it fails in the logdog.pl

        $SIG{'ALRM'} = sub { quit("ERROR => Timeout while opening FIFO [$ +conf{'fifo'}]. Possible solution: configure syslogd to log to this F +IFO and restart syslogd.", 1); };

        Below is the entire function for opening the FIFO

        ###################################################################### +######################### ## FUNCTION: ## openFIFO ( $filename ) ## ## ## DESCRIPTION: ## Opens the fifo $filename for reading and attaches it to the fileh +andle "FIFO". Returns 0 on success ## and non-zero on failure. Error codes are listed below, and the e +rror message gets set in ## global variable $!. ## ## ## Example: ## openFIFO ("/var/log/fifo.rdp_monitorLogwatch"); ## ###################################################################### +######################### sub openFIFO { ## Get the incoming filename my $filename = $_[0]; ## Make sure our fifo exists, and if the fifo doesn't exist then c +reate it if ( ! -p $filename ) { quit("ERROR => FIFO does not exist or is not a FIFO at [$conf{ +'fifo'}]\nDid you forget to create it and configure syslogd to log to + it?\n", 1); } ## Open the FIFO socket we're supposed to listen to and attach it +to a filehandle $SIG{'ALRM'} = sub { quit("ERROR => Timeout while opening FIFO [$ +conf{'fifo'}]. Possible solution: configure syslogd to log to this F +IFO and restart syslogd.", 1); }; alarm(10); open (FIFO,"< $filename") or return(1); alarm(0); ## Return success return(0); }