Giter Club home page Giter Club logo

Comments (8)

Dazza0311 avatar Dazza0311 commented on August 17, 2024 1

I eventually got it working:

source:
default: http
http:
url: https://url/api
scheme: https
delimiter: !ruby/regexp /:/
user: username
pass: password
read_timeout: 120
map:
name: hostname
model: os
username: username
password: password
vars_map:
enable: enable
headers:
X-Auth-Token: 'somerandomstring'

just had to add a bit more but got it working, thanks for the guidance!

from oxidized.

yoakim avatar yoakim commented on August 17, 2024

Posting your config would be a great start, mask out sensitive parts.

from oxidized.

Dazza0311 avatar Dazza0311 commented on August 17, 2024

config

here we go

from oxidized.

yoakim avatar yoakim commented on August 17, 2024

Maybe your source section is indented wrong, this is my config:

source:
  default: http
  http:
    url: URL
    scheme: http
    delimiter: !ruby/regexp /:/
    read_timeout: 120
    map:
      name: hostname
      ip: ip
      model: os
    vars_map:
      enable: enable

from oxidized.

Dazza0311 avatar Dazza0311 commented on August 17, 2024

how does it connect to LibreNMS though without the Auth Token?

from oxidized.

yoakim avatar yoakim commented on August 17, 2024

Oh sorry, my example doesnt use any token in the header. I just ment you should try to fix the indents accordingly.
From URL and down, indent it one step

from oxidized.

Dazza0311 avatar Dazza0311 commented on August 17, 2024

Tried to edit it but still got the same error, this seems like an issue with Ruby to be honest. It's like it does not know how to handle the method for url

from oxidized.

yoakim avatar yoakim commented on August 17, 2024

I tried to reproduce it and was successful in doing so:
oxidized_1 | /var/lib/gems/3.0.0/gems/oxidized-0.29.1/lib/oxidized/source/http.rb:9:in `setup': undefined method `url' for nil:NilClass (NoMethodError)

This was when my indentation was wrong, when i fixed it, it worked.

My two scenarios:
Not working:

source:
  default: http
  http:
  url: $OXIDIZED_SRC_API_URL
  scheme: http
  delimiter: !ruby/regexp /:/
  read_timeout: 120
  map:
    name: hostname
    ip: ip
    model: os
  vars_map:
    enable: enable

Working:

source:
  default: http
  http:
    url: $OXIDIZED_SRC_API_URL
    scheme: http
    delimiter: !ruby/regexp /:/
    read_timeout: 120
    map:
      name: hostname
      ip: ip
      model: os
    vars_map:
      enable: enable

from oxidized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.