? No i didn´t. i asked specifically how a request is done to oxidized with the groups feature. And the answer matched my bug> without the group on the request URL it does not work. you said that /node/show/NODE works with groups enabled on your setup. so it seem to me that is your setup that is not “compliant” with the scenario (sorry if it´s not the best word)
can you post the json code that yo get in return? on my case i just get a node not found response. maybe that cold be it?
or maybe is something how I´m doing the groups? i´m doing by OS. how are you doing yours?
For node/show/$node:
{:name=>"sw01",
:full_name=>"default/sw01",
:ip=>"192.168.90.250",
:group=>"default",
:model=>"IOS",
:last=>
{:start=>2017-07-01 19:04:50 UTC,
:end=>2017-07-01 19:04:59 UTC,
:status=>:success,
:time=>9.171980786},
:vars=>nil}
but are you not using groups? default group on oxidized is when there are no groups. i’m confused. can you get the info from a node from a group different than default?
Why don’t you show what yours says seeing as it’s yours that we’re trying to debug
i get a node not found…becase with just node it is expecting the group, like ytti said. and you can check my access log that i posted before.
This is for node/show/$node? You need to forget your proxy for now and test directly.
As per the response from ytti in my paste, node/show doesn’t need a group. node/fetch does if it’s using groups.
the proxy is a simply reverse proxy (apache)but yes for node/show/$node directly on the port running oxidized i get a node not found. even on the browser with oxidized-web, if I remove the group from the url i get a node not found.
I really don’t know what else I can say, using groups that’s not what happens for me and from speaking to ytti, what I see is how it’s supposed to work
Looking at the code also confirms this:
Disable single repo it is buggy. That will lose your history unless you migrate them to the new repo.
i think it should be because of this that your tests work
if you try with a different group name on your devices, you will confirm that it won´t work for you also.
@murrant yes, in these searches on oxidized that single_repo has had issues, but i cannot change that now, i have several scripts|parsers that use the same git repo:/
but in this case I think (again, noob coder) it should be a case of adding the group to the node show request here (that I cannot find anywhere):
That’s fine the bug may have been fixed since I had an issue.
I added some debug code to the configs page to log all urls fetched.
I use groups to supply passwords on the oxidized side of things.
Fetching: http://127.0.0.1:8888/node/show/algona.rtr.domain.net?format=json
Fetching: http://127.0.0.1:8888/node/version?node_full=Algona/algona.rtr.domain.net&format=json
Fetching: http://127.0.0.1:8888/node/version/view?node=algona.rtr.domain.net&group=Algona&oid=a7d6c838e25b1bf20685b5c59966c0976bcdcfd6&date=&num=8&format=text
These all work correctly for me.
In my librenms config.php:
$config['oxidized']['group']['hostname'][] = array('regex' => '/^algona/', 'group' => 'Algona');
In my oxidized config:
source:
default: http
http:
url: https://nms.domain.net/api/v0/oxidized
scheme: https
delimiter: !ruby/regexp /:/
map:
name: hostname
model: os
group: group
headers:
X-Auth-Token: 'TOKEN'
rest: 127.0.0.1:8888
output:
default: git
git:
user: Oxidized
email: [email protected]
repo: /var/lib/oxidized/devices.git
groups:
Algona:
username: <username>
password: <password>