ytti / oxidized-web

Web UI + RESTful API for Oxidized
120 stars 72 forks source link

ArgumentError at /nodes comparison of String with nil failed #262

Closed t-sultanov closed 5 months ago

t-sultanov commented 6 months ago

Hello. I am using oxidized + oxidized-web. Using source - netbox. Output - file (with git error the same) Oxidized used for backup comware, mellanox. Last changes i added palo alto firewalls, as i see in /logs folder config was fetched successfully. As i understand some problem with oxidized-web.

Bellow error log from web interface:

ArgumentError at /nodes
comparison of String with nil failed
file: nodes.haml location: sort_by line: 30 

My config:

username: xxxxxxxxx
password: xxxxxxxxx
model: junos
resolve_dns: false
interval: 3600
log: ~/.config/oxidized/log
use_syslog: false
debug: true
run_once: false
threads: 30
use_max_threads: false
timeout: 40
retries: 2
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
next_adds_job: false
vars: {}
groups: {}
group_map: {}
models: {}
pid: "/home/oxidized/.config/oxidized/pid"
crash:
  directory: "/home/oxidized/.config/oxidized/crashes"
  hostnames: false
stats:
  history_size: 10
input:
  default: ssh
  debug: true
  ssh:
    secure: false
  ftp:
    passive: true
  utf8_encoded: true

output:
  default: file
  file:
    directory: "/home/oxidized/.config/oxidized/configs"

#output:
#  default: git
#  git:
#    user: oxidized
#    email: oxidized@xxxxxxxxxx
#    repo: "/home/oxidized/.config/oxidized/configs/devices.git"

source:
  default: http
  http:
    url: 'https://netbox-xx.xx/api/dcim/devices/?status=active&role_id=3&role_id=2&role_id=6'
    scheme: https
    secure: false
    delimiter: !ruby/regexp /:/
    headers:
      Authorization: 'Token xxxxxxxxxxxxxxxxxxxxxxxx'
    map:
      name: name
      model: platform.name
      ip: primary_ip.address

    hosts_location: results
    pagination: true
    pagination_key_name: 'next'
    gpg: false
vars:
  auth_methods: [ "none", "publickey", "password", "keyboard-interactive" ]
  ssh_no_exec: true
  ssh_no_keepalive: true
model_map:
  aruba: aoscx
  aruba: aaosw
  juniper: junos
  cisco: ios
  cisco: iosxr
  hp: comware
  hp: procurve
  mellanox: mlnxos
  mikrotic: routeros
  dell: powerconnect
  dell: os10
  eltex: eltex
  cumulus: cumulus
  palo alto: panos_api
  palo alto: panos
  qtech: qtech
  brocade: fabricos
robertcheramy commented 6 months ago

(Issue edited for readability)

robertcheramy commented 6 months ago

See https://github.com/ytti/oxidized/issues/2222 This happens when no group is defined. Will be fixed in next oxidized release.

robertcheramy commented 5 months ago

This Issue has been fixed upstream.