<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 30, 2013 at 11:39 PM, Balamurugan Arumugam <span dir="ltr">&lt;<a href="mailto:barumuga@redhat.com" target="_blank">barumuga@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Joe Julian&quot; &lt;<a href="mailto:joe@julianfamily.org">joe@julianfamily.org</a>&gt;<br>
&gt; To: &quot;Pablo&quot; &lt;<a href="mailto:paa.listas@gmail.com">paa.listas@gmail.com</a>&gt;, &quot;Balamurugan Arumugam&quot; &lt;<a href="mailto:bala@gluster.com">bala@gluster.com</a>&gt;<br>
&gt; Cc: <a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a>, <a href="mailto:gluster-devel@nongnu.org">gluster-devel@nongnu.org</a><br>
&gt; Sent: Tuesday, July 30, 2013 9:26:55 PM<br>
&gt; Subject: Re: [Gluster-users] new glusterfs logging framework<br>
&gt;<br>
&gt; Configuration files should be under /etc per FSH standards. Move the<br>
&gt; logger.conf to /etc/glusterfs.<br>
&gt;<br>
<br>
</div>This will be done.<br>
<div class="im"><br>
<br>
&gt; I, personally, like json logs since I&#39;m shipping to logstash. :-) My one<br>
&gt; suggestion would be to ensure the timestamps are in rfc3164.<br>
&gt;<br>
<br>
</div>rsyslog supports rfc3339 (a profile of ISO8601) and we use this.  Let me know your thoughts on continue using it.<br>
<div class="im"><br>
<br>
&gt; Yes, those are complex steps, but the rpm/deb packaging should take care of<br>
&gt; dependencies and setting up logical defaults.<br>
&gt;<br>
<br>
</div>Yes. I am planning to add rsyslog configuration for gluster at install time.<br>
<div class="im"><br>
<br>
&gt; IMHO, since this is a departure from the way it&#39;s been before now, the config<br>
&gt; file should enable this new behavior, not disable it, to avoid breaking<br>
&gt; existing monitoring installations.<br>
&gt;<br>
<br>
</div>Do you mean to continue current logging in addition to syslog way?<br>
<br></blockquote><div><br></div><div>This means unless explicitly configured with syslog, by default we should be logging to gluster logs as before.</div><div><br></div><div>Avati</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Regards,<br>
Bala<br>
<div><div class="h5"><br>
<br>
&gt; Pablo &lt;<a href="mailto:paa.listas@gmail.com">paa.listas@gmail.com</a>&gt; wrote:<br>
&gt; &gt;I think that adding all that &#39;rsyslog&#39; configuration only to see logs<br>
&gt; &gt;is<br>
&gt; &gt;too much. (I admit it, I don&#39;t know how to configure rsyslog at that<br>
&gt; &gt;level so that may influence my opinion)<br>
&gt; &gt;<br>
&gt; &gt;Regards,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;El 30/07/2013 06:29 a.m., Balamurugan Arumugam escribió:<br>
&gt; &gt;&gt; Hi All,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Recently new logging framework was introduced [1][2][3] in glusterfs<br>
&gt; &gt;master branch.  You could read more about this on doc/logging.txt.  In<br>
&gt; &gt;brief, current log target is moved to syslog and user has an option to<br>
&gt; &gt;this new logging at compile time (passing &#39;--disable-syslog&#39; to<br>
&gt; &gt;./configure or &#39;--without syslog&#39; to rpmbuild) and run time (having a<br>
&gt; &gt;file /var/log/glusterd/logger.conf and restarting gluster services).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; As rsyslog is used as syslog server in Fedora and CentOS/RHEL and<br>
&gt; &gt;default configuration of rsyslog does not have any rule specific to<br>
&gt; &gt;gluster logs, you see all logs are in /var/log/messages in JSON format.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Below is the way to make them neat and clean.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; For fedora users:<br>
&gt; &gt;&gt; 1. It requires to install rsyslog-mmjsonparse rpm (yum -y install<br>
&gt; &gt;rsyslog-mmjsonparse)<br>
&gt; &gt;&gt; 2. Place below configuration under /etc/rsyslog.d/gluster.conf file.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; #$RepeatedMsgReduction on<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; $ModLoad mmjsonparse<br>
&gt; &gt;&gt; *.* :mmjsonparse:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; template (name=&quot;GlusterLogFile&quot; type=&quot;string&quot;<br>
&gt; &gt;string=&quot;/var/log/gluster/%app-name%.log&quot;)<br>
&gt; &gt;&gt; template (name=&quot;GlusterPidLogFile&quot; type=&quot;string&quot;<br>
&gt; &gt;string=&quot;/var/log/gluster/%app-name%-%procid%.log&quot;)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; template(name=&quot;GLFS_template&quot; type=&quot;list&quot;) {<br>
&gt; &gt;&gt;     property(name=&quot;$!mmcount&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;/&quot;)<br>
&gt; &gt;&gt;     property(name=&quot;syslogfacility-text&quot; caseConversion=&quot;upper&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;/&quot;)<br>
&gt; &gt;&gt;     property(name=&quot;syslogseverity-text&quot; caseConversion=&quot;upper&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot; &quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;[&quot;)<br>
&gt; &gt;&gt;     property(name=&quot;timereported&quot; dateFormat=&quot;rfc3339&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;] &quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;[&quot;)<br>
&gt; &gt;&gt;     property(name=&quot;$!gf_code&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;] &quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;[&quot;)<br>
&gt; &gt;&gt;     property(name=&quot;$!gf_message&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;] &quot;)<br>
&gt; &gt;&gt;     property(name=&quot;$!msg&quot;)<br>
&gt; &gt;&gt;     constant(value=&quot;\n&quot;)<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; if $app-name == &#39;gluster&#39; or $app-name == &#39;glusterd&#39; then {<br>
&gt; &gt;&gt;     action(type=&quot;omfile&quot;<br>
&gt; &gt;&gt;            DynaFile=&quot;GlusterLogFile&quot;<br>
&gt; &gt;&gt;            Template=&quot;GLFS_template&quot;)<br>
&gt; &gt;&gt;     stop<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; if $app-name contains &#39;gluster&#39; then {<br>
&gt; &gt;&gt;     action(type=&quot;omfile&quot;<br>
&gt; &gt;&gt;            DynaFile=&quot;GlusterPidLogFile&quot;<br>
&gt; &gt;&gt;            Template=&quot;GLFS_template&quot;)<br>
&gt; &gt;&gt;     stop<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; 3. Restart rsyslog (service rsyslog restart)<br>
&gt; &gt;&gt; 4. Done. All gluster process specific logs are separated into<br>
&gt; &gt;/var/log/gluster/ directory<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Note: Fedora 19 users<br>
&gt; &gt;&gt; There is a bug in rsyslog of fedora 19 [4], so its required to<br>
&gt; &gt;recompile rsyslog source rpm downloaded from fedora repository<br>
&gt; &gt;(&#39;rpmbuild --rebuild rsyslog-7.2.6-1.fc19.src.rpm&#39; works fine) and use<br>
&gt; &gt;generated rsyslog and rsyslog-mmjsonparse binary rpms<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; For CentOS/RHEL users:<br>
&gt; &gt;&gt; Current rsyslog available in CentOS/RHEL does not have json support.<br>
&gt; &gt;I have added the support which requires some testing.  I will update<br>
&gt; &gt;once done.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; TODO:<br>
&gt; &gt;&gt; 1. need to add volume:brick specific tag to logging so that those<br>
&gt; &gt;logs can be separated out than pid.<br>
&gt; &gt;&gt; 2. enable gfapi to use this logging framework<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I would like to get feedback/suggestion about this logging framework<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Regards,<br>
&gt; &gt;&gt; Bala<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; [1] <a href="http://review.gluster.org/4977" target="_blank">http://review.gluster.org/4977</a><br>
&gt; &gt;&gt; [2] <a href="http://review.gluster.org/5002" target="_blank">http://review.gluster.org/5002</a><br>
&gt; &gt;&gt; [3] <a href="http://review.gluster.org/4915" target="_blank">http://review.gluster.org/4915</a><br>
&gt; &gt;&gt; [4] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=989886" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=989886</a><br>
</div></div>&gt; &gt;&gt; _______________________________________________<br>
<div class="im">&gt; &gt;&gt; Gluster-users mailing list<br>
&gt; &gt;&gt; <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
&gt; &gt;&gt; <a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
</div>&gt; &gt;_______________________________________________<br>
<div class="im">&gt; &gt;Gluster-users mailing list<br>
&gt; &gt;<a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
&gt; &gt;<a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br>
&gt;<br>
<br>
</div>_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@nongnu.org">Gluster-devel@nongnu.org</a><br>
<a href="https://lists.nongnu.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.nongnu.org/mailman/listinfo/gluster-devel</a><br>
</blockquote></div><br></div></div>