[rancid] Re: Rancid and Syslog-ng

Meli, Federico Federico.Meli at GlobalCrossing.com
Tue Jul 21 21:19:19 UTC 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rancid.pl
Type: application/octet-stream
Size: 215 bytes
Desc: rancid.pl
Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090721/57abbbd7/attachment.obj 


More information about the Rancid-discuss mailing list