oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Cisco Switches configs not fully backedup

Open IASAH opened this issue 1 year ago • 4 comments

I have Oxidized with Librenms installed via docker from https://github.com/dcbell/librenms-oxidized_docker and configured as followed

  • Docker network both are in the same network librenms-oxidized_default with mapped Ports for both and Working

  • In Librenms settings Poller both Port and Communities (priority) are configured.

  • In API Created New API key for Oxidized and copied it to Config file.

  • Then Librenms >> Global Settings>> External >> Oxidized is set and enabled like: Enable Oxidized support: Enabled URL to your Oxidized API: http://librenms_oxidized:8888 Enable config versioning access: Enabled Enable the return of groups to Oxidized: Enabled Set the default group returned: False

    In (Variable Mapping) I added: os = ios os < ios os = iosxe os < ios os = iosxr os < iosxr

  • In the Config file I modified as followed

---
username: [Switches Username]
password: [Switches Password]
model_map: {}
resolve_dns: true
interval: 3600
use_syslog: false
debug: false
run_once: false
threads: 30
use_max_threads: false
timeout: 60
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 0.0.0.0:8888
next_adds_job: false
vars: {}
groups: {}
group_map: {}
models:
  cisco-telnet:
    username: read_only
    password: iamclever123
    vars:
      enable: true
    input:
     default: telnet
     debug: true
  aoscx:
    username: [None]
    password: [None]
  procurve:
    username: [None]
    password: [None]
pid: "/home/oxidized/.config/oxidized/pid"
crash:
  directory: "/home/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
  file:
    directory: "/home/oxidized/.config/oxidized/configs"
  git:
    user: Oxidized
    email: [email protected]
    repo: "/home/oxidized/.config/oxidized/oxidized.git"
source:
  default: http
  debug: false
  http:
    insecure: true
    url: http://librenms:8000/api/v0/oxidized
    map:
      name: hostname
      model: os
      group: group
    headers:
      X-Auth-Token: [Token From My Librenms]
                                                         

the result I get in Librenms Oxidized Configuration is only information about the switches like hardware and software versions but no configuration included even in the Oxidized web GUI the same no configuration Can any one Help.

IASAH avatar Sep 19 '24 06:09 IASAH

Have you tried this? Also please use

```yaml
    config
``` .

as it is hard to read otherwise

In your case it seems like you should try this:

Troubleshooting an overly greedy prompt:

Log in manually into the device. Use the same username and password or key configured for Oxidized. Execute the last command (which may be the first command to run) from which partial output is collected.

Compare the output to the partial output collected by Oxidized, focusing on the the difference that has been truncated. You can evaluate if this output could have matched the prompt regexp unexpectedly with IRB in a manner similar to the outlined in the previous section.

Adapt the prompt regexp to be more conservative if necessary in a local model override file.

We encourage you to submit a PR for any prompt issues you encounter.

skiera6 avatar Sep 19 '24 13:09 skiera6

excuse my delayed replay I found that Oxidized is executing all pre (enable command) commands without issue but it doesn't execute the (enable Command) so I added (enable Command) password in vars: enable: 'my switch enable password' but nothing changes can anyone till me what do I need to do els?

IASAH avatar Oct 07 '24 07:10 IASAH

(Updated Issue for readability)

robertcheramy avatar Oct 08 '24 05:10 robertcheramy

Can you post your full modified config again? I have the impression you may have defined the enable variable twice (under model and globally). You can see what oxidized does by setting input.debug = true:

input:
  default: ssh, telnet
  debug: true

For each device, it will make a log under /home/oxidized/.config/oxidized/logs/. You can see there if oxidized sends the enable password or not.

robertcheramy avatar Oct 08 '24 05:10 robertcheramy

This issue is stale because it has been open 90 days with no activity.

github-actions[bot] avatar Jan 07 '25 02:01 github-actions[bot]

Issue closed as there has been no reaction from the user.

robertcheramy avatar Jan 07 '25 08:01 robertcheramy