<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"><<a href="mailto:barumuga@redhat.com" target="_blank">barumuga@redhat.com</a>></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>
> From: "Joe Julian" <<a href="mailto:joe@julianfamily.org">joe@julianfamily.org</a>><br>
> To: "Pablo" <<a href="mailto:paa.listas@gmail.com">paa.listas@gmail.com</a>>, "Balamurugan Arumugam" <<a href="mailto:bala@gluster.com">bala@gluster.com</a>><br>
> 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>
> Sent: Tuesday, July 30, 2013 9:26:55 PM<br>
> Subject: Re: [Gluster-users] new glusterfs logging framework<br>
><br>
> Configuration files should be under /etc per FSH standards. Move the<br>
> logger.conf to /etc/glusterfs.<br>
><br>
<br>
</div>This will be done.<br>
<div class="im"><br>
<br>
> I, personally, like json logs since I'm shipping to logstash. :-) My one<br>
> suggestion would be to ensure the timestamps are in rfc3164.<br>
><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>
> Yes, those are complex steps, but the rpm/deb packaging should take care of<br>
> dependencies and setting up logical defaults.<br>
><br>
<br>
</div>Yes. I am planning to add rsyslog configuration for gluster at install time.<br>
<div class="im"><br>
<br>
> IMHO, since this is a departure from the way it's been before now, the config<br>
> file should enable this new behavior, not disable it, to avoid breaking<br>
> existing monitoring installations.<br>
><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>
> Pablo <<a href="mailto:paa.listas@gmail.com">paa.listas@gmail.com</a>> wrote:<br>
> >I think that adding all that 'rsyslog' configuration only to see logs<br>
> >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>
> >> Hi All,<br>
> >><br>
> >> Recently new logging framework was introduced [1][2][3] in glusterfs<br>
> >master branch. You could read more about this on doc/logging.txt. In<br>
> >brief, current log target is moved to syslog and user has an option to<br>
> >this new logging at compile time (passing '--disable-syslog' to<br>
> >./configure or '--without syslog' to rpmbuild) and run time (having a<br>
> >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<br>
> >default configuration of rsyslog does not have any rule specific to<br>
> >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<br>
> >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"<br>
> >string="/var/log/gluster/%app-name%.log")<br>
> >> template (name="GlusterPidLogFile" type="string"<br>
> >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<br>
> >/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<br>
> >recompile rsyslog source rpm downloaded from fedora repository<br>
> >('rpmbuild --rebuild rsyslog-7.2.6-1.fc19.src.rpm' works fine) and use<br>
> >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.<br>
> >I have added the support which requires some testing. I will update<br>
> >once done.<br>
> >><br>
> >><br>
> >> TODO:<br>
> >> 1. need to add volume:brick specific tag to logging so that those<br>
> >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" target="_blank">http://review.gluster.org/4977</a><br>
> >> [2] <a href="http://review.gluster.org/5002" target="_blank">http://review.gluster.org/5002</a><br>
> >> [3] <a href="http://review.gluster.org/4915" target="_blank">http://review.gluster.org/4915</a><br>
> >> [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>> >> _______________________________________________<br>
<div class="im">> >> Gluster-users mailing list<br>
> >> <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> >> <a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br>
> >><br>
> ><br>
</div>> >_______________________________________________<br>
<div class="im">> >Gluster-users mailing list<br>
> ><a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> ><a href="http://supercolony.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a><br>
><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>