diff options
author | Saku Ytti <saku@ytti.fi> | 2014-02-25 13:19:58 +0200 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-02-25 13:19:58 +0200 |
commit | 72f8f1aef94747472736ae3fced21675fb78b5da (patch) | |
tree | 7f54070de8cd5e4d0488fc25e5805d803a4f1989 | |
parent | 54275a0576b05813e78aa7707111db3411602048 (diff) |
Some document changes
-rw-r--r-- | README.md | 78 |
1 files changed, 72 insertions, 6 deletions
@@ -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 |