fix telegraf config related fixes #1176
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on refactoring and improving the codebase of the
tomlparser-prom-customconfig.rb
andtomlparser-osm-config.rb
scripts in thebuild
directory. The changes include the introduction of a new helper functionis_windows?
, the replacement of direct checks for the Windows OS with this new function, and the adjustment of timeout configuration keys based on the OS. Additionally, there are changes to theama-logs.yaml
file in thekubernetes
directory.Here are the key changes:
Refactoring and code improvements:
build/common/installer/scripts/tomlparser-prom-customconfig.rb
: Introduced a new helper functionis_windows?
to check if the operating system is Windows, which improves code readability and maintainability.build/common/installer/scripts/tomlparser-prom-customconfig.rb
: Replaced direct checks for the Windows OS with the newis_windows?
function in multiple places. This makes the code cleaner and easier to understand. [1] [2] [3]Configuration adjustments:
build/common/installer/scripts/tomlparser-prom-customconfig.rb
: Adjusted the timeout configuration key based on the OS in thecreatePrometheusPluginsWithNamespaceSetting
function. For Windows, the key is "response_timeout", while for other OS, it's "timeout". This change ensures proper configuration for different OS. [1] [2]build/linux/installer/scripts/tomlparser-osm-config.rb
: Changed the timeout configuration key from "response_timeout" to "timeout" in thereplaceOsmTelegrafConfigPlaceHolders
function.Configuration file changes:
kubernetes/ama-logs.yaml
: Removed theHOSTNAME
environment variable from the specification. The reason for this change since this duplicate.