-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Move services out of primary config file into a services folder #85
Comments
I really don't see any benefit to doing this. I much prefer having it all in one file as it makes comparisons/copying easier and it'd mean potentially loads of tiny files. I'd much rather spend time looking into how I'd get commented out lines to be kept on save. |
Id say there is some benefit to it if you get into automating writing config files (purely speculative) in that i could overwrite a single service file without needing to parse the entire config first. but that may not actually be needed depending on how handling of pulling current versions off servers would work (I haven't gotten that far yet) but yea, my main struggle was with comments being removed so ill look into using the test service but ideally not deleting comments would be good as id at the very least like to be able to make notes in the config for how specific things work for future reference Thank you so much again! |
could a middle ground solution be having a service directory and you can have multiple services files in it, but each file could contain 1 or more services, would allow what you are saying where you can have them all in a single file, but also allow for breaking them up to fit use cases such as the one I outlined (this is similar to how applications such as apache handle site configs) |
It is split into several files forming the configuration hierarchy outlined
|
I also would prefer all service configs in one file. I use -test.service quite a lot when adding new services where I only want to test that service. Maybe another option could be adding a service option called active (or something more creative) with a value of true or false so that it is only added to the dashboard and checks if true. If not present, defaults to true. That way it can be kept in the config file at all times and set to false. Maybe a quick alternative to comments could be to just add it to the yaml config and do nothing with it.
|
I agree with samcro. I just merged a change giving that Supporting multiple files would be a pain from a saving perspective as it'd have to keep track of where each service is stored and then go through the list of all services and check which others may be in that file. Then there's the issue of defaults/settings/notify/webhook which would have all have to be in the same file (each type) and then we'd need to store the location of those files. I'm just gonna keep it how it is with 1 file for the config for the time being |
Tested both active and comment and both are working for me. I was envisioning if a service was set as not active, it would also not display the card. Not sure if that is an easy ask. Or maybe a separate Boolean parameter called |
Had a bit of a rethink on how to hide the |
Test latest commit and it has removed a test services from the dashboard. |
Config? Or it's not displaying a service that is |
I guess my response was a little ambiguous. It worked as expected. It persisted in the config with active set to false, but is not displayed on the dashboard. |
Closing this because I don't see value in supporting this. I much prefer having everything in one file. It'd require a rewrite in the saving as every config section would need to be tagged with the file it came from and then only those written to that file. Added |
I'd like to request a feature where in instead of configuring all of the services as part of the primary config file, that the primary config file pull them from any .yml file in a given services folder.
I've been playing around with services all afternoon and got 3 working, after which I commented them all out in the config file in order to work on a 4th (logging was getting very busy) only to realize that the server overwrite / deleted all commented lines in the config file thus resulting in me needing to start from scratch on the 3 I had already got working.
Having each service be it's own file would allow for easy enabling/disabling by renaming the files to a non .yml extension and would also just keep everything a lot more organized when you end up with dozens of monitored services (my goal is to use this to monitor all server based applications we host eventually which could end up being quite a lot)
The text was updated successfully, but these errors were encountered: