summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md24
-rw-r--r--docs/Configuration.md2
-rw-r--r--docs/Creating-Models.md2
-rw-r--r--docs/Hooks.md4
-rw-r--r--docs/Model-Notes/AireOS.md2
-rw-r--r--docs/Model-Notes/Comware.md2
-rw-r--r--docs/Model-Notes/README.md4
-rw-r--r--docs/Model-Notes/VRP-Huawei.md4
-rw-r--r--docs/Sources.md4
-rw-r--r--docs/Supported-OS-Types.md5
-rw-r--r--lib/oxidized/model/aricentiss.rb50
-rw-r--r--lib/oxidized/model/edgecos.rb47
-rw-r--r--lib/oxidized/model/junos.rb5
-rw-r--r--lib/oxidized/model/powerconnect.rb2
-rw-r--r--lib/oxidized/model/supermicro.rb46
15 files changed, 138 insertions, 65 deletions
diff --git a/README.md b/README.md
index 336c05a..076c4d5 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,26 @@
# Oxidized [![Build Status](https://travis-ci.org/Shopify/oxidized.svg)](https://travis-ci.org/Shopify/oxidized) [![Gem Version](https://badge.fury.io/rb/oxidized.svg)](http://badge.fury.io/rb/oxidized) [![Join the chat at https://gitter.im/oxidized/Lobby](https://badges.gitter.im/oxidized/Lobby.svg)](https://gitter.im/oxidized/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-> Is your company using Oxidized and has Ruby developers on staff? I'd love help from an extra maintainer!
+Oxidized is a network device configuration backup tool. It's a RANCID replacement!
-[WANTED: MAINTAINER](#help-needed)
+Light and extensible, Oxidized supports over 90 operating system types.
-Oxidized is a network device configuration backup tool. It's a RANCID replacement!
+Feature highlights:
* 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 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 a move node immediately to head-of-queue (GET/POST /node/next/[NODE])
+* Syslog udp+file example to catch config change events (IOS/JunOS) and trigger a config fetch
+ * Will signal which IOS/JunOS user made the change, can then be used by output modules (via POST)
+ * The `git` output module uses this info - 'git blame' will show who changed each line, 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
-[Youtube Video: Oxidized TREX 2014 presentation](http://youtu.be/kBQ_CTUuqeU#t=3h)
+Check out the [Oxidized TREX 2014 presentation](http://youtu.be/kBQ_CTUuqeU#t=3h) video on YouTube!
+
+> :warning: [Maintainer Wanted!](#help-needed) :warning:
+>
+> Is your company using Oxidized and has Ruby developers on staff? I'd love help from an extra maintainer!
## Index
@@ -112,7 +116,7 @@ gem install pkg/*.gem
### Running with Docker
-Currently, Docker Hub automatcally builds the master branch as [oxidized/oxidized](https://hub.docker.com/r/oxidized/oxidized/), you can make use of this container or build your own.
+Currently, Docker Hub automatically builds the master branch as [oxidized/oxidized](https://hub.docker.com/r/oxidized/oxidized/), you can make use of this container or build your own.
To build your own, clone git repo:
@@ -161,7 +165,7 @@ oxidized:
- /etc/oxidized:/root/.config/oxidized
```
-Create the `/etc/oxidized/router.db` (see [CSV Source](docs/Sources.md#source-csv) for futher info):
+Create the `/etc/oxidized/router.db` (see [CSV Source](docs/Sources.md#source-csv) for further info):
```shell
vim /etc/oxidized/router.db
diff --git a/docs/Configuration.md b/docs/Configuration.md
index 59e3f6d..6bbbb61 100644
--- a/docs/Configuration.md
+++ b/docs/Configuration.md
@@ -54,7 +54,7 @@ The above strips out snmp community strings from your saved configs.
## Disabling SSH exec channels
-Oxidized uses exec channels to make information extraction simpler, but there are some situations where this doesn't work well, e.g. configuring devices. This feature can be turned off by setting the `ssh_no_exec`
+Oxidized uses exec channels to make information extraction simpler, but there are some situations where this doesn't work well, e.g. configuring devices. This feature can be turned off by setting the `ssh_no_exec`
variable.
```yaml
diff --git a/docs/Creating-Models.md b/docs/Creating-Models.md
index 3c343e6..d7a8155 100644
--- a/docs/Creating-Models.md
+++ b/docs/Creating-Models.md
@@ -1,4 +1,4 @@
-# Creating and Extending Oxidized Models
+# Creating and Extending Models
Oxidized supports a growing list of [operating system types](Supported-OS-Types.md). Out of the box, most model implementations collect configuration data. Some implementations also include a conservative set of additional commands that collect basic device information (device make and model, software version, licensing information, ...) which are appended to the configuration as comments.
diff --git a/docs/Hooks.md b/docs/Hooks.md
index 1d263fb..8a0a8b9 100644
--- a/docs/Hooks.md
+++ b/docs/Hooks.md
@@ -11,7 +11,7 @@ Following configuration keys need to be defined for all hooks:
### Events
-* `node_success`: triggered when configuration is succesfully pulled from a node and right before storing the configuration.
+* `node_success`: triggered when configuration is successfully 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 (this is executed only when the configuration has changed).
* `nodes_done`: triggered after finished fetching all nodes.
@@ -62,7 +62,7 @@ hooks:
### Hook type: githubrepo
-This hook configures the repository `remote` and _push_ the code when the specified event is triggerd. If the `username` and `password` are not provided, the `Rugged::Credentials::SshKeyFromAgent` will be used.
+This hook configures the repository `remote` and _push_ the code when the specified event is triggered. If the `username` and `password` are not provided, the `Rugged::Credentials::SshKeyFromAgent` will be used.
`githubrepo` hook recognizes following configuration keys:
diff --git a/docs/Model-Notes/AireOS.md b/docs/Model-Notes/AireOS.md
index 9962f31..5674ae2 100644
--- a/docs/Model-Notes/AireOS.md
+++ b/docs/Model-Notes/AireOS.md
@@ -1,7 +1,7 @@
Cisco WLC Configuration
=======================
-Create a user with read-write privilege :
+Create a user with read-write privilege:
```text
mgmtuser add oxidized **** read-write
diff --git a/docs/Model-Notes/Comware.md b/docs/Model-Notes/Comware.md
index 0da019a..e7a2198 100644
--- a/docs/Model-Notes/Comware.md
+++ b/docs/Model-Notes/Comware.md
@@ -1,7 +1,7 @@
Comware Configuration
=====================
-If you find 3Com comware devices aren't being backed up this may be due to prompt detection not matching because a previous login message is disabled after the first prompt.
+If you find 3Com Comware devices aren't being backed up this may be due to prompt detection not matching because a previous login message is disabled after the first prompt.
You can disable this on the devices themselves by running this command:
diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md
index 8dcabd3..c4b0ed1 100644
--- a/docs/Model-Notes/README.md
+++ b/docs/Model-Notes/README.md
@@ -1,7 +1,7 @@
Model Notes
===========
-This directory contains implemention notes and caveats to assist you in your oxidized deployment.
+This directory contains implementation notes and caveats to assist you in your oxidized deployment.
Use the table below for more information on the Vendor/Model caveats.
@@ -12,6 +12,6 @@ AireOS|[AireOS](AireOS.md)|29 Nov 2017
Arbor Networks|[ArbOS](ArbOS.md)|27 Feb 2018
Huawei|[VRP](VRP-Huawei.md)|17 Nov 2017
Juniper|[MX/QFX/EX/SRX/J Series](JunOS.md)|18 Jan 2018
-Xyzel|[XGS4600 Series](XGS4600-Zyxel.md)|23 Jan 2018
+Zyxel|[XGS4600 Series](XGS4600-Zyxel.md)|23 Jan 2018
If you discover additional caveats or problems please make sure to consult the [GitHub issues for oxidized](https://github.com/ytti/oxidized/issues) known issues.
diff --git a/docs/Model-Notes/VRP-Huawei.md b/docs/Model-Notes/VRP-Huawei.md
index e68a959..ff5426e 100644
--- a/docs/Model-Notes/VRP-Huawei.md
+++ b/docs/Model-Notes/VRP-Huawei.md
@@ -19,7 +19,7 @@ The commands Oxidized executes are:
3. display device
4. display current-configuration all
-Command 2 and 3 can be executed without issues, but 1 and 4 are only available for higher level users. Instead of making Oxidized a read/write user on your device, lower the priviledge-level for commands 1 and 4:
+Command 2 and 3 can be executed without issues, but 1 and 4 are only available for higher level users. Instead of making Oxidized a read/write user on your device, lower the privilege-level for commands 1 and 4:
```text
<HUAWEI> system-view
@@ -30,4 +30,6 @@ Command 2 and 3 can be executed without issues, but 1 and 4 are only available f
Oxidized can now retrieve your configuration!
+Caveat: Some versions of VRP default to appending a timestamp prior to the output of each `display` command, which will lead to superfluous updates. The configuration statement `timestamp disable` can be used to disable this functionality. (Issue #1218)
+
Back to [Model-Notes](README.md)
diff --git a/docs/Sources.md b/docs/Sources.md
index 5599409..6d8e19e 100644
--- a/docs/Sources.md
+++ b/docs/Sources.md
@@ -2,7 +2,7 @@
## Source: CSV
-One line per device, colon seperated. If `ip` isn't present, a DNS lookup will be done against `name`. For large installations, setting `ip` will dramatically reduce startup time.
+One line per device, colon separated. If `ip` isn't present, a DNS lookup will be done against `name`. For large installations, setting `ip` will dramatically reduce startup time.
```yaml
source:
@@ -105,7 +105,7 @@ source:
## Custom SQL Query Support
-You may also implement a custom SQL query to retreive the nodelist using SQL syntax with the `query:` configuration parameter under the `sql:` stanza.
+You may also implement a custom SQL query to retrieve the nodelist using SQL syntax with the `query:` configuration parameter under the `sql:` stanza.
### Custom SQL Query Examples
diff --git a/docs/Supported-OS-Types.md b/docs/Supported-OS-Types.md
index a0ca66b..1717284 100644
--- a/docs/Supported-OS-Types.md
+++ b/docs/Supported-OS-Types.md
@@ -139,7 +139,10 @@
* Siklu
* [EtherHaul](/lib/oxidized/model/siklu.rb)
* Supermicro
- * [Supermicro](/lib/oxidized/model/supermicro.rb)
+ * [SSE-G2252, G2252P](/lib/oxidized/model/edgecos.rb)
+ * [SSE-G48-TG4, G24-TG4](/lib/oxidized/model/aricentiss.rb)
+ * [SSE-X24S, X24SR, X3348S, X3348SR, X3348T, X3348TR](/lib/oxidized/model/aricentiss.rb)
+ * [SBM-GEM-X2C, GEM-X2C+, GEM-X3S+, XEM-X10SM](/lib/oxidized/model/aricentiss.rb)
* Symantec
* [Blue Coat ProxySG / Security Gateway OS (SGOS)](/lib/oxidized/model/sgos.rb)
* Trango Systems
diff --git a/lib/oxidized/model/aricentiss.rb b/lib/oxidized/model/aricentiss.rb
new file mode 100644
index 0000000..80735c7
--- /dev/null
+++ b/lib/oxidized/model/aricentiss.rb
@@ -0,0 +1,50 @@
+# Developed against:
+# #show version
+# Switch ID Hardware Version Firmware Version
+# 0 SSE-G48-TG4 (P2-01) 1.0.16-9
+
+class AricentISS < Oxidized::Model
+
+ prompt (/^(\e\[27m)?[ \r]*\w+# ?$/)
+
+ cfg :ssh do
+ post_login 'no cli pagination'
+ pre_logout 'exit'
+ end
+
+ cmd :all do |cfg|
+ # * Drop first line that contains the command, and the last line that
+ # contains a prompt
+ # * Strip carriage returns
+ cfg.delete("\r").each_line.to_a[1..-2].join
+ end
+
+ cmd :secret do |cfg|
+ cfg.gsub(/^(snmp community) .*/, '\1 <hidden>')
+ end
+
+ cmd 'show system information' do |cfg|
+ cfg.sub! /^Device Up Time.*\n/, ''
+ cfg.delete! "\r"
+ comment(cfg).gsub(/ +$/, '')
+ end
+
+ cmd 'show running-config' do |cfg|
+ comment_next = 0
+ cfg.each_line.map { |l|
+ next '' if l.match /^Building configuration/
+
+ if l.match /^Switch ID.*Hardware Version.*Firmware Version/ then
+ comment_next = 2
+ end
+
+ if comment_next > 0 then
+ comment_next -= 1
+ next comment(l)
+ end
+
+ l
+ }.join.gsub(/ +$/, '')
+ end
+
+end
diff --git a/lib/oxidized/model/edgecos.rb b/lib/oxidized/model/edgecos.rb
new file mode 100644
index 0000000..bc205f5
--- /dev/null
+++ b/lib/oxidized/model/edgecos.rb
@@ -0,0 +1,47 @@
+class EdgeCOS < Oxidized::Model
+
+ comment '! '
+
+ cmd :secret do |cfg|
+ cfg.gsub!(/password \d+ (\S+).*/, '<secret removed>')
+ cfg.gsub!(/community (\S+)/, 'community <hidden>')
+ cfg
+ end
+
+ cmd :all do |cfg|
+ cfg.each_line.to_a[2..-2].join
+ end
+
+ cmd 'show running-config'
+
+ cmd 'show access-list tcam-utilization' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show memory' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show system' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show version' do |cfg|
+ comment cfg
+ end
+
+ cmd 'show watchdog' do |cfg|
+ comment cfg
+ end
+
+ cfg :telnet do
+ username /^Username:/
+ password /^Password:/
+ end
+
+ cfg :telnet, :ssh do
+ post_login 'terminal length 0'
+ pre_logout 'exit'
+ end
+
+end
diff --git a/lib/oxidized/model/junos.rb b/lib/oxidized/model/junos.rb
index 2f59414..2ea0179 100644
--- a/lib/oxidized/model/junos.rb
+++ b/lib/oxidized/model/junos.rb
@@ -13,7 +13,10 @@ class JunOS < Oxidized::Model
end
cmd :secret do |cfg|
- cfg.gsub!(/encrypted-password (\S+).*/, '<secret removed>')
+ cfg.gsub!(/encrypted-password (\S+).*/, 'encrypted-password <secret removed>')
+ cfg.gsub!(/pre-shared-key ascii-text (\S+).*/, 'pre-shared-key ascii-text <secret removed>')
+ cfg.gsub!(/pre-shared-key hexadecimal (\S+).*/, 'pre-shared-key hexadecimal <secret removed>')
+ cfg.gsub!(/authentication-key (\S+).*/, 'authentication-key <secret removed>')
cfg.gsub!(/community (\S+) {/, 'community <hidden> {')
cfg
end
diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb
index 61e1cf2..f602a36 100644
--- a/lib/oxidized/model/powerconnect.rb
+++ b/lib/oxidized/model/powerconnect.rb
@@ -14,7 +14,7 @@ class PowerConnect < Oxidized::Model
end
cmd :secret do |cfg|
- cfg.gsub! /^username (\S+) password \S+ (.*)/, 'username \1 password <hidden> \2'
+ cfg.gsub! /^(username \S+ password (?:encrypted )?)\S+(.*)/, '\1<hidden>\2'
cfg
end
diff --git a/lib/oxidized/model/supermicro.rb b/lib/oxidized/model/supermicro.rb
index 361244c..518ae41 100644
--- a/lib/oxidized/model/supermicro.rb
+++ b/lib/oxidized/model/supermicro.rb
@@ -1,45 +1,9 @@
-class Supermicro < Oxidized::Model
- comment '! '
+# Backward compatibility shim for deprecated model `supermicro`.
+# Migrate your source from `supermicro` to `edgecos`.
- cmd :secret do |cfg|
- cfg.gsub!(/password \d+ (\S+).*/, '<secret removed>')
- cfg.gsub!(/community (\S+)/, 'community <hidden>')
- cfg
- end
+require_relative 'edgecos.rb'
- cmd :all do |cfg|
- cfg.each_line.to_a[2..-2].join
- end
+Supermicro = EdgeCOS
- cmd 'show running-config'
+Oxidized.logger.warn "Using deprecated model supermicro, use edgecos instead."
- cmd 'show access-list tcam-utilization' do |cfg|
- comment cfg
- end
-
- cmd 'show memory' do |cfg|
- comment cfg
- end
-
- cmd 'show system' do |cfg|
- comment cfg
- end
-
- cmd 'show version' do |cfg|
- comment cfg
- end
-
- cmd 'show watchdog' do |cfg|
- comment cfg
- end
-
- cfg :telnet do
- username /^Username:/
- password /^Password:/
- end
-
- cfg :telnet, :ssh do
- post_login 'terminal length 0'
- pre_logout 'exit'
- end
-end \ No newline at end of file