From f1287a7925901bf3518eb69079304bfb97f7434d Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Sat, 20 Apr 2013 00:41:23 +0300 Subject: Example of Syslog triggered fetch 'syslog.rb' listed to UDP port (or reads file). When IOS or JunOS style config change/commit message is seen, it triggers immediate update ot config It transports commit message (junos) remote host from which change was mde (ios) and who made the change (junos+ios). This is carried over to the 'output' methods, that is, 'git blame' will show IOS/JunOS user-name who made the change. --- lib/tst | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'lib/tst') diff --git a/lib/tst b/lib/tst index b529653..6b314cc 100755 --- a/lib/tst +++ b/lib/tst @@ -1,10 +1,19 @@ #!/usr/bin/env ruby20 $: << '.' -require 'pry' -#require 'pp' -#require 'rubygems' +require 'pry' if ENV['DEV'] require 'oxidized' -k = Oxidized.new - +begin + Oxidized.new +rescue Exception => e + open Oxidized::Config::Crash, 'w' do |file| + file.puts '-' * 50 + file.puts Time.now.utc + file.puts '-' * 50 + file.puts e.backtrace + file.puts '-' * 50 + file.puts caller + end + raise +end -- cgit v1.2.1