<html><head></head><body>Configuration files should be under /etc per FSH standards. Move the logger.conf to /etc/glusterfs.<br>
<br>
I, personally, like json logs since I&#39;m shipping to logstash. :-) My one suggestion would be to ensure the timestamps are in rfc3164.<br>
<br>
Yes, those are complex steps, but the rpm/deb packaging should take care of dependencies and setting up logical defaults.<br>
<br>
IMHO, since this is a departure from the way it&#39;s been before now, the config file should enable this new behavior, not disable it, to avoid breaking existing monitoring installations.<br><br><div class="gmail_quote">Pablo &lt;paa.listas@gmail.com&gt; wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">I think that adding all that 'rsyslog' configuration only to see logs is <br />too much. (I admit it, I don't know how to configure rsyslog at that <br />level so that may influence my opinion)<br /><br />Regards,<br /><br /><br />El 30/07/2013 06:29 a.m., Balamurugan Arumugam escribió:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi All,<br /><br />Recently new logging framework was introduced [1][2][3] in glusterfs master branch.  You could read more about this on doc/logging.txt.  In brief, current log target is moved to syslog and user has an option to this new logging at compile time (passing '--disable-syslog' to ./configure or '--without syslog' to rpmbuild) and run time (having a file /var/log/glusterd/logger.conf and restarting gluster services).<br /><br />As rsyslog is used as syslog server in Fedora and CentOS/RHEL and default configuration of rsyslog does not have any rule
specific to gluster logs, you see all logs are in /var/log/messages in JSON format.<br /><br />Below is the way to make them neat and clean.<br /><br />For fedora users:<br />1. It requires to install rsyslog-mmjsonparse rpm (yum -y install rsyslog-mmjsonparse)<br />2. Place below configuration under /etc/rsyslog.d/gluster.conf file.<br /><br />#$RepeatedMsgReduction on<br /><br />$ModLoad mmjsonparse<br />*.* :mmjsonparse:<br /><br />template (name="GlusterLogFile" type="string" string="/var/log/gluster/%app-name%.log")<br />template (name="GlusterPidLogFile" type="string" string="/var/log/gluster/%app-name%-%procid%.log")<br /><br />template(name="GLFS_template" type="list") {<br />property(name="$!mmcount")<br />constant(value="/")<br />property(name="syslogfacility-text" caseConversion="upper")<br />constant(value="/")<br />property(name="syslogseverity-text" caseConversion="upper")<br />constant(value=" ")<br />constant(value="[")<br />property(name="timereported"
dateFormat="rfc3339")<br />constant(value="] ")<br />constant(value="[")<br />property(name="$!gf_code")<br />constant(value="] ")<br />constant(value="[")<br />property(name="$!gf_message")<br />constant(value="] ")<br />property(name="$!msg")<br />constant(value="\n")<br />}<br /><br />if $app-name == 'gluster' or $app-name == 'glusterd' then {<br />action(type="omfile"<br />DynaFile="GlusterLogFile"<br />Template="GLFS_template")<br />stop<br />}<br /><br />if $app-name contains 'gluster' then {<br />action(type="omfile"<br />DynaFile="GlusterPidLogFile"<br />Template="GLFS_template")<br />stop<br />}<br /><br /><br />3. Restart rsyslog (service rsyslog restart)<br />4. Done. All gluster process specific logs are separated into /var/log/gluster/ directory<br /><br /><br />Note: Fedora 19 users<br />There is a bug in rsyslog of fedora 19 [4], so its required to recompile rsyslog source rpm downloaded from fedora repository ('rpmbuild --rebuild rsyslog-7.2.6-1.fc19.src.rpm' works
fine) and use generated rsyslog and rsyslog-mmjsonparse binary rpms<br /><br />For CentOS/RHEL users:<br />Current rsyslog available in CentOS/RHEL does not have json support.  I have added the support which requires some testing.  I will update once done.<br /><br /><br />TODO:<br />1. need to add volume:brick specific tag to logging so that those logs can be separated out than pid.<br />2. enable gfapi to use this logging framework<br /><br /><br />I would like to get feedback/suggestion about this logging framework<br /><br /><br />Regards,<br />Bala<br /><br /><br />[1] <a href="http://review.gluster.org/4977">http://review.gluster.org/4977</a><br />[2] <a href="http://review.gluster.org/5002">http://review.gluster.org/5002</a><br />[3] <a href="http://review.gluster.org/4915">http://review.gluster.org/4915</a><br />[4] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=989886">https://bugzilla.redhat.com/show_bug.cgi?id=989886</a><br /><hr /><br />Gluster-users mailing
list<br />Gluster-users@gluster.org<br /><a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a></blockquote><br /><br /><hr /><br />Gluster-users mailing list<br />Gluster-users@gluster.org<br /><a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br /></pre></blockquote></div></body></html>