management of the config.river with the conversion of the config.yaml #149
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 fork will permit to realize a config.river of the flow mode thanks to the config.yaml of the static mode.
The objective is to deploy a grafana agent in mode flow with a dynamic configuration and not only with a config.river already configured before the deployement by ansible.
The solution that i have used it to convert the static format to the flow format is the following command:
ansible.builtin.shell: "AGENT_MODE=flow {{ grafana_agent_install_dir }}/grafana-agent convert -f static {{ grafana_agent_config_dir }}/{{ grafana_agent_config_filename }} -o {{ grafana_agent_config_dir }}/{{ grafana_agent_config_filename }}"
notify: "restart grafana-agent"
when: grafana_agent_provisioned_config_file | length == 0
I have made any tests and it is ok for me
Regards
Ludovic