<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The problem I faced with this approach is when the syslog-ng triggers
the program, it memorizes that. So calling rancid-run script directly
doesn't work. You need a wrapper script for this directive to work.
>From the configuration it looks like you have written rancid.pl
wrapper. Can you share that to the team?<br>
<br>
Thanks,<br>
Sam<br>
<blockquote
cite="mid:664F471D69849C499D350F2B85BAB83B128B97A1CA@EVS15.lat.gblxint.com"
type="cite">
<pre wrap="">Hello everyone;
        I implemented the solution with the following syslog-ng modification and a script in perl. When the syslog receive a change configuration trap trigger the script. You should adapt it to your specific system. In this case the syslog translate the IP add from the hosts/DNS and I use that name. also I put the script in the log directory to avoid permit issues. Hopefully It will work for you.
Syslog.conf:
source net { udp(); };
filter f_change{ match("SYS-5-CONFIG_I: Configured"); };
destination df_change { program("perl /var/log/rancid.pl"
template("$HOST\n") );
};
log { source(net); filter(f_change); destination(df_change); };
Regards
Federico Meli
Global Crossing Americas Solution, Inc.
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:rancid-discuss-bounces@shrubbery.net">rancid-discuss-bounces@shrubbery.net</a> [<a class="moz-txt-link-freetext" href="mailto:rancid-discuss-bounces@shrubbery.net">mailto:rancid-discuss-bounces@shrubbery.net</a>] On Behalf Of Gary T. Giesen
Sent: Tuesday, July 21, 2009 4:57 PM
To: Satyam Mathura; <a class="moz-txt-link-abbreviated" href="mailto:rancid-discuss@shrubbery.net">rancid-discuss@shrubbery.net</a>
Subject: [rancid] Re: Rancid and Syslog-ng
Another option I use is snmptt. There's an SNMP trap an IOS router can
send upon config change, and I use snmptt to run rancid against that
host when it receives such a trap.
GG
On 6/2/09, Satyam Mathura <a class="moz-txt-link-rfc2396E" href="mailto:satz.sm@gmail.com"><satz.sm@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Guys,
Has anyone ever been successful with setting up rancid and syslog-ng so that
whenever a config change is written to memory, syslog-ng calls the rancid
executable for that host only?
Basically we're looking to have rancid query a device only when that
device's configuration has been modified.
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
Rancid-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a>
<a class="moz-txt-link-freetext" href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a>
</pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Rancid-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a>
<a class="moz-txt-link-freetext" href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a></pre>
</blockquote>
<br>
</body>
</html>