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

Add synced config to Icinga 2 module #117

Merged
merged 4 commits into from
Apr 2, 2024
Merged

Conversation

widhalmt
Copy link
Member

This PR should add configuration that's sent to the local node. This should collect configuration on every kind of Icinga 2 node including configuration that is managed by Director or via API.

Please take into account, that I'm totally new to the code of this tool. Don't expect that I know what I'm doing.

@widhalmt widhalmt requested a review from tbauriedel March 25, 2024 13:37
@widhalmt widhalmt self-assigned this Mar 25, 2024
@tbauriedel
Copy link
Member

Thanks for the contribution!

I'm not sure if we should really collect all loaded configurations from the API.
The amount of data we collect would grow a lot in that case.
Collecting the current stage ID for example makes perfect sense. But I would refrain from collecting the complete API at the moment.

Can you give me the background of what you might need this for other than "what we have, we have"?

@widhalmt
Copy link
Member Author

widhalmt commented Mar 25, 2024

Hm... yes, you're right. In fact, the "currently active" configuration would be totally sufficient. But finding the currently active stage and just collecting this is beyond my Go knowledge for now.

@tbauriedel
Copy link
Member

I would actually not collect the complete config of the active stage, but only collect to the ID of the stage.
I have to check whether there is further "metadata" within the API we could collect.
But the config itself below the active stage would definitely be too much in my opinion.

@widhalmt
Copy link
Member Author

If we need to reproduce errors in testing or for further investigation a copy of the full configuration would be very useful. I guess, using compression for the tarball would massively shrink the space we require for transport

@tbauriedel
Copy link
Member

I have added the active-stage form _api and director.
Also added list of the existing stage directories.

I would still not add the whole directory itself including content. This is way too much.
If you want to reproduce a system based on the support-collector data, you can already use /etc/icinga2/*. If the loaded stage is really needed, you should ask for it separately.

@tbauriedel tbauriedel force-pushed the icinga-synced-configuration branch 3 times, most recently from de88b8f to 746da53 Compare April 2, 2024 09:35
@tbauriedel tbauriedel force-pushed the icinga-synced-configuration branch from 746da53 to 169f10f Compare April 2, 2024 13:39
@tbauriedel tbauriedel merged commit 0e49e5c into main Apr 2, 2024
2 checks passed
@tbauriedel tbauriedel deleted the icinga-synced-configuration branch April 2, 2024 13:55
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

Successfully merging this pull request may close these issues.

2 participants