{"id":13574116,"url":"https://github.com/ytti/oxidized","last_synced_at":"2025-05-12T05:32:42.301Z","repository":{"id":8086318,"uuid":"9500075","full_name":"ytti/oxidized","owner":"ytti","description":"Oxidized is a network device configuration backup tool. It's a RANCID replacement!","archived":false,"fork":false,"pushed_at":"2025-05-09T19:02:58.000Z","size":3260,"stargazers_count":2978,"open_issues_count":86,"forks_count":970,"subscribers_count":123,"default_branch":"master","last_synced_at":"2025-05-12T02:45:43.521Z","etag":null,"topics":["backup","network","nms","rancid"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ytti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"docs/Supported-OS-Types.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-04-17T14:50:06.000Z","updated_at":"2025-05-12T01:03:51.000Z","dependencies_parsed_at":"2024-02-19T09:51:22.215Z","dependency_job_id":"9adf1703-43d9-4d14-b608-120289b24bd6","html_url":"https://github.com/ytti/oxidized","commit_stats":{"total_commits":1722,"total_committers":389,"mean_commits":4.426735218508997,"dds":0.7288037166085947,"last_synced_commit":"39ac226d90cc5855e74bdd7906b90a627c11aa24"},"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytti","download_url":"https://codeload.github.com/ytti/oxidized/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672733,"owners_count":21945482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backup","network","nms","rancid"],"created_at":"2024-08-01T15:00:46.687Z","updated_at":"2025-05-12T05:32:42.274Z","avatar_url":"https://github.com/ytti.png","language":"Ruby","readme":"# Oxidized\n\n[![Build Status](https://github.com/ytti/oxidized/actions/workflows/ruby.yml/badge.svg)](https://github.com/ytti/oxidized/actions/workflows/ruby.yml)\n[![Gem Version](https://badge.fury.io/rb/oxidized.svg)](http://badge.fury.io/rb/oxidized)\n[![Join the chat at https://gitter.im/oxidized/Lobby](https://badges.gitter.im/oxidized/Lobby.svg)](https://gitter.im/oxidized/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nOxidized is a network device configuration backup tool. It's a RANCID replacement!\n\nIt is light and extensible and supports over 130 operating system types.\n\nFeature highlights:\n\n* Automatically adds/removes threads to meet configured retrieval interval\n* Restful API to a move node immediately to head-of-queue (GET/PUT /node/next/[NODE])\n* Syslog udp+file example to catch config change events (IOS/JunOS) and trigger a config fetch\n  * Will signal which IOS/JunOS user made the change, can then be used by output modules (via POST)\n  * The `git` output module uses this info - 'git blame' will show who changed each line\n* Restful API to reload list of nodes (GET /reload)\n* Restful API to fetch configurations (/node/fetch/[NODE] or /node/fetch/group/[NODE])\n* Restful API to show list of nodes (GET /nodes)\n* Restful API to show list of version for a node (/node/version[NODE]) and diffs\n\nCheck out the [Oxidized TREX 2014 presentation](http://youtu.be/kBQ_CTUuqeU?t=3h) video on YouTube!\n\n\u003e :warning: [Maintainer Wanted!](#help-needed) :warning:\n\u003e\n\u003e Is your company using Oxidized and has Ruby developers on staff? I'd love help from an extra maintainer!\n\n## Index\n\n1. [Supported OS Types](docs/Supported-OS-Types.md)\n2. [Installation](#installation)\n    * [Debian and Ubuntu](#debian-and-ubuntu)\n    * [Rocky Linux, Red Hat Enterprise Linux](#rocky-linux-red-hat-enterprise-linux)\n    * [FreeBSD](#freebsd)\n    * [Build from Git](#build-from-git)\n    * [Docker \u0026 Podman](docs/Docker.md)\n3. [Initial Configuration](#configuration)\n4. [Configuration](docs/Configuration.md)\n    * [Debugging](docs/Configuration.md#debugging)\n    * [Privileged mode](docs/Configuration.md#privileged-mode)\n    * [Disabling SSH exec channels](docs/Configuration.md#disabling-ssh-exec-channels)\n    * [Sources](docs/Sources.md)\n      * [Source: CSV](docs/Sources.md#source-csv)\n      * [Source: SQL](docs/Sources.md#source-sql)\n      * [Source: SQLite](docs/Sources.md#source-sqlite)\n      * [Source: Mysql](docs/Sources.md#source-mysql)\n      * [Source: HTTP](docs/Sources.md#source-http)\n    * [Outputs](docs/Outputs.md)\n      * [Output: GIT](docs/Outputs.md#output-git)\n      * [Output: GIT-Crypt](docs/Outputs.md#output-git-crypt)\n      * [Output: HTTP](docs/Outputs.md#output-http)\n      * [Output: File](docs/Outputs.md#output-file)\n      * [Output types](docs/Outputs.md#output-types)\n    * [Advanced Configuration](docs/Configuration.md#advanced-configuration)\n    * [Advanced Group Configuration](docs/Configuration.md#advanced-group-configuration)\n    * [Hooks](docs/Hooks.md)\n      * [Hook: exec](docs/Hooks.md#hook-type-exec)\n      * [Hook: githubrepo](docs/Hooks.md#hook-type-githubrepo)\n      * [Hook: awssns](docs/Hooks.md#hook-type-awssns)\n      * [Hook: slackdiff](docs/Hooks.md#hook-type-slackdiff)\n      * [Hook: xmppdiff](docs/Hooks.md#hook-type-xmppdiff)\n      * [Hook: ciscosparkdiff](docs/Hooks.md#hook-type-ciscosparkdiff)\n5. [Creating and Extending Models](docs/Creating-Models.md)\n6. [Help](#help)\n7. [Help Needed](#help-needed)\n8. [Ruby API](docs/Ruby-API.md#ruby-api)\n    * [Input](docs/Ruby-API.md#input)\n    * [Output](docs/Ruby-API.md#output)\n    * [Source](docs/Ruby-API.md#source)\n    * [Model](docs/Ruby-API.md#model)\n\n## Installation\n\n### Debian and Ubuntu\n\nDebian \"buster\" or newer and Ubuntu 17.10 (artful) or newer are recommended. On Ubuntu, begin by enabling the `universe`\nrepository (required for libssh2-1-dev):\n\n```shell\nadd-apt-repository universe\n```\n\nInstall the dependencies:\n\n```shell\napt-get install ruby ruby-dev libsqlite3-dev libssl-dev pkg-config cmake libssh2-1-dev libicu-dev zlib1g-dev g++ libyaml-dev\n```\n\nFinally, install Oxidized:\n\n```shell\ngem install oxidized\n```\n\nYou can also install one or both of the optional gems. They are not required\nto run Oxidized:\n```shell\ngem install oxidized-web    # Web interface and rest API\ngem install oxidized-script # Script-based input/output extensions\n```\n\n### Rocky Linux, Red Hat Enterprise Linux\nThese instructions has been verified on Rocky Linux 9.3 and Fedora.\n\nOn Rocky Linux 9, you need to install/enable EPEL, CRB and Ruby 3.1:\n```shell\ndnf install epel-release\ndnf config-manager --set-enabled crb\ndnf module enable ruby:3.1\n```\n\nThen you need the required packages for oxidized:\n```shell\ndnf -y install ruby ruby-devel sqlite-devel openssl-devel pkgconf-pkg-config  cmake libssh-devel libicu-devel zlib-devel gcc-c++ libyaml-devel which\n```\n\nFinally, install Oxidized:\n\n```shell\ngem install oxidized\n```\n\nYou can also install one or both of the optional gems. They are not required\nto run Oxidized:\n```shell\ngem install oxidized-web    # Web interface and rest API\ngem install oxidized-script # Script-based input/output extensions\n```\n\n### FreeBSD\nThese installation instructions have been tested on FreeBSD 14.2, but\noxidized itself has not been tested on it.\n\nFirst install ruby and rubyXX-gems (Find out the name of the package with `pkg search gems`):\n```shell\npkg instal ruby\npkg instal ruby32-gems\n```\n\nThen install the dependencies of oxidized an oxidized-web:\n```shell\npkg install ruby ruby-gems git sqlite3 libssh2 cmake pkgconf gmake\npkg install libyaml icu   # Dependencies for oxidized-web\n```\n\nFinally, install Oxidized:\n\n```shell\ngem install oxidized\n```\n\nYou can also install one or both of the optional gems. They are not required\nto run Oxidized:\n```shell\ngem install oxidized-web    # Web interface and rest API\ngem install oxidized-script # Script-based input/output extensions\n```\n\nOxidized is also available via [FreeBSD ports](https://ports.freebsd.org/cgi/ports.cgi?query=oxidized):\n\n```shell\npkg install rubygem-oxidized rubygem-oxidized-script rubygem-oxidized-web\n```\n\n### Build from Git\n\n```shell\ngit clone https://github.com/ytti/oxidized.git\ncd oxidized/\ngem install bundler\nrake install\n```\n\n### Running with Docker or Podman\nSee [docs/Docker.md](docs/Docker.md)\n\n## Configuration\n\nOxidized configuration is in YAML format. Configuration files are subsequently sourced from `/etc/oxidized/config` then `~/.config/oxidized/config`. The hashes will be merged, this might be useful for storing source information in a system wide file and  user specific configuration in the home directory (to only include a staff specific username and password). Eg. if many users are using `oxs`, see [Oxidized::Script](https://github.com/ytti/oxidized-script).\n\nIt is recommended practice to run Oxidized using its own username.  This username can be added using standard command-line tools:\n\n```shell\nuseradd -s /bin/bash -m oxidized\n```\n\n\u003e It is recommended __not__ to run Oxidized as root. After creating a dedicated user, switch to the oxidized user using su oxidized to ensure that Oxidized is run under the correct user context.\n\nTo initialize a default configuration in your home directory `~/.config/oxidized/config`, simply run `oxidized` once. If you don't further configure anything from the output and source sections, it'll extend the examples on a subsequent `oxidized` execution. This is useful to see what options for a specific source or output backend are available.\n\nYou can set the env variable `OXIDIZED_HOME` to change its home directory.\n\n```shell\nOXIDIZED_HOME=/etc/oxidized\n\n$ tree -L 1 /etc/oxidized\n/etc/oxidized/\n├── config\n├── log-router-ssh\n├── log-router-telnet\n├── pid\n├── router.db\n└── repository.git\n```\n\n## Source\n\nOxidized supports [CSV](docs/Configuration.md#source-csv),  [SQLite](docs/Configuration.md#source-sqlite), [MySQL](docs/Configuration.md#source-mysql) and [HTTP](docs/Configuration.md#source-http) as source backends. The CSV backend reads nodes from a rancid compatible router.db file. The SQLite and MySQL backends will fire queries against a database and map certain fields to model items. The HTTP backend will fire queries against a http/https url. Take a look at the [Configuration](docs/Configuration.md) for more details.\n\n## Outputs\n\nPossible outputs are either [File](docs/Configuration.md#output-file), [GIT](docs/Configuration.md#output-git), [GIT-Crypt](docs/Configuration.md#output-git-crypt) and [HTTP](docs/Configuration.md#output-http). The file backend takes a destination directory as argument and will keep a file per device, with most recent running version of a device. The GIT backend (recommended) will initialize an empty GIT repository in the specified path and create a new commit on every configuration change. The GIT-Crypt backend will also initialize a GIT repository but every configuration push to it will be encrypted on the fly by using `git-crypt` tool. Take a look at the [Configuration](docs/Configuration.md) for more details.\n\nMaps 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` is set to `true`.\n\nFirst create the directory where the CSV `output` is going to store device configs and start Oxidized once.\n\n```shell\nmkdir -p ~/.config/oxidized/configs\noxidized\n```\n\nNow 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:\n\n```yaml\nsource:\n  default: csv\n  csv:\n    file: ~/.config/oxidized/router.db\n    delimiter: !ruby/regexp /:/\n    map:\n      name: 0\n      model: 1\n```\n\nNow lets create a file based device database (you might want to switch to SQLite later on). Put your routers in `~/.config/oxidized/router.db` (file format is compatible with rancid). Simply add an item per line:\n\n```text\nrouter01.example.com:ios\nswitch01.example.com:procurve\nrouter02.example.com:ios\n```\n\nRun `oxidized` again to take the first backups.\n\n## Extra\n\n### Ubuntu init setup\n\nThe systemd service assumes that you have a user named 'oxidized' and that oxidized is in one of the following paths:\n\n```text\n/sbin\n/bin\n/usr/sbin\n/usr/bin\n/usr/local/bin\n```\n\n1. Copy systemd service file from extra/ folder to /etc/systemd/system\n\n```shell\nsudo cp extra/oxidized.service /etc/systemd/system\n```\n\n2. Setup `/var/run/`\n\n```shell\nmkdir /run/oxidized\nchown oxidized:oxidized /run/oxidized\n```\n\n3. Make oxidized start on boot\n\n```shell\nsudo systemctl enable oxidized.service\n```\n\n## Help\n\nIf you need help with Oxidized then we have a few methods you can use to get in touch.\n\n* [Gitter](https://gitter.im/oxidized/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) - You can join the Lobby on gitter to chat to other Oxidized users.\n* [GitHub](https://github.com/ytti/oxidized/) - For help and requests for code changes / updates.\n* [Forum](https://community.librenms.org/c/help/oxidized) - A user forum run by [LibreNMS](https://github.com/librenms/librenms) where you can ask for help and support.\n\n## Help Needed\n\nAs things stand right now, `oxidized` is maintained by very few people.\nWe would appreciate more individuals and companies getting involved in Oxidized.\n\nBeyond software development, documentation or maintenance of Oxidized, you could\nbecome a model maintainer, which can be done with little burden and would be a\nbig help to the community.\n\nInterested? Have a look at [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License and Copyright\n\n          Copyright\n          2013-2015 Saku Ytti \u003csaku@ytti.fi\u003e\n          2013-2015 Samer Abdel-Hafez \u003csam@arahant.net\u003e\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":["Software","Network Configuration Management","Ruby","OpsShit","network","Network Change Management","Tools","Online Parser","Uncategorized","Management and Automation"],"sub_categories":["Network Configuration Management","SD-WAN","NETCONF","TTP","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytti%2Foxidized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytti%2Foxidized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytti%2Foxidized/lists"}