FreeBSD Bugzilla – Attachment 191290 Details for
Bug 226435
sysutils/snmp_exporter: Update to 0.11.0 and log to syslog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
sysutils/snmp_exporter: Add log file
snmp_exporter-log_file.diff (text/plain), 1.70 KB, created by
David O'Rourke
on 2018-03-07 22:01:45 UTC
(
hide
)
Description:
sysutils/snmp_exporter: Add log file
Filename:
MIME Type:
Creator:
David O'Rourke
Created:
2018-03-07 22:01:45 UTC
Size:
1.70 KB
patch
obsolete
>Index: sysutils/snmp_exporter/files/snmp_exporter.in >=================================================================== >--- sysutils/snmp_exporter/files/snmp_exporter.in (revision 463837) >+++ sysutils/snmp_exporter/files/snmp_exporter.in (working copy) >@@ -22,6 +22,8 @@ > # snmp_exporter_config_file (string) Set the location of the snmp_exporter config > # configuration file. > # Default is "%%PREFIX%%/etc/snmp_exporter/snmp.yml" >+# snmp_exporter_log_file (string) Set file that snmp_exporter will log to. >+# Default is "/var/log/snmp_exporter.log" > > . /etc/rc.subr > >@@ -36,6 +38,7 @@ > : ${snmp_exporter_args:=""} > : ${snmp_exporter_listen_address:=":9116"} > : ${snmp_exporter_config_file:="%%PREFIX%%/etc/snmp_exporter/snmp.yml"} >+: ${snmp_exporter_log_file:="/var/log/snmp_exporter.log"} > > pidfile=/var/run/snmp_exporter.pid > command="/usr/sbin/daemon" >@@ -43,7 +46,7 @@ > command_args="-p ${pidfile} /usr/bin/env ${procname} \ > --web.listen-address=${snmp_exporter_listen_address} \ > --config.file=${snmp_exporter_config_file} \ >- ${snmp_exporter_args}" >+ ${snmp_exporter_args} >> ${snmp_exporter_log_file} 2>&1" > > start_precmd=snmp_exporter_startprecmd > >@@ -52,8 +55,8 @@ > if [ ! -e ${pidfile} ]; then > install -o ${snmp_exporter_user} -g ${snmp_exporter_group} /dev/null ${pidfile}; > fi >- if [ ! -d ${snmp_exporter_textfile_dir} ]; then >- install -d -o ${snmp_exporter_user} -g ${snmp_exporter_group} -m 1755 ${snmp_exporter_textfile_dir} >+ if [ ! -f ${snmp_exporter_log_file} ]; then >+ install -o ${snmp_exporter_user} -g ${snmp_exporter_group} -m 640 /dev/null ${snmp_exporter_log_file} > fi > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226435
:
191290
|
193311
|
194282