Skip to content

Instantly share code, notes, and snippets.

@toyama0919
Last active December 19, 2016 03:57
Show Gist options
  • Save toyama0919/79d15ec73c71b8bb18fff9648a972963 to your computer and use it in GitHub Desktop.
Save toyama0919/79d15ec73c71b8bb18fff9648a972963 to your computer and use it in GitHub Desktop.
<source>
type tail
format none
path /var/log/presto/presto.log
pos_file /var/log/td-agent/presto.pos
tag presto
</source>
<filter presto>
@type record_transformer
<record>
hostname "#{Socket.gethostname}"
</record>
</filter>
<match presto>
type copy
<store>
type rewrite_tag_filter
rewriterule1 message java\.lang\.OutOfMemoryError command.presto.restart
rewriterule2 message "Address already in use" command.presto.restart
rewriterule3 message .+ clear
</store>
<store>
type rewrite_tag_filter
rewriterule1 message .+ shiva.presto
</store>
</match>
[supervisord]
http_port=/var/tmp/supervisor.sock ; (default is to run a UNIX domain socket server)
http_port=127.0.0.1:9001 ; (alternately, ip_address:port specifies AF_INET)
;sockchmod=0700 ; AF_UNIX socketmode (AF_INET ignore, default 0700)
;sockchown=nobody.nogroup ; AF_UNIX socket uid.gid owner (AF_INET ignores)
;umask=022 ; (process file creation umask;default 022)
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (logging level;default info; others: debug,warn)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
;nocleanup=true ; (don't clean up tempfiles at start;default false)
;http_username=user ; (default is no username (open system))
;http_password=123 ; (default is no password (open system))
;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP)
;user=chrism ; (default is current user, required if root)
;directory=/tmp ; (default is not to cd during start)
;environment=KEY=value ; (key value pairs to add to environment)
[supervisorctl]
serverurl=unix:///var/tmp/supervisor.sock ; use a unix:// URL for a unix socket
serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris ; should be same as http_username if set
;password=123 ; should be same as http_password if set
;prompt=mysupervisor ; cmd line prompt (default "supervisor")
; The below sample program section shows all possible program subsection values,
; create one or more 'real' program: sections to be able to control them under
; supervisor.
[program:presto]
command=/usr/local/presto-server/bin/launcher run
log_stdout=true
log_stderr=true
directory=/usr/local/presto-server
logfile=/var/log/presto/presto.log
autorestart=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment