[rudder-users] help on "multiple line edits to one file"

Nicolas Charles nicolas.charles at rudder.io
Wed Nov 20 12:26:19 CET 2019


Tim,

Thank you for this report. I was able to reproduced it, by defining 
variables es_wazuh_shards & es_wazuh_replicas

This is an subcase of https://issues.rudder.io/issues/14286, and we 
didn't correctly assessed that it would prevent multiple reporting from 
same generic method.

We are working on a solution/workaround

Nicolas CHARLES

On 19/11/2019 22:47, tim taler wrote:
> I struggle with multiple line edits in one file.
>
> I would need to edit several lines in a json file.
>
> While the editing through "File replace lines"
> actually works (I need to preserve leading whitespaces,
> brackets, quotes etc.)
> all but the the first editing is showing as "Missing" in the reports.
> (multiple file editing with "file key-valule present" on another file
> works fine, but I think can't use that in this case)
>
> Any Idea how to approach this (other than changing the file into a template
> and doing it through template expansion?)
>
> The actual file would be:
>
> /usr/bin/curl https://raw.githubusercontent.com/wazuh/wazuh/v3.10.2/extensions/elasticsearch/7.x/wazuh-template.json
> -o /etc/kibana/wazuh-elastic-template.json
>
> than three replacements:
>
> (\s+.order.: )(?!(1))([0-9]*)(.*)
> with
> ${match.1}1,
>
> (\s+.index.number_of_shards.: .)(?!(${es_wazuh_shards}))([0-9]*)(.*)
> with
> ${match.1}${es_wazuh_shards}${match.4}
>
> and
> (\s+.index.number_of_replicas.: .)(?!(${es_wazuh_replicas}))([0-9]*)(.*)
> with
> ${match.1}${es_wazuh_replicas}${match.4}
>
> TIA
>
> _______________________________________________
> rudder-users mailing list
> FAQ: https://faq.rudder.io/
> Bug Tracker: https://issues.rudder.io/
> rudder-users at lists.rudder-project.org
> https://www.rudder-project.org/mailman/listinfo/rudder-users


More information about the rudder-users mailing list