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

Enabled interface monitoring using host vars #42

Closed
sol1-matt opened this issue Aug 15, 2024 · 3 comments
Closed

Enabled interface monitoring using host vars #42

sol1-matt opened this issue Aug 15, 2024 · 3 comments

Comments

@sol1-matt
Copy link
Member

Enable interface monitoring on hosts by importing lists of interfaces that can be turned into hosts vars.

There lists available should be

  • Up interfaces as strings
  • Down interfaces as string
  • Optional custom field icinga_vars of type json that changes adds up/down lists that are a list of dicts with the icinga_vars being the dict value
@sol1-matt
Copy link
Member Author

sol1-matt commented Aug 20, 2024

This feature is ready for testing on branch 42-interface-lists.

Of note is the way interfaces are read from the api which is by using giant filter lists, based on the id's of the devices or vm's, that have a arbitrary max length of around 1500 chars.
This has been done to speed up the import from large datasets but could result in problems if a webserver has a max url length lower than this.

@sol1-matt
Copy link
Member Author

expanded the services to create dict of dicts as well as there is similar usage between these

@sol1-matt
Copy link
Member Author

This was added in #45.

It was complicated because we are iterating

  • devices
  • service
  • var values
    to generate useful data

I tried a number of different approaches to generate info and this pull request was the cleanest

It can't handle dict generation for multiple services with the same service name but that is an existing behavior and won't be fixed. Use different service names if it is important.

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

No branches or pull requests

1 participant