README.md in oxidized-0.10.0 vs README.md in oxidized-0.11.0
- old
+ new
@@ -5,12 +5,12 @@
Oxidized is a network device configuration backup tool. It's a RANCID replacement!
* automatically adds/removes threads to meet configured retrieval interval
* 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 (via POST)
- * 'git blame' will show for each line who and when the change was made
+ * will signal ios/junos user who made change, which output modules can use (via POST)
+ * The git output module uses this info - 'git blame' will for each line show who made the change and when
* 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)
* restful API to show list of version for a node (/node/version[NODE]) and diffs
@@ -142,11 +142,11 @@
Maps define how to map a model's fields to model [model fields](https://github.com/ytti/oxidized/tree/master/lib/oxidized/model). Most of the settings should be self explanatory, log is ignored if `use_syslog`(requires Ruby >= 2.0) is set to `true`.
First create the directory where the CSV ```output``` is going to store device configs and start Oxidized once.
```
-mkdir ~/.config/oxidized/configs
+mkdir -p ~/.config/oxidized/configs
oxidized
```
Now tell Oxidized where it finds a list of network devices to backup configuration from. You can either use CSV or SQLite as source. To create a CSV source add the following snippet:
@@ -228,10 +228,15 @@
^C
root@bla:~#
```
+If you want to have the config automatically reloaded (e.g. when using a http source that changes)
+```
+ root@bla:~# docker run -v /etc/oxidized:/root/.config/oxidized -p 8888:8888/tcp -e CONFIG_RELOAD_INTERVAL=3600 -t oxidized/oxidized:latest oxidized
+```
+
## Cookbook
### Debugging
In case a model plugin doesn't work correctly (ios, procurve, etc.), you can enable live debugging of SSH/Telnet sessions. Just add a ```debug``` option, specifying a log file destination to the ```input``` section.
The following example will log an active ssh session to ```/home/fisakytt/.config/oxidized/log_input-ssh``` and telnet to ```log_input-telnet```. The file will be truncated on each consecutive ssh/telnet session, so you need to put a ```tailf``` or ```tail -f``` on that file!
@@ -270,10 +275,25 @@
password: 3
vars_map:
enable: 4
```
+### SSH Proxy Command
+
+Oxidized can `ssh` through a proxy as well. To do so we just need to set `proxy` variable.
+
+```
+...
+map:
+ name: 0
+ model: 1
+vars_map:
+ enable: 2
+ proxy: 3
+...
+```
+
### Source: SQLite
One row per device, filtered by hostname.
```
@@ -294,10 +314,12 @@
### Source: HTTP
One object per device.
+HTTP Supports basic auth, configure the user and pass you want to use under the http: section.
+
```
source:
default: http
http:
url: https://url/api
@@ -324,10 +346,12 @@
directory: /var/lib/oxidized/configs
```
### Output: Git
+This uses the rugged/libgit2 interface. So you should remember that normal Git hooks will not be executed.
+
```
output:
default: git
git:
user: Oxidized
@@ -453,10 +477,10 @@
* `type`: what hook class to use. See below for the list of available hook types.
### Events
* `node_success`: triggered when configuration is succesfully pulled from a node and right before storing the configuration.
* `node_fail`: triggered after `retries` amount of failed node pulls.
- * `post_store`: triggered after node configuration is stored.
+ * `post_store`: triggered after node configuration is stored (this is executed only when the configuration has changed).
## Hook type: exec
The `exec` hook type allows users to run an arbitrary shell command or a binary when triggered.
The command is executed on a separate child process either in synchronous or asynchronous fashion. Non-zero exit values cause errors to be logged. STDOUT and STDERR are currently not collected.