<div dir="ltr"><div><div><div>Hi,<br><br></div>I have added code to your module, it compiles and is able to accept messages to be sent, and prints a debug message whenever that happens.<br><br></div>I didn&#39;t have too much time to clean it up, but I hope this helps to start the ball rolling.<br><br><a href="https://github.com/balabit/syslog-ng/compare/f/curl-module">https://github.com/balabit/syslog-ng/compare/f/curl-module</a><br><br><br></div>Bazsi<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">-- <br>Bazsi<br></div></div></div>
<br><div class="gmail_quote">On Sat, Jan 23, 2016 at 9:27 PM,  <span dir="ltr">&lt;<a href="mailto:m@baha.mu" target="_blank">m@baha.mu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On Jan 23, 2016, at 21:23, Scheidler, Balázs &lt;<a href="mailto:balazs.scheidler@balabit.com">balazs.scheidler@balabit.com</a>&gt; wrote:<br>
&gt;<br>
&gt; If you commit your code to a branch I can help with the basic skeleton of the parser/grammar<br>
<br>
<br>
</span>Thank you Balázs, my code is available here: <a href="https://github.com/falzm/syslog-ng/tree/f/curl-module/modules/curl" rel="noreferrer" target="_blank">https://github.com/falzm/syslog-ng/tree/f/curl-module/modules/curl</a><br>
<span class="HOEnZb"><font color="#888888"><br>
m.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
&gt;<br>
&gt; On Jan 23, 2016 5:54 PM, &quot;Marc Falzon&quot; &lt;<a href="mailto:m@baha.mu">m@baha.mu</a>&gt; wrote:<br>
&gt; I successfully generated a module template using the `create_plugin.sh` script, however I don&#39;t have the slightest idea on how to get started from here (I mean for the &#39;plugin glue&#39;, I can manage the cURL part)... The most problematic step for me is the whole parser/grammar thing, to which I believe to involve YACC/Bison parsing but I don&#39;t know how it works and it&#39;s too big of a learning curve for what I want to achieve at this point... Since the Gitbook doesn&#39;t provide any useful information on module development at the moment, is there any way to get me started on this topic? I&#39;m not a developer (sysadmin), and trying to learn from existing module doesn&#39;t quite cut it.<br>
&gt;<br>
&gt; Thank you,<br>
&gt;<br>
&gt; m.<br>
&gt;<br>
&gt;<br>
&gt; On Friday 22 January 2016 at 11:35, Tibor Benke wrote:<br>
&gt;<br>
&gt; &gt; There is also a shell script which generates a basic destination skeleton. You can find its source on this brach: <a href="https://github.com/juhaszviktor/syslog-ng/tree/f/plugin-creator" rel="noreferrer" target="_blank">https://github.com/juhaszviktor/syslog-ng/tree/f/plugin-creator</a> . Check the dev-utils/plugin_skeleton_creator directory and this commit for the usage: <a href="https://github.com/juhaszviktor/syslog-ng/commit/89361d4d1817560ce8c906209355f1b737a28010" rel="noreferrer" target="_blank">https://github.com/juhaszviktor/syslog-ng/commit/89361d4d1817560ce8c906209355f1b737a28010</a><br>
&gt; &gt;<br>
&gt; &gt; 2016-01-22 11:33 GMT+01:00 Marc Falzon &lt;<a href="mailto:m@baha.mu">m@baha.mu</a> (mailto:<a href="mailto:m@baha.mu">m@baha.mu</a>)&gt;:<br>
&gt; &gt; &gt; Hi Bazsi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Friday 22 January 2016 at 11:28, Scheidler, Balázs wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; not really, but maybe I would read the &quot;official&quot; modules source code instead. and of course you can ask questions on the mailing list. :)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Yes that&#39;s what I&#39;ve started to do, but a proper documentation is preferable, saves time and avoid confusion ;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; if you want to create a destination, the easiest is to create a threaded destination, where the output is an independent thread, that can use a synchronous API. Of course this is going to be slower than using an asynchronous implementation, but that usually is good enough,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thank you for the hint. Given my use case (HTTP destination) I think I&#39;m safe to go with an asynchronous implementation since each request is stateless, no connections/locks involved.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; m.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Fri, Jan 22, 2016 at 11:03 AM, Marc Falzon &lt;<a href="mailto:m@baha.mu">m@baha.mu</a> (mailto:<a href="mailto:m@baha.mu">m@baha.mu</a>) (mailto:<a href="mailto:m@baha.mu">m@baha.mu</a>)&gt; wrote:<br>
&gt; &gt; &gt; &gt; &gt; Hi<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Is there any documentation on how to develop new syslog-ng module using the native C API, besides reading the incubator modules source code?<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Cheers,<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; m.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; ______________________________________________________________________________<br>
&gt; &gt; &gt; &gt; &gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; &gt; &gt; &gt; &gt; Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
&gt; &gt; &gt; &gt; &gt; FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; ______________________________________________________________________________<br>
&gt; &gt; &gt; &gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; &gt; &gt; &gt; Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
&gt; &gt; &gt; &gt; FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; ______________________________________________________________________________<br>
&gt; &gt; &gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; &gt; &gt; Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
&gt; &gt; &gt; FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ______________________________________________________________________________<br>
&gt; &gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; &gt; Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
&gt; &gt; FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ______________________________________________________________________________<br>
&gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
&gt; FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt;<br>
&gt; ______________________________________________________________________________<br>
&gt; Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
&gt; FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
&gt;<br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</div></div></blockquote></div><br></div>