Push JIRA logs to syslog server

I need to push JIRA logs (tomcat logs) to remote syslog server.

2 answers

1 accepted

This widget could not be displayed.

Hi Heshan,

Try to use syslog appender. In log4j properties you add it and then you have to insert DNS SERVER NAME.... :)

It would be great if you could provide more information regarding enabling syslog appender.

Do you have a sample code that we can use as a guideline? Thanks

This widget could not be displayed.

You need to modify log4j.property file.

Add SYSLOG to log4j.rootCategory.

Ex:

# sample properties to initialize

log4j log4j.rootCategory= WARN, console, filelog, SYSLOG, fout


Then add below appender to this file

log4j.appender.SYSLOG.threshold=WARN 
log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender 
log4j.appender.SYSLOG.syslogHost=<IP address of local syslog server>
log4j.appender.SYSLOG.layout=org.apache.log4j.EnhancedPatternLayout
log4j.appender.SYSLOG.layout.ConversionPattern=%t %5r %-5p %-21d{yyyyMMdd HH:mm:ss,SSS} %c{2} [%x] %m %throwable{none}
log4j.appender.SYSLOG.Facility=LOCAL0


Then go to /etc/syslog-ng/syslog-ng.conf file

Un-comment below line udp(ip("0.0.0.0") port(514));


and add below lines

destination df_remote_log { udp("<IP address of remote syslog server>" port(514)); };
filter f_mit { facility(LOCAL0); };
log {
source(src);
filter(f_mit); destination(df_remote_log);
};

Finally restart tomcat and syslog services

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

97 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you