ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.79k stars 922 forks source link

input debug #1713

Closed Moonbeam4520 closed 5 years ago

Moonbeam4520 commented 5 years ago

I added debug:true in the config, but there is nothing in the logs folder. What am I doing wrong ? here is the complete config :

---
username: admin 
password: REDACTED
model: comware 
resolve_dns: false
# 2 heures 
interval: 7200 
use_syslog: false
debug: true
threads: 30
timeout: 100
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars: {}
groups:
  privilege:
    vars:
      comware_cmdline: "512900"
  nortel:
    input:
      default: telnet
      debug: true
models: {}
pid: "/var/lib/oxidized/.config/oxidized/pid"
crash:
  directory: "/var/lib/oxidized/.config/oxidized/crashes"
  hostnames: false
stats:
  history_size: 10
input:
  default: ssh, telnet
  debug: true
  ssh:
    secure: false
  ftp:
    passive: true
  utf8_encoded: true
output:
  default: git
  git:
    user: oxidized
    email: REDACTED
    repo: "/var/lib/oxidized/configs/git/default.git"
source:
  default: csv
  csv:
    file: "/var/lib/oxidized/.config/oxidized/router.db"
    delimiter: !ruby/regexp /:/
    map:
      name: 0
      ip: 1
      model: 2
      group: 3
      username: 4
      password: 5
model_map:
  cisco: ios
  juniper: junos

the output of oxidized :

