in reply to Re: LOGDOG Issue
in thread LOGDOG FIFO Issue

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

Replies are listed 'Best First'.
Re^3: LOGDOG Issue
by Anonymous Monk on Mar 19, 2015 at 17:05 UTC

    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...

      It has been sometime since I was able to get back into looking at this issue. I took sometime this morning to start trouble shooting again and found out what was causing the problem. This code was written when RHEL used syslogd and in version RHEL 6 they changed it to rsyslogd. So I edited the rsyslog.conf file to reflect the usage of the fifo and everything works as it should with the system alerting on the predefined error phrases. One change is that syslogd accepted the | symbol but rsyslogd does not. See the code change.

      This is the old code with using the syslog.conf

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

      This is how it needs to be set using rsyslog.conf

      *.info                                                  -/var/log/fifo.rdp_monitorLogwatch

      Since I was able to resolve the issue I wanted to let you all know how in case someone wanted to use the code on their server. Thanks again for those that helped out!

      I have made the edits as you described and I had already used TAB but still getting the same response. I also restarted the syslogd service (service rsyslog restart) (

      ERROR => Timeout while opening FIFO [/var/log/fifo.logdog].  Possible solution: configure syslogd to log to this FIFO and restart syslogd.

      Same error as before. Just cant open the file. Thanks for your input!!

Re^3: LOGDOG FIFO Issue
by vhaphisasset (Initiate) on Mar 19, 2015 at 16:29 UTC

    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); }