Update README.md
This commit is contained in:
parent
12e406ef30
commit
d53bce9684
1 changed files with 33 additions and 3 deletions
36
README.md
36
README.md
|
|
@ -31,6 +31,9 @@ The goal is to generate an existing infrastructure on Netbox and have the abilit
|
||||||
- ipmitool
|
- ipmitool
|
||||||
- lldpd
|
- lldpd
|
||||||
- lshw
|
- lshw
|
||||||
|
- hpassacli
|
||||||
|
- storcli
|
||||||
|
- omreport
|
||||||
|
|
||||||
# Known limitations
|
# Known limitations
|
||||||
|
|
||||||
|
|
@ -41,6 +44,9 @@ We advise to set `CACHE_TIME` to `0`.
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
|
The agent can be run from a shell and get its configuration from either the configuration file or environment variables.
|
||||||
|
Configuration values are overridden based on the following precedence: command line arguments (might include config file) > environment variables > default config file > defaults.
|
||||||
|
|
||||||
```
|
```
|
||||||
# netbox_agent -c /etc/netbox_agent.yml --register
|
# netbox_agent -c /etc/netbox_agent.yml --register
|
||||||
INFO:root:Creating chassis blade (serial: QTFCQ574502EF)
|
INFO:root:Creating chassis blade (serial: QTFCQ574502EF)
|
||||||
|
|
@ -53,20 +59,36 @@ INFO:root:Creating NIC br-07ea1e4a2f0e (02:42:7a:89:cf:a4) on myserver
|
||||||
INFO:root:Create new IP 172.19.0.1/16 on br-07ea1e4a2f0e
|
INFO:root:Create new IP 172.19.0.1/16 on br-07ea1e4a2f0e
|
||||||
INFO:root:Interface a8:1e:84:f2:9e:69 not found, creating..
|
INFO:root:Interface a8:1e:84:f2:9e:69 not found, creating..
|
||||||
INFO:root:Creating NIC enp1s0f0 (a8:1e:84:f2:9e:69) on myserver
|
INFO:root:Creating NIC enp1s0f0 (a8:1e:84:f2:9e:69) on myserver
|
||||||
INFO:root:Create new IP 195.154.81.10/24 on enp1s0f0
|
INFO:root:Create new IP 42.42.42.42/24 on enp1s0f0
|
||||||
INFO:root:Create new IP fe80::aa1e:84ff:fef2:9e69/64 on enp1s0f0
|
INFO:root:Create new IP fe80::aa1e:84ff:fef2:9e69/64 on enp1s0f0
|
||||||
INFO:root:Interface a8:1e:84:cd:9d:d6 not found, creating..
|
INFO:root:Interface a8:1e:84:cd:9d:d6 not found, creating..
|
||||||
INFO:root:Creating NIC IPMI (a8:1e:84:cd:9d:d6) on myserver
|
INFO:root:Creating NIC IPMI (a8:1e:84:cd:9d:d6) on myserver
|
||||||
INFO:root:Create new IP 10.191.122.10/24 on IPMI
|
INFO:root:Create new IP 10.191.122.10/24 on IPMI
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you need, you can update only specifics infos like:
|
||||||
|
* Network
|
||||||
|
* Inventory
|
||||||
|
* Location
|
||||||
|
* PSUs
|
||||||
|
|
||||||
|
```
|
||||||
|
# ip a add 42.42.42.43/24 dev enp1s0f1
|
||||||
|
# netbox_agent -c /etc/netbox_agent.yaml --update-network
|
||||||
|
INFO:root:Create new IP 42.42.42.43/24 on enp1s0f1
|
||||||
|
# netbox_agent --update-inventory
|
||||||
|
INFO:root:Creating Disk Samsung SSD 850 S2RBNX0K101698D
|
||||||
|
```
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
```
|
```
|
||||||
|
# Netbox configuration
|
||||||
netbox:
|
netbox:
|
||||||
url: 'http://netbox.internal.company.com'
|
url: 'http://netbox.internal.company.com'
|
||||||
token: supersecrettoken
|
token: supersecrettoken
|
||||||
|
|
||||||
|
# Network configuration
|
||||||
network:
|
network:
|
||||||
# Regex to ignore interfaces
|
# Regex to ignore interfaces
|
||||||
ignore_interfaces: "(dummy.*|docker.*)"
|
ignore_interfaces: "(dummy.*|docker.*)"
|
||||||
|
|
@ -82,6 +104,7 @@ network:
|
||||||
# # see https://netbox.company.com/virtualization/clusters/
|
# # see https://netbox.company.com/virtualization/clusters/
|
||||||
# cluster_name: my_vm_cluster
|
# cluster_name: my_vm_cluster
|
||||||
|
|
||||||
|
# Enable datacenter location feature in Netbox
|
||||||
datacenter_location:
|
datacenter_location:
|
||||||
driver: "cmd:cat /etc/qualification | tr [a-z] [A-Z]"
|
driver: "cmd:cat /etc/qualification | tr [a-z] [A-Z]"
|
||||||
regex: "DATACENTER: (?P<datacenter>[A-Za-z0-9]+)"
|
regex: "DATACENTER: (?P<datacenter>[A-Za-z0-9]+)"
|
||||||
|
|
@ -91,6 +114,7 @@ datacenter_location:
|
||||||
# driver: "file:/tmp/datacenter"
|
# driver: "file:/tmp/datacenter"
|
||||||
# regex: "(.*)"
|
# regex: "(.*)"
|
||||||
|
|
||||||
|
# Enable rack location feature in Netbox
|
||||||
rack_location:
|
rack_location:
|
||||||
# driver: 'cmd:lldpctl'
|
# driver: 'cmd:lldpctl'
|
||||||
# match SysName: sw-dist-a1.dc42
|
# match SysName: sw-dist-a1.dc42
|
||||||
|
|
@ -186,6 +210,12 @@ Feel free to send me a dmidecode output for Supermicro's blade!
|
||||||
|
|
||||||
* Nothing ATM, feel free to send me a dmidecode or make a PR!
|
* Nothing ATM, feel free to send me a dmidecode or make a PR!
|
||||||
|
|
||||||
# TODO
|
# Developing
|
||||||
|
|
||||||
- [ ] `CustomFields` support with firmware versions for Device (BIOS), RAID Cards and disks
|
If you want to run the agent while adding features or just for debugging purposes
|
||||||
|
|
||||||
|
```
|
||||||
|
# git clone https://github.com/Solvik/netbox-agent.git
|
||||||
|
# cd netbox-agent
|
||||||
|
# python3 -m netbox_agent.cli --register
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue