TheNetworkGuy / netbox-zabbix-sync

Python script to synchronise Netbox devices to Zabbix.
MIT License
118 stars 27 forks source link

Host group format #16

Closed taofineberg closed 1 year ago

taofineberg commented 1 year ago

When a host group is created the format is: site/manufacturer/role

if you add the -t to add the tenant it adds it after the site name site/tenant/manufacturer/role

We restrict access to the hosts to each client "tenant" therefore it would make more sense for the tenant to be the first option in the tree tenant/site/manufacturer/role

There could be other reasons why you have it this way but would be great if there could be a way to choose the order

Thanks Tao

TheNetworkGuy commented 1 year ago

This has been tried before in #13, however this FR didn't work out the way it was supposed to work.

It seems that there are users interested in this feature so i might take a look at it and see how easy it is to implement.

TheNetworkGuy commented 1 year ago

I've made some progress on this feature, please test it out and see if this works for you. You can test the new code by checking out on the HG-Format branch.

If unfamiliar with Git branches: git pull git checkout HG-Format

To summarize:

taofineberg commented 1 year ago

That works perfectly I ran it with -l tenant/site/manufacturer/dev_role -H and all the hosts moved with the updated syntax Thank you !!

TheNetworkGuy commented 1 year ago

Glad to hear, closing this one and moving the branch to main.