[rancid] Re: Rancid and Syslog-ng
Sam Munzani
smunzani at comcast.net
Thu Jul 23 13:09:34 UTC 2009
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?
Thanks,
Sam
> 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: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Gary T. Giesen
> Sent: Tuesday, July 21, 2009 4:57 PM
> To: Satyam Mathura; rancid-discuss at shrubbery.net
> 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 <satz.sm at gmail.com> wrote:
>
>> 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.
>>
>>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090723/646b4137/attachment.html
More information about the Rancid-discuss
mailing list