I, [2019-02-25T10:01:51.672722 #23711]  INFO -- : Oxidized starting, running as pid 23711
I, [2019-02-25T10:01:51.673503 #23711]  INFO -- : lib/oxidized/nodes.rb: Loading nodes
D, [2019-02-25T10:01:51.673677 #23711] DEBUG -- : resolving DNS for REDACTED...
D, [2019-02-25T10:01:51.673735 #23711] DEBUG -- : IPADDR X.X.X.X
D, [2019-02-25T10:01:51.673887 #23711] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'boss'
D, [2019-02-25T10:01:51.673950 #23711] DEBUG -- : node.rb: setting node key 'model' to value 'comware' from global
D, [2019-02-25T10:01:51.674035 #23711] DEBUG -- : node.rb: returning node key 'model' with value 'boss'
D, [2019-02-25T10:01:51.674094 #23711] DEBUG -- : lib/oxidized/node.rb: Loading model "boss"
D, [2019-02-25T10:01:51.674773 #23711] DEBUG -- : lib/oxidized/model/model.rb Added  to the commands list
D, [2019-02-25T10:01:51.674835 #23711] DEBUG -- : lib/oxidized/model/model.rb Added en to the commands list
D, [2019-02-25T10:01:51.674884 #23711] DEBUG -- : lib/oxidized/model/model.rb Added show sys-info to the commands list
D, [2019-02-25T10:01:51.674932 #23711] DEBUG -- : lib/oxidized/model/model.rb Added show stack-info to the commands list
D, [2019-02-25T10:01:51.674991 #23711] DEBUG -- : lib/oxidized/model/model.rb Added show running-config to the commands list
D, [2019-02-25T10:01:51.675331 #23711] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh, telnet' and node value ''
D, [2019-02-25T10:01:51.675407 #23711] DEBUG -- : node.rb: setting node key 'input' to value '#<Asetus::ConfigStruct:0x000000022c3290>' from group
D, [2019-02-25T10:01:51.675465 #23711] DEBUG -- : node.rb: returning node key 'input' with value '#<Asetus::ConfigStruct:0x000000022c3290>'
D, [2019-02-25T10:01:51.675530 #23711] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value ''
D, [2019-02-25T10:01:51.675599 #23711] DEBUG -- : node.rb: returning node key 'output' with value 'git'
D, [2019-02-25T10:01:51.702773 #23711] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value ''
D, [2019-02-25T10:01:51.702862 #23711] DEBUG -- : node.rb: setting node key 'username' to value 'admin' from global
D, [2019-02-25T10:01:51.702924 #23711] DEBUG -- : node.rb: returning node key 'username' with value ''
D, [2019-02-25T10:01:51.702989 #23711] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value ''
D, [2019-02-25T10:01:51.703042 #23711] DEBUG -- : node.rb: setting node key 'password' to value 'password' from global
D, [2019-02-25T10:01:51.703098 #23711] DEBUG -- : node.rb: returning node key 'password' with value ''
I, [2019-02-25T10:01:51.703230 #23711]  INFO -- : lib/oxidized/nodes.rb: Loaded 1 nodes
D, [2019-02-25T10:01:52.010622 #23711] DEBUG -- : lib/oxidized/core.rb: Starting the worker...
D, [2019-02-25T10:01:52.016418 #23711] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1
D, [2019-02-25T10:01:52.017244 #23711] DEBUG -- : lib/oxidized/worker.rb: Added nortel/REDACTED to the job queue
D, [2019-02-25T10:01:52.018497 #23711] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for REDACTED at 2019-02-25 09:01:52 UTC
D, [2019-02-25T10:01:52.021036 #23711] DEBUG -- : lib/oxidized/job.rb: Config fetched for REDACTED at 2019-02-25 09:01:52 UTC
D, [2019-02-25T10:01:52.018545 #23711] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
Puma starting in single mode...
* Version 3.11.4 (ruby 2.1.5-p273), codename: Love Song
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://127.0.0.1:8888
Use Ctrl-C to stop
W, [2019-02-25T10:01:53.026607 #23711]  WARN -- : nortel/REDACTED status fail, retry attempt 1
D, [2019-02-25T10:01:53.026720 #23711] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1
D, [2019-02-25T10:01:53.027304 #23711] DEBUG -- : lib/oxidized/worker.rb: Added nortel/REDACTED to the job queue
D, [2019-02-25T10:01:53.027347 #23711] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
D, [2019-02-25T10:01:53.027477 #23711] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for REDACTED at 2019-02-25 09:01:53 UTC
D, [2019-02-25T10:01:53.027618 #23711] DEBUG -- : lib/oxidized/job.rb: Config fetched for REDACTED at 2019-02-25 09:01:53 UTC
W, [2019-02-25T10:01:54.027832 #23711]  WARN -- : nortel/REDACTED status fail, retry attempt 2
D, [2019-02-25T10:01:54.027928 #23711] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1
D, [2019-02-25T10:01:54.028039 #23711] DEBUG -- : lib/oxidized/worker.rb: Added nortel/REDACTED to the job queue
D, [2019-02-25T10:01:54.028276 #23711] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for REDACTED at 2019-02-25 09:01:54 UTC
D, [2019-02-25T10:01:54.028375 #23711] DEBUG -- : lib/oxidized/job.rb: Config fetched for REDACTED at 2019-02-25 09:01:54 UTC
D, [2019-02-25T10:01:54.028075 #23711] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
W, [2019-02-25T10:01:55.028762 #23711]  WARN -- : nortel/REDACTED status fail, retry attempt 3
D, [2019-02-25T10:01:55.028852 #23711] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1
D, [2019-02-25T10:01:55.028976 #23711] DEBUG -- : lib/oxidized/worker.rb: Added nortel/REDACTED to the job queue
D, [2019-02-25T10:01:55.029172 #23711] DEBUG -- : lib/oxidized/job.rb: Starting fetching process for REDACTED at 2019-02-25 09:01:55 UTC
D, [2019-02-25T10:01:55.029285 #23711] DEBUG -- : lib/oxidized/worker.rb: 1 jobs running in parallel
D, [2019-02-25T10:01:55.029452 #23711] DEBUG -- : lib/oxidized/job.rb: Config fetched for REDACTED at 2019-02-25 09:01:55 UTC
W, [2019-02-25T10:01:56.029851 #23711]  WARN -- : nortel/REDACTED status fail, retries exhausted, giving up
D, [2019-02-25T10:01:56.029944 #23711] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 1 of 1
D, [2019-02-25T10:01:56.030005 #23711] DEBUG -- : lib/oxidized/worker.rb: Running :nodes_done hook
D, [2019-02-25T10:01:57.030196 #23711] DEBUG -- : lib/oxidized/worker.rb: Jobs running: 0 of 1 - ended: 0 of 1

also it seems to be resolving DNS while reslove_dns is set to false

Moonbeam4520 commented 5 years ago

So if I add clients it generates logs just fine for ssh sessions, but nothing for the telnet sessions

Moonbeam4520 commented 5 years ago

The issue was the group variables, i removed the section and now it generate logs. Is there a way to test the config or to have an error message when the config is invalid ?