[rancid] Rancid 3.4.99 not sending "x machines have not been contacted within x hours" emails.

Remsik,Robert Robert.Remsik at colostate.edu
Tue Oct 11 15:58:50 UTC 2016


I'm running a 3.4.99 Rancid installation version and while rancid is grabbing the configs and diffs correctly it is not sending an email notification if a device has not been reached for more than 24 hours.

Looking at the code it appears as if this code block from $home/bin/control_rancid isn't being triggered.  It also appears as if the echoes aren't going anywhere.

--- code block ---

# If any machines have not been reached within the last $OLDTIME
# hours, mail out a list of them.
cd $DIR/configs
rm -f $DIR/routers.failed
if [ "X$OLDTIME" = "X" ] ; then
perl -F; -ane "{\$t = (stat(\$F[0]))[9]; print \`ls -ld \$F[0]\`
        if (time() - \$t >= $OLDTIME*60*60);}" $devlistfile | sort -u > $DIR/routers.failed
if [ -s $DIR/routers.failed ] ; then
          echo "To: $adminmailrcpt"
          echo "Subject: config fetcher problems - $GROUP"
          echo "$MAILHEADERS" | awk '{L = "";LN = $0;while (LN ~ /\\n/) { I = index(LN,"\\n");L = L substr(LN,0,I-1) "\n";LN = substr(LN,I+2,length(LN)-I-1);}print L LN;}'
          echo ""
          echo "The following routers have not been successfully contacted for"
          echo "more than $OLDTIME hours."

          cat $DIR/routers.failed
        ) | $SENDMAIL -t $MAILOPTS
--- code block ---

Can anyone help?  Thank you in advance,


Robert Remsik


Desk Phone: 970 491 7120

Robert.Remsik at colostate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20161011/795d966d/attachment.html>

More information about the Rancid-discuss mailing list