summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Model-Notes/README.md17
-rw-r--r--docs/Model-Notes/VRP-Huawei.md (renamed from docs/VRP-Huawei.md)9
-rw-r--r--docs/Sources.md36
3 files changed, 58 insertions, 4 deletions
diff --git a/docs/Model-Notes/README.md b/docs/Model-Notes/README.md
new file mode 100644
index 0000000..15ab445
--- /dev/null
+++ b/docs/Model-Notes/README.md
@@ -0,0 +1,17 @@
+
+
+Model Notes
+========================
+
+
+This directory contains implemention notes and caveats to assist you in your oxidized deployment.
+
+Use the table below for more information on the Vendor/Model caveats.
+
+
+Vendor | Model |Updated
+----------------|-----------------|----------------
+Huawei|[VRP](VRP-Huawei.md)|17 Nov 2017
+
+
+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/VRP-Huawei.md b/docs/Model-Notes/VRP-Huawei.md
index 9e97b7d..d03c752 100644
--- a/docs/VRP-Huawei.md
+++ b/docs/Model-Notes/VRP-Huawei.md
@@ -3,12 +3,14 @@ Huawei VRP Configuration
Create a user with no privileges
+```
<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] local-user oxidized password irreversible-cipher verysecret
[*HUAWEI-aaa] local-user oxidized level 1
[*HUAWEI-aaa] local-user oxidized service-type terminal ssh
[*HUAWEI-aaa] commit
+```
The commands Oxidized executes are:
@@ -19,9 +21,14 @@ The commands Oxidized executes are:
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:
+```
<HUAWEI> system-view
[~HUAWEI] command-privilege level 1 view global display current-configuration all
[*HUAWEI] command-privilege level 1 view shell screen-length
[*HUAWEI] commit
+```
-Oxidized can now retrieve your configuration! \ No newline at end of file
+Oxidized can now retrieve your configuration!
+
+
+Back to [Model-Notes](README.md)
diff --git a/docs/Sources.md b/docs/Sources.md
index 4121c89..0a6d1d7 100644
--- a/docs/Sources.md
+++ b/docs/Sources.md
@@ -61,8 +61,8 @@ source:
default: sql
sql:
adapter: sqlite
- database: "/var/lib/oxidized/devices.db"
- table: devices
+ database: "/var/lib/oxidized/nodes.db"
+ table: nodes
map:
name: fqdn
model: model
@@ -72,6 +72,36 @@ source:
enable: enable
```
+### 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.
+
+
+#### Custom SQL Query Examples
+
+You may have a table named `nodes` which contains a boolean to indicate if the nodes should be enabled (fetched via oxidized). This can be used in the custom SQL query to avoid fetching from known impacted nodes.
+
+In your configuration, you would add the `query:` parameter and specify the SQL query. Make sure to put this within the `sql:` configuration section.
+
+```sql
+query: "SELECT * FROM nodes WHERE enabled = True"
+```
+
+Since this is an SQL query, you can also provide a more advanced query to assist in more complicated oxidized deployments. The exact deployment is up to you on how you design your database and oxidized fetchers.
+
+In this example we limit the nodes to two "POPs" of `mypop1` and `mypop2`. We also require the nodes to have the `enabled` boolean set to `True`.
+
+```sql
+query: "SELECT * FROM nodes WHERE pop IN ('mypop1','mypop2') AND enabled = True"
+```
+The order of the nodes returned will influence the order that nodes are fetched by oxidized. You can use standard SQL `ORDER BY` clauses to influence the node order.
+
+You should always test your SQL query before using it in the oxidized configuration as there is no syntax or error checking performed before sending it to the database engine.
+
+Consult your database documentation for more information on query language and table optimization.
+
+
+
### Source: HTTP
One object per device.
@@ -107,4 +137,4 @@ source:
url: https://url/api
scheme: https
secure: false
-``` \ No newline at end of file
+```