Date: Fri, 20 Feb 2026 11:02:19 +0000 From: Juraj Lutter <otis@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 505c53770b24 - main - www/access-log-exporter: Add new port Message-ID: <69983f3b.27552.1db45e14@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by otis: URL: https://cgit.FreeBSD.org/ports/commit/?id=505c53770b24ac527c523ad4a66f5078a8df7d63 commit 505c53770b24ac527c523ad4a66f5078a8df7d63 Author: Juraj Lutter <otis@FreeBSD.org> AuthorDate: 2026-02-20 10:52:34 +0000 Commit: Juraj Lutter <otis@FreeBSD.org> CommitDate: 2026-02-20 11:02:01 +0000 www/access-log-exporter: Add new port access-log-exporter is a Prometheus exporter that receives web server access logs via syslog and converts them into metrics. access-log-exporter processes logs from multiple web servers and has undergone testing with Nginx and Apache HTTP Server 2.4. It supports flexible metric configuration through presets and provides comprehensive monitoring capabilities for web traffic analysis. --- www/Makefile | 1 + www/access-log-exporter/Makefile | 41 +++++++++++++ www/access-log-exporter/distinfo | 5 ++ .../files/access_log_exporter.in | 68 ++++++++++++++++++++++ www/access-log-exporter/pkg-descr | 7 +++ 5 files changed, 122 insertions(+) diff --git a/www/Makefile b/www/Makefile index 31e9b48da3ab..77dad4be39b3 100644 --- a/www/Makefile +++ b/www/Makefile @@ -26,6 +26,7 @@ SUBDIR += R-cran-webutils SUBDIR += SNIP SUBDIR += UniversalFeedCreator + SUBDIR += access-log-exporter SUBDIR += adguardhome SUBDIR += adjuster SUBDIR += agate diff --git a/www/access-log-exporter/Makefile b/www/access-log-exporter/Makefile new file mode 100644 index 000000000000..eca12bd59cf1 --- /dev/null +++ b/www/access-log-exporter/Makefile @@ -0,0 +1,41 @@ +PORTNAME= access-log-exporter +DISTVERSIONPREFIX= v +DISTVERSION= 0.3.6 +CATEGORIES= www + +MAINTAINER= otis@FreeBSD.org +COMMENT= Prometheus exporter to convert webserver logs into metrics +WWW= https://github.com/jkroepke/access-log-exporter + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +EXTRACT_DEPENDS= ${BUILD_DEPENDS} + +USES= go:modules +USE_RC_SUBR= access_log_exporter + +GO_MODULE= github.com/jkroepke/access-log-exporter +GO_TARGET= ./cmd/${PORTNAME} + +SUB_FILES= access_log_exporter + +PLIST_FILES= bin/access-log-exporter + +OPTIONS_DEFINE= EXAMPLES +OPTIONS_DEFAULT= EXAMPLES + +EXAMPLES_PLIST_FILES+= share/examples/${PORTNAME}/grafana-dashboard.json + +do-install: + ${INSTALL_PROGRAM} ${WRKDIR}/bin/access-log-exporter ${STAGEDIR}${PREFIX}/bin + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/packaging/etc/access-log-exporter/config.yaml \ + ${STAGEDIR}${ETCDIR}/config.yaml.sample + ${ECHO} "@sample ${ETCDIR}/config.yaml.sample" >> ${TMPPLIST} + +post-install-EXAMPLES-on: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/contrib/grafana-dashboard.json ${STAGEDIR}${EXAMPLESDIR} + +.include <bsd.port.mk> diff --git a/www/access-log-exporter/distinfo b/www/access-log-exporter/distinfo new file mode 100644 index 000000000000..c29c26dddf4c --- /dev/null +++ b/www/access-log-exporter/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1771582735 +SHA256 (go/www_access-log-exporter/access-log-exporter-v0.3.6/v0.3.6.mod) = 891c121ede17770e7f42306a64b2a058cc7cb6ee92089f0ff8e7f27c4dab72be +SIZE (go/www_access-log-exporter/access-log-exporter-v0.3.6/v0.3.6.mod) = 3574 +SHA256 (go/www_access-log-exporter/access-log-exporter-v0.3.6/v0.3.6.zip) = 27958df1645817806fd5ec6d871d693940c64d8cc0aa328673a60a118bffe9ea +SIZE (go/www_access-log-exporter/access-log-exporter-v0.3.6/v0.3.6.zip) = 119332 diff --git a/www/access-log-exporter/files/access_log_exporter.in b/www/access-log-exporter/files/access_log_exporter.in new file mode 100644 index 000000000000..e60875c8ad0e --- /dev/null +++ b/www/access-log-exporter/files/access_log_exporter.in @@ -0,0 +1,68 @@ +#!/bin/sh + +# PROVIDE: access_log_exporter +# REQUIRE: DAEMON NETWORKING +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# access_log_exporter_enable (bool): Set to NO by default. +# Set it to YES to enable access_log_exporter. +# access_log_config (string): Set to %%ETCDIR%%/config.yaml +# Set it to the path of desired config file +# access_log_exporter_user (string): Set user that access_log_exporter will run under +# Default is "www". +# access_log_exporter_group (string): Set group that access_log_exporter will run under +# Default is "www". +# access_log_exporter_syslog_priority (str): Set to "info" by default. +# Set it to priority to be used by syslog +# access_log_exporter_syslog_facility (str): Set to "daemon" by default. +# Set it to facility to be used by syslog +# access_log_exporter_syslog_tag (str): Set to "access-log-exporter" by default. +# Set it to tag to be used by syslog + +. /etc/rc.subr + +name=access_log_exporter +desc="Prometheus exporter of webserver logs into metrics" +rcvar=access_log_exporter_enable + +load_rc_config $name + +: ${access_log_exporter_enable:=NO} +: ${access_log_exporter_config:=%%ETCDIR%%/config.yaml} +: ${access_log_exporter_user:=www} +: ${access_log_exporter_group:=www} +: ${access_log_exporter_syslog_priority=info} +: ${access_log_exporter_syslog_facility=daemon} +: ${access_log_exporter_syslog_tag=access-log-exporter} + +pidfile="/var/run/${name}.pid" +command=/usr/sbin/daemon +procname="%%PREFIX%%/bin/access-log-exporter" +command_args="-S -m 3 \ + -l ${access_log_exporter_syslog_facility} \ + -s ${access_log_exporter_syslog_priority} \ + -t ${name} \ + -T ${access_log_exporter_syslog_tag} \ + -p ${pidfile} \ + /usr/bin/env ${procname} \ + --config ${access_log_exporter_config} \ + ${access_log_exporter_args}" + +start_precmd=${name}_startprecmd +extra_commands=reload + +access_log_exporter_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install \ + -o ${access_log_exporter_user} \ + -g ${access_log_exporter_group} \ + /dev/null ${pidfile}; + fi +} + +run_rc_command "$1" diff --git a/www/access-log-exporter/pkg-descr b/www/access-log-exporter/pkg-descr new file mode 100644 index 000000000000..9223e91c0384 --- /dev/null +++ b/www/access-log-exporter/pkg-descr @@ -0,0 +1,7 @@ +A Prometheus exporter that receives web server access logs via syslog and +converts them into metrics. + +access-log-exporter processes logs from multiple web servers and has undergone +testing with Nginx and Apache HTTP Server 2.4. It supports flexible metric +configuration through presets and provides comprehensive monitoring +capabilities for web traffic analysis.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69983f3b.27552.1db45e14>
