feat: add custom_fields suppport

```bash
$ netbox_agent -du --device.custom_fields="last_run=$(date),last_run_ts=$(date +'%s')"
```

obviously, custom_fields need to be create manually in netbox admin
This commit is contained in:
Cyril LEVIS 2022-02-16 11:22:51 +01:00 committed by Cyril Levis
commit d1ee380ffb
No known key found for this signature in database
GPG key ID: BBB7C52D39341FE5
4 changed files with 21 additions and 3 deletions

View file

@ -18,14 +18,15 @@ network:
# blade_role: "Blade"
# server_role: "Server"
# tags: server, blade, ,just a comma,delimited,list
# custom_fields: field1=value1,field2=value2
#
#
# Use this to set the tenant
#
#tenant:
# driver: "file:/tmp/tenant"
# regex: "(.*)"
datacenter_location:
driver: "cmd:cat /etc/qualification | tr [A-Z] [a-z]"
regex: "datacenter: (?P<datacenter>[A-Za-z0-9]+)"