Groups by Vendor

Bar the actual location, yes that’s what I have.

What version of Oxidized? I only updated ours to the latest one last week so it’s current and working as expected.

Oh, but to cover off, that’s not what we are doing, as above:

"A call to /node/show/NODE - this isn’t dependent on the groups. We then use that response to build the url, this includes the groups then.

We’re using groups at work and I don’t have an issue with viewing configs in LibreNMS. It does take a while which I need to look into but that could be the size of the git repo now, 450Mb>"

that is my issue, on my setup librenms is not using the group to build the url:

10.189.0.90 - - [19/Jun/2017:10:53:51 +0100] “GET /node/show/router01?format=json HTTP/1.0” 500 148362 “-” "-"
10.189.0.90 - - [19/Jun/2017:10:53:51 +0100] “GET /node/version?node_full=router01&format=json HTTP/1.0” 500 114688 “-” "-"
10.189.0.90 - - [19/Jun/2017:10:53:51 +0100] “GET /node/fetch/router01 HTTP/1.0” 500 148049 “-” “-”

this log is of access.log of oxidized machine.

That’s giving you a 500, are you sure your install is 100% working.

?
It is giving the 500 because librenms is not adding the group to the URL, so it does not find the node.
That is my issue with group support since the beginning of the thread.
Can you post here your access log please?
to compare?
just go to config tab on any host on librenms and it does a request to oxidized.
you should see on the access log of nginx/apache the URL request.
Am I´m not being clear on something?

You are being clear but I’m saying I don’t have that issue at all, /node/show/NODE works for me on the latest install.

I’ve also got an older install and this works there as well. What happens when you go to that url directly in Oxidized and bypass your web servers proxy?

Same issue, oxidized 0.20.0 and oxidized web 0.9.1. without proxy if the get request on the URL does not have the group it returns node not found. and if im being sincere it makes sense to do so, because when i do a git checkout, it creates the folder with the vendor name. are you creating a map on the oxidized config? with the the vendor on the router.db file?

are you using single_repo = true on your oxidized config? it could be that…

Yes I do use single_repo: true

Feel free to post your oxidized config and I’ll test with it.

can´t seem to figure this out:confused:

sure, here:

interval: 14400
use_syslog: false
debug: false
log: /root/.config/oxidized/logs/oxidized.log
threads: 30
timeout: 120
retries: 1
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:5002
rest_hide_enable: true
vars:
remove_secret: true
groups: {}
pid: /root/.config/oxidized/pid
input:
default: ssh, telnet
debug: false
ssh:
secure: false
output:
default: git
git:
user: oxidized
email: [email protected]
single_repo: true
repo: "/app/device_backups/git"
source:
default: csv
csv:
file: /root/.config/oxidized/router.db
delimiter: !ruby/regexp /:confused:
map:
name: 0
ip: 1
model: 2
group: 3
username: 4
password: 5
vars_map:
enable: 6

hooks:
email_output:
type: exec
events: [post_store, node_fail]
cmd: '/root/.config/oxidized/mailer /app/device_backups/checkout | mail -r [email protected] -s “Configuration updates for ${OX_NODE_NAME}” [email protected]
async: true
timeout: 120

That works for me :frowning: I’ve not added the hooks config option but here’s what I used:

https://p.libren.ms/view/f51079e4

gem list --local oxidized

*** LOCAL GEMS ***

oxidized (0.20.0, 0.18.0, 0.16.2, 0.14.1, 0.7.2)
oxidized-script (0.4.0, 0.3.1, 0.2.0, 0.1.2, 0.1.1)
oxidized-web (0.9.1, 0.7.1, 0.7.0, 0.4.0)

Version running is the first in each of those lists.

*** LOCAL GEMS ***

oxidized (0.20.0, 0.19.0)
oxidized-script (0.4.0, 0.3.1)
oxidized-web (0.9.1, 0.8.0)
I have these one.

Can you just put the oxidized behind a proxy and check the access log? if on yours it builds the URL? or does something else that posts the correct info?

I don’t have the time to go that far.

What config options have you enabled in LibreNMS?

for oxidized? these:

$config[‘oxidized’][‘group’][‘os’][] = array(‘match’ => ‘dnos’, ‘group’ => ‘dell’);
$config[‘oxidized’][‘group_support’] = true;
$config[‘oxidized’][‘enabled’] = true;
$config[‘oxidized’][‘url’] = ‘http://oxidized.netsec.example.com’;
$config[‘oxidized’][‘features’][‘versioning’] = true;

Still works for me with all of those options. I really don’t know what else to suggest now.

Going directly to the oxidized webui I can browse:

http://librenms01:5002/node/show/sw01
and then
http://librenms01:5002/node/fetch/cisco/sw01

Ill try to check directly with oxidized, because I cannot go directly to the node.

Have you tried directly rather than through a proxy?

yup:/ which is why it´s strange, both via the browser and trough librenms

the plot thickens. oxidized does not support fetch without groups.

You’ve asked the wrong question :frowning:

I just spoke to ytti on irc to confirm what we do is right:

laf> So let me try this instead. In LibreNMS we hit /node/show/$NODE
18:58 <laf> which then returns some json, we use this to then build the next call which does include the groups /node/fetch/$GROUP/$NODE
18:58 <laf> Does that seem right to you?
18:58 <ytti> seems good to me
18:58 <ytti> except if there is no group
18:59 <laf> If no group we don't send it
18:59 <ytti> that should work

So how we currently build the queries is correct and how I see it on three installs I’ve tested.