first commit
This commit is contained in:
42
files/elasticsearch_exporter.in
Normal file
42
files/elasticsearch_exporter.in
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD: head/sysutils/elasticsearch_exporter/files/elasticsearchg_exporter.in 529909 2020-03-30 19:18:03Z decke $
|
||||
#
|
||||
# PROVIDE: elasticsearch_exporter
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# elasticsearch_exporter_enable (bool): Set to "YES" to enable elasticsearchg_exporter.
|
||||
# (default: "NO")
|
||||
#
|
||||
# elasticsearch_exporter_listen (str): Exporter listening address
|
||||
# (default: ":9114")
|
||||
#
|
||||
# elasticsearch_exporter_endpoint (str): Protocol, host and port on which elasticsearch
|
||||
# listen
|
||||
# (default: "http://localhost:9200")
|
||||
#
|
||||
# elasticsearch_exporter_log_level (str): Only log messages with the given severity
|
||||
# or above. [debug,info,warn,error]
|
||||
# (default: "info")
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=elasticsearch_exporter
|
||||
rcvar=elasticsearch_exporter_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${elasticsearch_exporter_enable="NO"}
|
||||
: ${elasticsearch_exporter_listen=":9114"}
|
||||
: ${elasticsearch_exporter_endpoint="http://localhost:9200"}
|
||||
: ${elasticsearch_exporter_log_level="info"}
|
||||
: ${elasticsearch_exporter_pidfile:="/var/run/elasticsearch_exporter.pid"}
|
||||
: ${elasticsearch_exporter_user:="prometheus"}
|
||||
|
||||
command="/usr/local/bin/elasticsearch_exporter"
|
||||
command_args="--es.uri=\${elasticsearch_exporter_endpoint} --web.listen-address=\${logstash_exporter_listen} --log.level=\${logstash_exporter_log_level}"
|
||||
start_cmd="/usr/sbin/daemon -u ${elasticsearch_exporter_user} ${command} ${command_args}"
|
||||
|
||||
run_rc_command "$1"
|
Reference in New Issue
Block a user