<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">s/rfc3164/ISO8601/<br>
<br>
That's what I get for trying to search from my phone while writing
an email on the train.<br>
<br>
On 07/30/2013 08:56 AM, Joe Julian wrote:<br>
</div>
<blockquote
cite="mid:2a78931e-7868-47cb-aea9-36c684f45712@email.android.com"
type="cite">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'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'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 <a class="moz-txt-link-rfc2396E" href="mailto:paa.listas@gmail.com"><paa.listas@gmail.com></a> 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
too much. (I admit it, I don't know how to configure rsyslog at that
level so that may influence my opinion)
Regards,
El 30/07/2013 06:29 a.m., Balamurugan Arumugam escribió:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi All,
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).
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.
Below is the way to make them neat and clean.
For fedora users:
1. It requires to install rsyslog-mmjsonparse rpm (yum -y install rsyslog-mmjsonparse)
2. Place below configuration under /etc/rsyslog.d/gluster.conf file.
#$RepeatedMsgReduction on
$ModLoad mmjsonparse
*.* :mmjsonparse:
template (name="GlusterLogFile" type="string" string="/var/log/gluster/%app-name%.log")
template (name="GlusterPidLogFile" type="string" string="/var/log/gluster/%app-name%-%procid%.log")
template(name="GLFS_template" type="list") {
property(name="$!mmcount")
constant(value="/")
property(name="syslogfacility-text" caseConversion="upper")
constant(value="/")
property(name="syslogseverity-text" caseConversion="upper")
constant(value=" ")
constant(value="[")
property(name="timereported"
dateFormat="rfc3339")
constant(value="] ")
constant(value="[")
property(name="$!gf_code")
constant(value="] ")
constant(value="[")
property(name="$!gf_message")
constant(value="] ")
property(name="$!msg")
constant(value="\n")
}
if $app-name == 'gluster' or $app-name == 'glusterd' then {
action(type="omfile"
DynaFile="GlusterLogFile"
Template="GLFS_template")
stop
}
if $app-name contains 'gluster' then {
action(type="omfile"
DynaFile="GlusterPidLogFile"
Template="GLFS_template")
stop
}
3. Restart rsyslog (service rsyslog restart)
4. Done. All gluster process specific logs are separated into /var/log/gluster/ directory
Note: Fedora 19 users
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
For CentOS/RHEL users:
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.
TODO:
1. need to add volume:brick specific tag to logging so that those logs can be separated out than pid.
2. enable gfapi to use this logging framework
I would like to get feedback/suggestion about this logging framework
Regards,
Bala
[1] <a moz-do-not-send="true" href="http://review.gluster.org/4977">http://review.gluster.org/4977</a>
[2] <a moz-do-not-send="true" href="http://review.gluster.org/5002">http://review.gluster.org/5002</a>
[3] <a moz-do-not-send="true" href="http://review.gluster.org/4915">http://review.gluster.org/4915</a>
[4] <a moz-do-not-send="true" href="https://bugzilla.redhat.com/show_bug.cgi?id=989886">https://bugzilla.redhat.com/show_bug.cgi?id=989886</a>
<hr>
Gluster-users mailing
list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a moz-do-not-send="true" href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a></blockquote>
<hr>
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a moz-do-not-send="true" href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a>
</pre>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://supercolony.gluster.org/mailman/listinfo/gluster-users">http://supercolony.gluster.org/mailman/listinfo/gluster-users</a></pre>
</blockquote>
<br>
</body>
</html>