Hi @pdl86,
I’m using a systemd unit file to start both, the Socket based python script and Kapacitor. This is where the user for these services are configured in my environment. If you would like to test this setup (I’m using CentOS7), here’s the files:
Kapacitor Server Unit File - /usr/lib/systemd/system/kapacitor.service
[Unit]
Description=Time series data processing engine.
Documentation=https://github.com/influxdb/kapacitor
After=network.target
[Service]
User=kapacitor
Group=kapacitor
LimitNOFILE=65536
EnvironmentFile=-/etc/default/kapacitor
ExecStart=/usr/bin/kapacitord -config /etc/kapacitor/kapacitor.conf $KAPACITOR_OPTS
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Prophet UDF Unit File - /etc/systemd/system/prophet-udf.service
[Unit]
Description=Time series data processing engine.
After=network.target
[Service]
User=kapacitor
Group=kapacitor
LimitNOFILE=65536
ExecStart=/bin/python /etc/kapacitor/udf/prophet_socket.py
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
Reload daemon after creating files
systemctl daemon-reload
Start Both Services
systemctl start prophet-udf
systemctl start kapacitor
or
service prophet-udf start
service kapacitor start
In regards to the log file, I would’ve expected more output. Check your kapacitor.conf for the log level setting. If it’s on INFO, change it to DEBUG.
[logging]
file = "/var/log/kapacitor/kapacitor.log"
level = "DEBUG"