You need to do some extra work to send it to syslog:
- On Spark Gateway side
a. Create new file “logging.properties” under /SparkGateway folder; (Copy the one from JRE/lib folder and modify it by appending the following lines at the end)
.level= INFO
handlers= java.util.logging.ConsoleHandler, com.agafua.syslog.SyslogHandler
# Syslog logger
com.agafua.syslog.SyslogHandler.transport = udp
com.agafua.syslog.SyslogHandler.facility = local0
com.agafua.syslog.SyslogHandler.port = 514
com.agafua.syslog.SyslogHandler.hostname = vmuser-xubuntu1604
b. add VM argument for command to start the gateway:
-Djava.util.logging.config.file=yourGatewayFolder/logging.properties2. On syslog server side (ubuntu)
a. Edit /etc/rsyslog.conf to comment-in (uncomment) the following two lines
module(load=”imudp”)
input(type=”imudp” port=”514″)
b. Enter “/etc/rsyslog.d” directory, create a new file “60-java.conf” with content (file name can be anything meaningful):
local0.* /var/log/gateway.log
c. Restart syslog service by executing:
sudo service rsyslog restart
Category:
SparkView