Initial commit
This commit is contained in:
48
files/logstash_exporter.in
Normal file
48
files/logstash_exporter.in
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD: head/sysutils/logstash_exporter/files/logstash_exporter.in 529909 2020-03-30 19:18:03Z decke $
|
||||
#
|
||||
# PROVIDE: logstash_exporter
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# logstash_exporter_enable (bool): Set to "YES" to enable logstash_exporter.
|
||||
# (default: "NO")
|
||||
#
|
||||
# logstash_exporter_listen (str): Exporter listening address
|
||||
# (default: ":9198")
|
||||
#
|
||||
# logstash_exporter_endpoint (str): Protocol, host and port on which logstash
|
||||
# metrics API listen
|
||||
# (default: "http://localhost:9600")
|
||||
#
|
||||
# logstash_exporter_log_level (str): Only log messages with the given severity
|
||||
# or above. [debug,info,warn,error,fatal]
|
||||
# (default: "info")
|
||||
#
|
||||
# logstash_exporter_log_format (str): Set log target and format. Exemple:
|
||||
# "logger:syslog?appname=bob&local=7"
|
||||
# or "logger:stdout?json=true"
|
||||
# (default: "logger:stderr")
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=logstash_exporter
|
||||
rcvar=logstash_exporter_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${logstash_exporter_enable="NO"}
|
||||
: ${logstash_exporter_listen=":9198"}
|
||||
: ${logstash_exporter_endpoint="http://localhost:9600"}
|
||||
: ${logstash_exporter_log_level="info"}
|
||||
: ${logstash_exporter_log_format="logger:stderr"}
|
||||
: ${logstash_exporter_pidfile:="/var/run/logstash_exporter.pid"}
|
||||
: ${logstash_exporter_user:="prometheus"}
|
||||
|
||||
command="/usr/local/bin/logstash_exporter"
|
||||
command_args="--logstash.endpoint=\${logstash_exporter_endpoint} --web.listen-address=\${logstash_exporter_listen} --log.level=\${logstash_exporter_log_level} --log.format=\${logstash_exporter_log_format}"
|
||||
start_cmd="/usr/sbin/daemon -u ${logstash_exporter_user} ${command} ${command_args}"
|
||||
|
||||
run_rc_command "$1"
|
Reference in New Issue
Block a user