Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,584
Community Members
 
Community Events
176
Community Groups

Pushing atlassian-jira-security.log to Syslog but keep writing events to a local file

Daniel Ebers Community Leader Mar 02, 2022

Hi Community,

although I feel this could be a rather special question for log4j it might not hurt to ask if the following is something you have done in your environment successfully...

Basically all is about logging, many details you even can learn from knowledgebase:
https://confluence.atlassian.com/adminjiraserver/logging-and-profiling-938847671.html

In log4j.properties we see the usual configuration that is delivered when Jira is installed for logging security related events to atlassian-jira.log

log4j.appender.securitylog=com.atlassian.jira.logging.JiraHomeAppender
log4j.appender.securitylog.File=atlassian-jira-security.log
log4j.appender.securitylog.MaxFileSize=20480KB
log4j.appender.securitylog.MaxBackupIndex=5
log4j.appender.securitylog.layout=com.atlassian.logging.log4j.NewLineIndentingFilteringPatternLayout
log4j.appender.securitylog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %t %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.ipaddr} %X{jira.request.url} %m%n

This works, of course, great - this is the default.

The ask now was to deliver the security related events to syslog - which also works using this configuration:

log4j.appender.securitylog=org.apache.log4j.net.SyslogAppender
log4j.appender.securitylog.syslogHost=127.0.0.1
log4j.appender.securitylog.layout=org.apache.log4j.EnhancedPatternLayout
log4j.appender.securitylog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %t %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.ipaddr} %X{jira.request.url} %m%n
log4j.appender.securitylog.Facility=LOCAL0

 

However, I seem to be totally stuck when the ask is to combine both .. having security related information in both locations:

  • syslog

    AND

  • atlassian-jira-security.log

In case there is an easy way to achieve that goal I would be very happy, from what I found out the appender (securitylog) must be unique. It is not capable of delivering events to both destinations, syslog and file at the same time unless I am missing a point?

Cheers,
Daniel

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events