Hi,

InfluxDB doesn't seem to have an internal way to forward its logs to a
file or syslog. As far as I understood, one has to get the information
from STDOUT/STDERR.

The following patch allows sending the logs to syslog. It uses the
logger(1) utility. It is based on what is done with sysutils/prometheus.

BTW, it seems there's no "MAINTAINER" in the Makefile.

Regards.
--- databases/influxdb/pkg/influxdb.rc.orig     Thu Jan 11 20:27:01 2018
+++ databases/influxdb/pkg/influxdb.rc  Fri Mar 29 17:12:07 2019
@@ -4,4 +4,6 @@
 
 daemon="${TRUEPREFIX}/bin/influxd"
+daemon_flags=""
+daemon_priority="daemon.info"
 daemon_user="_influx"
 
@@ -10,4 +12,9 @@
 rc_bg=YES
 rc_reload=NO
+
+rc_start() {
+  ${rcexec} "${daemon} ${daemon_flags} 2>&1 | \
+    logger -p ${daemon_priority} -t influxd"
+}
 
 rc_cmd $1

Reply via email to