<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Hello tim,<br>
    </div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 29/11/2019 15:12, François Armand
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1355d6a7-15f4-ad5e-d290-39f952ff0275@rudder.io">On
      29/11/2019 15:06, tim taler wrote:
      <br>
      <blockquote type="cite">
        <blockquote type="cite">Hello Tim! Sorry for the delay, we
          missed your email. Answers inline:
          <br>
        </blockquote>
        Hi Francois, no prob, thanks for the answer!
        <br>
        <br>
        <blockquote type="cite">
          <blockquote type="cite">... the ability to insert a couple of
            lines (block)
            <br>
            at an arbitrary "anchor" in a config file
            <br>
            (insert line-s after/before line matching)
            <br>
            One use-case for this would be the
            <br>
            editing of /etc/rsyslog.conf
            <br>
          </blockquote>
          File edit is more the domain of Nicolas, I will let him answer
          (or
          <br>
          anyone who can, actually).
          <br>
          I know that you can manage part of files based on anchor (in
          File Edit
          <br>
          technique, things related to "enforce content by section", or
          "enforce
          <br>
          content only in zone") but that's not quite what you need
          AFAIU.
          <br>
        </blockquote>
        no, not exactly - that would be sufficient on a file where I
        could set
        <br>
        the anchors beforehand - but than it would be already a template
        ;-)
        <br>
      </blockquote>
      <br>
      That's what I understood. So perhaps Nicolas could have an idea?
      <br>
      <br>
      <blockquote type="cite">A "simple"
        <br>
        insert_line_<before|after>(filename, anchor-regex,
        <line|block>-to_insert)
        <br>
        would help...
        <br>
        <br>
        Even further down the road - is there maybe a technique for
        <br>
        yaml files on the horizon?
        <br>
      </blockquote>
      <br>
      I think we added support for loading yaml file as dictionnaries
      recently. Alexis would likely know ?
      <br>
    </blockquote>
    <p><br>
    </p>
    <p>We have the support in the agent and it can be done in a custom
      technique using the generic method "Variable dict from file type".</p>
    <p>For pre existing technique, the "Variable from JSON file (dict)"
      technique could easily be extended to support yaml too.<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:1355d6a7-15f4-ad5e-d290-39f952ff0275@rudder.io">
      <br>
      <br>
      <blockquote type="cite">One use-case here would be to automate the
        injection of new
        <br>
        monitoring targets into my prometheus config
        <br>
        (though that might be better done in a propper plugin,
        <br>
        haven't had the time yet, but will also have a look at
        <br>
        your centreon adapter ... but I like prometheus A LOT ;-)
        <br>
      </blockquote>
      <br>
      Hey, we would enjoy to help you (or do with you) a prometheus
      plugin ! We typically add them based on users/customers need so
      that the plugin actually matches a real use case. Most likelly a
      part for Benoit ! (a couple more ideas, and I will have pong
      everyone :)
      <br>
    </blockquote>
    <p><br>
    </p>
    <p>What do you want to do with your plugin ? Monitor Rudder or
      configure the monitoring of something else ?<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
      cite="mid:1355d6a7-15f4-ad5e-d290-39f952ff0275@rudder.io">
      <br>
      <blockquote type="cite">
        <br>
        ...
        <br>
        <blockquote type="cite">
          <blockquote type="cite"><a class="moz-txt-link-freetext" href="https://www.cisecurity.org/">https://www.cisecurity.org/</a>
            <br>
            (or <a class="moz-txt-link-freetext" href="https://verinice.com/">https://verinice.com/</a>)
            <br>
          </blockquote>
        </blockquote>
        ...
        <br>
        <blockquote type="cite">That's funny because we're actually
          working on a plugin for CIS
          <br>
        </blockquote>
        Great! Thanks a lot!
        <br>
        Will have a look
        <br>
        <br>
        Best
        <br>
      </blockquote>
      <br>
      <br>
      Cheers,
      <br>
      <br>
    </blockquote>
    <p><br>
    </p>
    <div class="moz-signature">-- <br>
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <table style="color:#666; font-size: 9pt; border-collapse:
        collapse; font-weight: bold;" width="450" cellspacing="0"
        cellpadding="0" border="0">
        <tbody>
          <tr style="border-bottom: 1px solid #ddd;border-top: 1px solid
            #ddd;">
            <td colspan="2" style="text-align: center; padding: 5px;"> <a
                href="http://www.rudder.io/"> <img
                  src="cid:part1.F3921EC7.F9BC4FA8@rudder.io"> </a> </td>
            <td colspan="2"> Benoît Peccatte<br>
              <span style="font-weight:normal;">Architecte<br>
                <b>Tél.</b> +33 (0)1 85 08 48 96   </span><b><br>
              </b></td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>