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

Model settings preferred over group settings #3058

Open
shoeb17 opened this issue Feb 9, 2024 · 0 comments · May be fixed by #3105
Open

Model settings preferred over group settings #3058

shoeb17 opened this issue Feb 9, 2024 · 0 comments · May be fixed by #3105
Labels

Comments

@shoeb17
Copy link

shoeb17 commented Feb 9, 2024

Hi Guys,

I have deployed Oxidized and it is working great except for one of the things where the model settings are preferred over group settings. I am using groups just to categorize the devices based on internal departments and then the models are used for vendor/model specific settings/creds as those are fairly consistent across departments. However, there is one group(or department) where the creds for specific model (in this case asa) are different. I want the group settings to be preferred for that model. But it seems that the creds defined under model are being used instead.

Here is my config file ->

---
username: uname
password: 12345
model:
resolve_dns: true
interval: 3600
use_syslog: true
log: /home/oxidized/.config/oxidized/logs/
debug: false
threads: 30
use_max_threads: false
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars: {}
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
  git:
    user: oxidized
    email: oxidized@oxidized.local
    repo: "~/.config/oxidized/oxidized.git"
source:
  default: csv
  csv:
    file: /home/oxidized/.config/oxidized/router.db
    delimiter: !ruby/regexp /:/
    map:
      name: 0
      model: 1
      group: 2
      username: 3
      password: 4
groups:
  Department1:
    models:
      asa:
        username: dpt1user
        password: dpt1pass
        vars:
          enable: dpt1enable
models:
  ios:
    username: uname
    password: 12345
    vars:
      enable: 56789
  asa:
    username: uname
    password: 12345
    vars:
      enable: 56789
  panos:
    username: panuser
    password: panpass

router.db file -->

Device1:asa:Department1
Device2:ios:Department1
Device3:panos:Department1
Device4:asa:Department2
Device5:ios:Department2
Device6:panos:Department2
Device7:asa:Department3
Device8:ios:Department3
Device9:panos:Department3

Logs -->
Department1/Device1 status no_connection, retry attempt 1
10.10.10.10 raised Net::SSH::AuthenticationFailed with msg "Authentication failed for user uname@10.10.10.10"
Department1/Device1 status no_connection, retry attempt 2
10.10.10.10 raised Net::SSH::AuthenticationFailed with msg "Authentication failed for user uname@10.10.10.10"
Department1/Device1 status no_connection, retry attempt 3
10.10.10.10 raised Net::SSH::AuthenticationFailed with msg "Authentication failed for user uname@10.10.10.10"
Department1/Device1 status no_connection, retries exhausted, giving up

Here Device1 should use creds dpt1user/dpt1pass but it still uses uname/12345.
Any suggestions on what I am missing or how I can make this work?

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