Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A brief description of the fields in netbox_agent.yaml that netbox-agent can work with. #269

Open
Lozbik opened this issue Mar 20, 2023 · 2 comments

Comments

@Lozbik
Copy link

Lozbik commented Mar 20, 2023

I'm just getting started with netbox-agent and can't figure out the fields in the netbox_agent.yaml file. I figured out how to connect the agent to the server. However, I could only transfer: role and 1 interface (L0) without an ip address. Is there an example of filling in the netbox_agent.yaml file? Or documentation on its fields? This is my config file right now and I just have no idea how to add new variable fields because the names I tried to use don't work. And the fields that are described in the template configuration file are not enough.

This my conf file now:

screen netbox-agent-conf

@Solvik
Copy link
Owner

Solvik commented Mar 22, 2023

Hi @Lozbik

The role is what will be used as a Netbox Device Role, for example:
image
Screenshot 2023-03-22 at 20 03 32

You can look at your existing roles under https://netbox.foo.com/dcim/device-roles/

For IP addresses, the default behavior of the agent is to ignore dummy/docker interfaces and 127.0.0.X interfaces

network:
  # Regex to ignore interfaces
  ignore_interfaces: "(dummy.*|docker.*)"
  # Regex to ignore IP addresses
  ignore_ips: (127\.0\.0\..*)

With the following configuration it should create and updates network interfaces such as ethX and ensX etc.

@Lozbik
Copy link
Author

Lozbik commented Apr 3, 2023

Hi, sorry for such a long answer, I was sick.

  1. I tried to use the network setup option you suggested. And I get an error at the time of agent launch. It looks like this, I don't have any ideas what's going wrong.

Снимок экрана 2023-04-03 в 18 46 08

  1. About the parameters that netbox-agent supports. There are no problems with adding server_role. But I would like to control all fields when I add device. For example: device name, device type, Description and some hardware parameters. I tried to pick up the keys to fill in myself, but each time I got an error, such as for the name KeyError: 'No action for key"device.name " to check its value.' Can you tell me the exact names of the fields that I can specify in the netbox-agent config?
  2. Similar problem with custom_fields. I try to use it as in the example

Снимок экрана 2023-04-03 в 19 10 23

but I get the similar error KeyError: No action for key "device.custom_fields" to check its value.. Can you show a working example of filling in custom_fields?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants