-
Notifications
You must be signed in to change notification settings - Fork 73
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
management of the config.river with the conversion of the config.yaml #149
base: main
Are you sure you want to change the base?
Conversation
Hey @lbrule , Thanks for adding this. Also could you share a snippet of how you would use this in a playbook? |
/- hosts: all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, LGTM
Will get it merged in next release
@gardar any thoughts here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would this work on the second run of the ansible role when it has already converted the config?
Hello @gardar The config.river is re generated always whene we run again the role. So every time we generate the config.yaml for the static mode and we do a conversion in order to obtain the config.river for the flow mode. |
@gardar is this okay from your aspect? |
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