How do I prevent the management Audit log from rotating?
Issue
We're using logrotate to manage the EAP log files, so I'd like to disable any of the log rotation built into EAP. I managed to do this for the console and server logs, but I'm unable to prevent the audit log from rotating.
[standalone@localhost:9999 /] /core-service=management/access=audit:read-resource(recursive=true)
{
"outcome" => "success",
"result" => {
"file-handler" => {"file" => {
"formatter" => "json-formatter",
"max-failure-count" => 10,
"path" => "/var/log/jbossas/xxx_0000/audit/audit.log",
"relative-to" => undefined
}},
"json-formatter" => {"json-formatter" => {
"compact" => false,
"date-format" => "yyyy-MM-dd HH:mm:ss",
"date-separator" => " - ",
"escape-control-characters" => false,
"escape-new-line" => false,
"include-date" => true
}},
"logger" => {"audit-log" => {
"enabled" => true,
"log-boot" => true,
"log-read-only" => false,
"handler" => {"file" => {}}
}},
"syslog-handler" => undefined
}
}
Even although it's using a file-handler, it rotates all the time. How do I stop this?
(DEV) root@rhel:/var/log/jbossas/xxxx_0000/audit # ls -l
total 832
-rw------- 1 jboss jboss 88490 Jan 24 16:32 audit.log
-rw------- 1 jboss jboss 8356 Jan 24 16:25 audit.log2016-01-24_162518
-rw------- 1 jboss jboss 87490 Jan 24 16:25 audit.log2016-01-24_162521
-rw------- 1 jboss jboss 90746 Jan 24 16:25 audit.log2016-01-24_162525
-rw------- 1 jboss jboss 104589 Jan 24 16:25 audit.log2016-01-24_162528
-rw------- 1 jboss jboss 100614 Jan 24 16:25 audit.log2016-01-24_162530
-rw------- 1 jboss jboss 114280 Jan 24 16:25 audit.log2016-01-24_162531
-rw------- 1 jboss jboss 116507 Jan 24 16:25 audit.log2016-01-24_162604
-rw------- 1 jboss jboss 88490 Jan 24 16:26 audit.log2016-01-24_163233
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6.4.5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
