From 52c8427e532be178d106d015b764213b1d345d10 Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Sun, 4 Sep 2016 13:52:34 -0700 Subject: Update README.md --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 342b518..03583e5 100644 --- a/README.md +++ b/README.md @@ -397,6 +397,31 @@ vars_map: ssh_proxy: 3 ... ``` +### Source: SQL->MYSQL + +One row per device, filtered by hostname +require 'mysql' +sudo apt-get install libmysqlclient-dev + +``` +source: + default: sql + sql: + adapter: mysql + database: oxidized + table: nodes + username: root #Make sure the user has permissions to login + password: rootpass + #The keys inside the map hash are static + #The values correspond to your fields in the DB + map: + name: ip #<-- IP is a field + model: model + username: username + password: password + vars_map: + enable: enable +``` ### Source: SQLite -- cgit v1.2.1 From 5c16ce270b427da30e225897fcd6b4854856f1da Mon Sep 17 00:00:00 2001 From: MajesticFalcon Date: Sun, 4 Sep 2016 13:55:50 -0700 Subject: Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03583e5..10411f8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,9 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * [Privileged mode](#privileged-mode) * [Disabling SSH exec channels](#disabling-ssh-exec-channels) * [Source: CSV](#source-csv) - * [Source: SQLite](#source-sqlite) + * [Source: SQL](#source-sqlite) + * [Source: SQLite](#source-sqlite) + * [Source: Mysql](#source-mysql) * [Source: HTTP](#source-http) * [Output: GIT](#output-git) * [Output: HTTP](#output-http) @@ -397,7 +399,8 @@ vars_map: ssh_proxy: 3 ... ``` -### Source: SQL->MYSQL + +### Source: MYSQL One row per device, filtered by hostname require 'mysql' -- cgit v1.2.1 From aa2d7a53eabc4d519c19fc42845643dfc4e807c1 Mon Sep 17 00:00:00 2001 From: MajesticFalcon Date: Sun, 4 Sep 2016 13:58:28 -0700 Subject: UPDATE README.md Add MYSQL help --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 10411f8..f7a6372 100644 --- a/README.md +++ b/README.md @@ -399,13 +399,23 @@ vars_map: ssh_proxy: 3 ... ``` - +### Source: SQL ### Source: MYSQL One row per device, filtered by hostname + require 'mysql' + sudo apt-get install libmysqlclient-dev +Make sure the user has permissions to login + +The keys inside the map hash are static + +The values correspond to your fields in the DB + +ip, model, etc are field names in the DB + ``` source: default: sql @@ -413,12 +423,11 @@ source: adapter: mysql database: oxidized table: nodes - username: root #Make sure the user has permissions to login + username: root password: rootpass - #The keys inside the map hash are static - #The values correspond to your fields in the DB + map: - name: ip #<-- IP is a field + name: ip model: model username: username password: password -- cgit v1.2.1 From 450568ae6cd57702a0afd13657cfc356a9414542 Mon Sep 17 00:00:00 2001 From: MajesticFalcon Date: Sun, 4 Sep 2016 14:01:01 -0700 Subject: Update README.md --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f7a6372..83e8e5c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * [Privileged mode](#privileged-mode) * [Disabling SSH exec channels](#disabling-ssh-exec-channels) * [Source: CSV](#source-csv) - * [Source: SQL](#source-sqlite) + * [Source: SQL](#source-sql) * [Source: SQLite](#source-sqlite) * [Source: Mysql](#source-mysql) * [Source: HTTP](#source-http) @@ -401,12 +401,7 @@ vars_map: ``` ### Source: SQL ### Source: MYSQL - -One row per device, filtered by hostname - -require 'mysql' - -sudo apt-get install libmysqlclient-dev +```sudo apt-get install libmysqlclient-dev``` Make sure the user has permissions to login @@ -425,7 +420,6 @@ source: table: nodes username: root password: rootpass - map: name: ip model: model -- cgit v1.2.1 From 617fbd2906960afa74cc9d41af3e48c2a16510ad Mon Sep 17 00:00:00 2001 From: MajesticFalcon Date: Sun, 4 Sep 2016 14:02:40 -0700 Subject: Update README.md --- README.md | 90 +++++++++++++++++++++++++++++---------------------------------- 1 file changed, 42 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 83e8e5c..0ef212d 100644 --- a/README.md +++ b/README.md @@ -400,54 +400,48 @@ vars_map: ... ``` ### Source: SQL -### Source: MYSQL -```sudo apt-get install libmysqlclient-dev``` - -Make sure the user has permissions to login - -The keys inside the map hash are static - -The values correspond to your fields in the DB - -ip, model, etc are field names in the DB - -``` -source: - default: sql - sql: - adapter: mysql - database: oxidized - table: nodes - username: root - password: rootpass - map: - name: ip - model: model - username: username - password: password - vars_map: - enable: enable -``` - -### Source: SQLite - -One row per device, filtered by hostname. - -``` -source: - default: sql - sql: - adapter: sqlite - database: "/var/lib/oxidized/devices.db" - table: devices - map: - name: fqdn - model: model - username: username - password: password - vars_map: - enable: enable -``` + ### Source: MYSQL + ```sudo apt-get install libmysqlclient-dev``` + + The values correspond to your fields in the DB such that ip, model, etc are field names in the DB + + ``` + source: + default: sql + sql: + adapter: mysql + database: oxidized + table: nodes + username: root + password: rootpass + map: + name: ip + model: model + username: username + password: password + vars_map: + enable: enable + ``` + + ### Source: SQLite + + One row per device, filtered by hostname. + + ``` + source: + default: sql + sql: + adapter: sqlite + database: "/var/lib/oxidized/devices.db" + table: devices + map: + name: fqdn + model: model + username: username + password: password + vars_map: + enable: enable + ``` ### Source: HTTP -- cgit v1.2.1 From 7a0085714fb909e27834968cb89973e9df70b06d Mon Sep 17 00:00:00 2001 From: MajesticFalcon Date: Sun, 4 Sep 2016 14:05:38 -0700 Subject: UPDATE README.md Add MYSQL docs --- README.md | 86 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 0ef212d..d822b21 100644 --- a/README.md +++ b/README.md @@ -400,48 +400,50 @@ vars_map: ... ``` ### Source: SQL - ### Source: MYSQL - ```sudo apt-get install libmysqlclient-dev``` - - The values correspond to your fields in the DB such that ip, model, etc are field names in the DB - - ``` - source: - default: sql - sql: - adapter: mysql - database: oxidized - table: nodes - username: root - password: rootpass - map: - name: ip - model: model - username: username - password: password - vars_map: - enable: enable - ``` - - ### Source: SQLite - - One row per device, filtered by hostname. - - ``` - source: - default: sql - sql: - adapter: sqlite - database: "/var/lib/oxidized/devices.db" - table: devices - map: - name: fqdn - model: model - username: username - password: password - vars_map: - enable: enable - ``` + Oxidized uses the `sequel` ruby gem. You can use a variety of databases that aren't explicitly listed. For more information visit https://github.com/jeremyevans/sequel Make sure you have the correct adapter! +### Source: MYSQL + +```sudo apt-get install libmysqlclient-dev``` + +The values correspond to your fields in the DB such that ip, model, etc are field names in the DB + +``` +source: + default: sql + sql: + adapter: mysql + database: oxidized + table: nodes + username: root + password: rootpass + map: + name: ip + model: model + username: username + password: password + vars_map: + enable: enable +``` + +### Source: SQLite + +One row per device, filtered by hostname. + +``` +source: + default: sql + sql: + adapter: sqlite + database: "/var/lib/oxidized/devices.db" + table: devices + map: + name: fqdn + model: model + username: username + password: password + vars_map: + enable: enable +``` ### Source: HTTP -- cgit v1.2.1 From ff35d151afa5251fc7a5a131db9bf99c23085925 Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Sun, 4 Sep 2016 16:58:12 -0700 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d822b21..339d9b2 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,7 @@ The values correspond to your fields in the DB such that ip, model, etc are fiel source: default: sql sql: - adapter: mysql + adapter: mysql2 database: oxidized table: nodes username: root -- cgit v1.2.1