We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm trying to parse template with to_nice_yaml, and my config are :
Variable content :
opromtailScrapeConfig: - job_name: system static_configs: - targets: - localhost labels: job: messages __path__: /var/log/syslog - job_name: syslog syslog: listen_address: 0.0.0.0:1514 idle_timeout: 60s label_structured_data: yes labels: job: "syslog-ng" use_incoming_timestamp: true relabel_configs: - source_labels: ['__syslog_message_hostname'] target_label: 'host'
Template config :
scrape_configs: {% if opromtailScrapeConfig is defined %} {{ opromtailScrapeConfig | to_nice_yaml(indent=2) | indent(2, False) }} {% endif %} {% if opromtailTargetConfig is defined %} target_config: {{ opromtailTargetConfig | to_nice_yaml(indent=2) | indent(2, False) }} {% endif %}
My output is :
scrape_configs: - job_name: system static_configs: - labels: __path__: /var/log/syslog job: messages targets: - localhost - job_name: syslog relabel_configs: - source_labels: - __syslog_message_hostname target_label: host syslog: idle_timeout: 60s label_structured_data: true labels: job: syslog-ng listen_address: 0.0.0.0:1514 use_incoming_timestamp: true
Expected behavior :
scrape_configs: - job_name: syslog syslog: listen_address: 0.0.0.0:1514 idle_timeout: 60s label_structured_data: yes labels: job: "syslog" relabel_configs: - source_labels: ['__syslog_message_hostname'] target_label: 'host'
Seems to befilter's issue :(
Any idea ?
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Hello,
I'm trying to parse template with to_nice_yaml, and my config are :
Variable content :
Template config :
My output is :
Expected behavior :
Seems to befilter's issue :(
Any idea ?
The text was updated successfully, but these errors were encountered: