Comments (9)
do you still have the problem with the master branch?
from netbox-agent.
i just installed this on a new node (with pip3 install..). it should be the master branch.
from netbox-agent.
the full error message:
root@server-xx-xx:~# netbox_agent -c /etc/netbox_agent.yml --register --debug
Datacenter: SOMEDATACENTER
Netbox Datacenter: None
Rack: K3
Traceback (most recent call last):
File "/usr/local/bin/netbox_agent", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/cli.py", line 44, in main
return run(config)
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/cli.py", line 36, in run
server.print_debug()
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/server.py", line 299, in print_debug
print('Netbox Rack:', self.get_netbox_rack())
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/server.py", line 91, in get_netbox_rack
site_id=self.get_netbox_datacenter().id,
AttributeError: 'NoneType' object has no attribute 'id'
from netbox-agent.
pip3 install doesn't install the master branch but the latest release
from what I understand, you don't have any datacenter which slugs equals SOMEDATACENTER
is that correct ?
from netbox-agent.
Okay, so i use the latest release...
Regarding the data:
root@server-k3-05:~# more /etc/qualification
DATACENTER: SOMEDATACENTER
RACK: K3
TENANT: provider
i didn't found a way to define netboxdatacenter
and i used the respective parts in netbox.yaml:
from netbox-agent.
the datacenter is found with a search based on the slug
attribute in Netbox
is your datacenter's slug attribute SOMEDATACENTER
?
from netbox-agent.
on /api/dcim/sites the slug is 'somedatacenter-ltd' and actually in /etc/qualification it is also lowercase.
strangely it does write uppercase "SOMEDATACENTER" and not "somedatacenter-ltd"
in the api :
"name": "Somedatacenter-ltd",
"slug": "somedatacenter-ltd",
But where is the definition (or where do you setup the " Netbox Datacenter and Netbocx Rack" ?
from netbox-agent.
Well. I sorted this out: "| tr [a-z] [A-Z]" does lower to uppercase transformation. bad for slugs.
it kinda works, but when updating:
DEBUG:urllib3.connectionpool:http://netbox.xxxxx:80 "GET /api/dcim/sites/?slug=somedatacenter-ltd HTTP/1.1" 200 798
Traceback (most recent call last):
File "/usr/local/bin/netbox_agent", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/cli.py", line 44, in main
return run(config)
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/cli.py", line 39, in run
server.netbox_create_or_update(config)
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/server.py", line 287, in netbox_create_or_update
ret, server = self.update_netbox_location(server)
File "/usr/local/lib/python3.5/dist-packages/netbox_agent/server.py", line 72, in update_netbox_location
if rack and server.rack and server.rack.id != nb_rack.id:
AttributeError: 'NoneType' object has no attribute 'id'
from netbox-agent.
it's just a config example, but you're right I should change the example from uppercase to lowercase
In the master version, I've added more checks for location
it'd be better if you could test with it so you have a better error
thanks
from netbox-agent.
Related Issues (20)
- Interfaces in virtual machines need to use different endpoint HOT 3
- the script cannot create an ip address HOT 2
- how to integrate automatic scanning/discovery in HP enclosures:blades ? HOT 1
- Project dependencies may have API risk issues HOT 3
- netbox 3.3.9 HOT 3
- A brief description of the fields in netbox_agent.yaml that netbox-agent can work with. HOT 2
- serial: This field may not be null. (on disks?) HOT 1
- detailed project dependencies needed. HOT 1
- Problem adding interfaces HOT 1
- lldm.py return error: current_dict[final] = value, TypeError HOT 3
- (config.py): no verify ssl doesnt parse with python<3.9 HOT 2
- Error when querying VLANs that are duplicated across datacenters | ValueError: get() returned more than one result HOT 1
- AttributeError: 'NoneType' object has no attribute 'id' HOT 2
- [Feature] Create Site if not exists
- Error installing HOT 1
- inventory remote machines HOT 1
- Supermicro only baseboard serial number set
- netbox_agent==0.7.2 not available on pip HOT 4
- netbox_agent: error: Problems parsing config :: while parsing a block mapping HOT 2
- Proyect hasn't been updated in a year. Anyone know of a current fork? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netbox-agent.