Where are switch configs held locally?

Hello,

I’ve managed to get Oxidized setup and backing up switches with versioning.

  1. Where do I set how many versions we keep?
  2. Plus where are the configs for each switch saved locally please?
  3. If I need to backup extreme switches is there any information on what I need to edit in the config. I couldn’t see an example on the github page.

Oddly I’m only backing up Cisco, but the config is set to as model: junos is that ok?

This is my config using git:

---
username: user
password: password
model: junos
resolve_dns: true
interval: 86400
use_syslog: false
debug: false
run_once: false
threads: 30
use_max_threads: false
timeout: 60
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars: {}
groups: {}
group_map: {}
models: {}
pid: "/opt/oxidized/.config/oxidized/pid"
crash:
  directory: "/opt/oxidized/.config/oxidized/crashes"
  hostnames: false
stats:
  history_size: 10
input:
  default: ssh, telnet
  debug: false
  ssh:
    secure: false
  ftp:
    passive: true
  utf8_encoded: true
output:
  default: git
  git:
      user: Oxidized
      email: [email protected]
      repo: "~/.config/oxidized/oxidized.git"
source:
  default: csv
  csv:
    file: "/opt/oxidized/.config/oxidized/router.db"
    delimiter: !ruby/regexp /:/
    map:
      name: 0
      model: 1
    gpg: false
model_map:
  juniper: junos
  cisco: ios
  1. You can’t. You are using git as the backend so until you clear out the repo it will just maintain versions for life.
  2. configs are stored in ~/.config/oxidized/oxidized.git as per your config. That’s a bare git repo though so you need to check it out somewhere else to see the files. Google git bare repo to learn more.
  3. You need to set the model of the device to the relevant OS within Oxidized, a list of these are in: oxidized/lib/oxidized/model at master · ytti/oxidized · GitHub

Thanks, I’ll look into point 2. I’ve new to git repos, so can I git repo to another folder locally to keep the configs there?

Something different, but I managed to push the Oxidized website into Grafana now so we see it all on another dashboard. It can do alerts. However can Oxidized send Team alerts if a backup fails?

Read more about git bare repos to understand what’s going on.

Teams has support, the file is in oxidized/extra at master · ytti/oxidized · GitHub, docs might not be great so look at some of the previous github issues for guidance.

1 Like

Thank you for this, appreciated.

I think I’m going mad, I used this to build Oxidized. However I can’t seem to locate, the below to edid the ‘gitdiff-msteams.sh’:

/var/lib/oxidized/extra/

or

/etc/oxidized

Can you think where else it might put all this?

When I search - gems/3.2.0/gems/oxidized-0.31.0/extra/gitdiff-msteams.sh

It’s on git, I linked to the directory just download the raw file from there.

Yes thanks for that, what I mean is I’ve got that file from git, but noticed I don’t have the path:

/var/lib/oxidized/extra/

Nothing called Oxidized in /var/lib/ and assumed I should have, so do we manually create these 2 folders and put that file in there?

Once in there what triggers it to run? I manually ran it and I got a test alert from Teams, but I get nothing if I run a backup or if there are any differences to a backup?

Thanks

Put it where you want, it’s just an example

1 Like

All working now thanks.