Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cisco Switches configs not fully backedup #3274

Open
IASAH opened this issue Sep 19, 2024 · 4 comments
Open

Cisco Switches configs not fully backedup #3274

IASAH opened this issue Sep 19, 2024 · 4 comments

Comments

@IASAH
Copy link

IASAH commented Sep 19, 2024

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: o@example.com
    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.

@skiera6
Copy link

skiera6 commented Sep 19, 2024

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.

@IASAH
Copy link
Author

IASAH commented Oct 7, 2024

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?

@robertcheramy
Copy link
Collaborator

(Updated Issue for readability)

@robertcheramy
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants