From 72f8f1aef94747472736ae3fced21675fb78b5da Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Tue, 25 Feb 2014 13:19:58 +0200 Subject: Some document changes --- README.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 15da1fe..97b91db 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ # Pitch * automatically adds/removes threads to meet configured retrieval interval - * restful API to move node immediately to head-of-queue + * restful API to move node immediately to head-of-queue (GET/POST /node/next/[NODE]) * syslog udp+file example to catch config change event (ios/junos) and trigger config fetch - * will signal ios/junos user who made change, which output module can (git does) use + * will signal ios/junos user who made change, which output module can (git does) use (via POST) * 'git blame' will show for each line who and when the change was made - * restful API to reload list of nodes (GET /nodes/reload) - * restful API to fetch configurations (/nodes/fetch/[NODE] or /nodes/fetch/group/[NODE]) + * restful API to reload list of nodes (GET /reload) + * restful API to fetch configurations (/node/fetch/[NODE] or /node/fetch/group/[NODE]) + * restful API to show list of nodes (GET /nodes) # Install * early days, but try: - 1. apt-get install libsqlite3-dev + 1. apt-get install libsqlite3-dev libssl-dev 2. gem install oxidized 3. oxidized 4. vi ~/.config/oxidized @@ -24,7 +25,7 @@ ## Output * stores config - * must implement 'store' + * must implement 'store' (may implement 'fetch') * 'git' and 'file' (store as flat ascii) implemented ## Source @@ -44,3 +45,68 @@ * cfg is executed in input/output/source context * cmd is executed in instance of model * 'junos', 'ios', 'ironware' and 'powerconnect' implemented + +## Cookbook + +# Configuration I use in one environment +``` +[rancid@lan-login1 /var/rancid/.config/oxidized]% cat config +--- +:username: LANA +:password: LANAAAAAAA +:log: "/var/rancid/.config/oxidized/log" +:output: + :default: git + :git: + :user: Oxidized + :email: o@example.com + :repo: "/usr/local/lan/oxidized.git" +:source: + :default: sql + :sql: + :adapter: sqlite + :file: "/usr/local/lan/corona.db" + :table: device + :map: + :name: ptr + :model: model +[rancid@lan-login1 /var/rancid/.config/oxidized]% +``` + +Configuration you end up after first run (and it'll crash on missing router.db +file) +``` +--- +:username: username +:password: password +:model: junos +:interval: 3600 +:log: "/var/rancid/.config/oxidized/log" +:debug: false +:threads: 30 +:timeout: 5 +:prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/ +:rest: 0.0.0.0:8888 +:vars: + :enable: enablePW +:input: + :default: ssh, telnet + :ssh: + :secure: false +:output: + :default: git +:source: + :default: csv + :csv: + :file: "/var/rancid/.config/oxidized/router.db" + :delimiter: !ruby/regexp /:/ + :map: + :name: 0 + :model: 1 +:model_map: + cisco: ios + juniper: junos +``` +which reads nodes from rancid compatible router.db maps their model names to +model names oxidized expects, stores config in git, will try ssh first then +telnet, wont crash on changed ssh keys -- cgit v1.2.1