๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/prometheus/templates/snmp_init.j2

15 lines
457 B

2 years ago
#!/sbin/openrc-run
name="$SVCNAME"
directory="{{ prometheus_conf_dir }}"
command=/usr/bin/snmp_exporter
command_args="--config.file={{ prometheus_snmp_file | quote }} --web.listen-address={{ ('127.0.0.1:' ~ prometheus_snmp_port) | quote }}"
command_user="{{ prometheus_user }}:{{ prometheus_group }}"
pidfile="/var/run/$SVCNAME.pid"
command_background=true
start_stop_daemon_args="--stdout-logger logger --stderr-logger logger"
depend() {
after net
}