<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=Log_forwarding_with_quattor</id>
	<title>Log forwarding with quattor - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=Log_forwarding_with_quattor"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Log_forwarding_with_quattor&amp;action=history"/>
	<updated>2026-05-16T10:56:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=Log_forwarding_with_quattor&amp;diff=569&amp;oldid=prev</id>
		<title>ROMAIN ROUGNY rrougny@vub.ac.be: Created page with &quot;* All the configurations pertaining to rsyslog are in sites/.../config/rsyslog ** &#039;&#039;&#039;rsyslog.pan&#039;&#039;&#039; is handling the quattor filecopy of the conf files ** &#039;&#039;&#039;configs/*.conf&#039;&#039;&#039; ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Log_forwarding_with_quattor&amp;diff=569&amp;oldid=prev"/>
		<updated>2015-11-27T13:31:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;* All the configurations pertaining to rsyslog are in sites/.../config/rsyslog ** &amp;#039;&amp;#039;&amp;#039;rsyslog.pan&amp;#039;&amp;#039;&amp;#039; is handling the quattor filecopy of the conf files ** &amp;#039;&amp;#039;&amp;#039;configs/*.conf&amp;#039;&amp;#039;&amp;#039; ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* All the configurations pertaining to rsyslog are in sites/.../config/rsyslog&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;rsyslog.pan&amp;#039;&amp;#039;&amp;#039; is handling the quattor filecopy of the conf files&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;configs/*.conf&amp;#039;&amp;#039;&amp;#039; are the rsyslog conf file that indicate wich log file to forward&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* We use the Module imfile. It is automatically loaded inside base.conf. Also, all syslog locals are forwarded to the log server in this file.&lt;br /&gt;
 $ModLoad imfile&lt;br /&gt;
 *.* @@log10.wn.iihe.ac.be:5544&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* To add a specific file:&lt;br /&gt;
# You first need to create a conf file in configs/ , for instance myservice.conf:&lt;br /&gt;
 $InputFileName /path/to/my/log.log        # Complete path to the log file on the machine. Regex are not possible (so no *.log)&lt;br /&gt;
 $InputFileTag myservice:                  # service name: will be stored into &amp;#039;program&amp;#039; inside elk, for an easy grep.&lt;br /&gt;
 $InputFileStateFile myservice_accounting  # name of the state file (can be whatever). Just to store the file position for which rsyslog has already sent hte log lines.&lt;br /&gt;
 $InputFileFacility local6                 # Faclility. Unless you know hwat you want, local6 is fine. Anyway all locals are forwarded (in base.conf)&lt;br /&gt;
 $InputRunFileMonitor                      # Add the file to the monitored ones using the variables you just set before.&lt;br /&gt;
:2. Then you need to make sure this myservice.conf will be copied to the machine(s) you want to inside its /etc/rsyslogd.d/ and the rsyslogd service is reloaded. For this, edit rsyslog.conf and add:&lt;br /&gt;
  variable CONTENTS = file_contents(&amp;#039;config/rsyslog/configs/myservice.conf&amp;#039;);                          # Loads the content of myservice.conf into CONTENTS&lt;br /&gt;
  &amp;quot;/software/components/filecopy/services&amp;quot; = if( match(FULL_HOSTNAME,&amp;#039;^mymachine.iihe&amp;#039;) ) return(      # filecopy service + regex to match host name (optionnal)&lt;br /&gt;
      npush(escape(&amp;quot;/etc/rsyslog.d/myservice.conf&amp;quot;),                                                   # filename where to copy what&amp;#039;s in CONTENTS&lt;br /&gt;
            dict(&amp;#039;config&amp;#039;,CONTENTS , &amp;#039;owner&amp;#039;,&amp;#039;root:root&amp;#039; , &amp;#039;perms&amp;#039;,&amp;#039;0644&amp;#039; , &amp;#039;restart&amp;#039;,&amp;#039;service rsyslog restart&amp;#039; ) ) ) else SELF;           # Nothing to change&lt;br /&gt;
&lt;br /&gt;
:3. You need to commit + runcheck, then the logs should appear on the kibana dashboard &amp;#039;&amp;#039;&amp;#039;Logstash Search&amp;#039;&amp;#039;&amp;#039; [http://log10.iihe.ac.be/index.html#/dashboard/elasticsearch/Logstash%20Search here]. To see your logs, type in the Query bar &amp;#039;&amp;#039;&amp;#039;program: myservice&amp;#039;&amp;#039;&amp;#039; .&lt;/div&gt;</summary>
		<author><name>ROMAIN ROUGNY rrougny@vub.ac.be</name></author>
	</entry>
</feed>