diff options
author | Saku Ytti <saku@ytti.fi> | 2013-04-20 00:41:23 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2013-04-20 00:41:23 +0300 |
commit | f1287a7925901bf3518eb69079304bfb97f7434d (patch) | |
tree | 3dd2779e4d087b73b99d7136f37db88c76091d8d /lib/tst | |
parent | 5a393d6102655f575549311e6b250534b4dcbb59 (diff) |
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.
Diffstat (limited to 'lib/tst')
-rwxr-xr-x | lib/tst | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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 |