Export prometheus stats of Axosyslog over HTTP.
Axosyslog-metrics-exporter serves Prometheus metrics over a HTTP interface (http://0.0.0.0:9577/metrics by default).
It needs UNIX file-level access to AxoSyslog's/syslog-ng™'s control socket, which is usually at
/var/lib/syslog-ng/syslog-ng.ctl or /var/run/syslog-ng/syslog-ng.ctl).
In container environments you need to provide access to that UNIX domain socket via shared volumes or other means.
The HTTP and command line interface is compatible with syslog_ng_exporter,
but we use the new native prometheus stats available in AxoSyslog and in syslog-ng™ from version 4.1.
We keep translating from the legacy stats interface in case of older syslog-ng™ versions.
axosyslog-metrics-exporter [options]
Options:
-service.port string
service bind port (default "9577" or $SERVICE_PORT)
-service.timeout string
request timeout (default "5s" or $SERVICE_TIMEOUT)
-socket.path string
syslog-ng control socket path (default "/var/run/syslog-ng/syslog-ng.ctl" or $CONTROL_SOCKET)docker run -d -p 9577:9577 -v $(echo /var/*/syslog-ng/syslog-ng.ctl):/syslog-ng.ctl \
ghcr.io/axoflow/axosyslog-metrics-exporter:latest --socket.path=/syslog-ng.ctlJust turn on metrics and let Logging Operator and Prometheus Operator taking care of exposing and collecting AxoSyslog metrics. For example:
apiVersion: logging.banzaicloud.io/v1beta1
kind: Logging
metadata:
name: my-logging
spec:
controlNamespace: logging-operator
loggingRef: my-logging
syslogNG:
globalOptions:
stats:
freq: 0 # disable dumping stats periodically as a log message
level: 2 # expose more detailed stats
metrics: # set to {} or customize it
serviceMonitor: true # deploy ServiceMonitor resourcesYou can replace the exporter sidecar's image by extending the Logging resource:
apiVersion: logging.banzaicloud.io/v1beta1
kind: Logging
metadata:
name: my-logging
spec:
#...
syslogNG:
statefulSet:
spec:
template:
spec:
containers:
- image: ghcr.io/axoflow/axosyslog-metrics-exporter:latest
name: exporterAxoSyslog Metrics Exporter is an integral part of the Axoflow Platform: it's used by the Axolet agent which is responsible for managing and observing existing AxoSyslog/syslog-ng™ services as well as AxoRouter. Request a sandbox or learn more.
In case you need help or want to contact us, open a GitHub issue, or come chat with us in the syslog-ng channel of the Axoflow Discord server.
If you have fixed a bug or would like to contribute your improvements to these images, open a pull request. We truly appreciate your help.
The Axoflow founder team consists of successful entrepreneurs with a vast knowledge and hands-on experience about observability, log management, and how to apply these technologies in the enterprise security context. We also happen to be the creators of wide-spread open source technologies in this area, like syslog-ng™, AxoSyslog and the Logging operator for Kubernetes.
To learn more about our products and our open-source projects, visit the Axoflow blog, or subscribe to the Axoflow newsletter.
syslog-ng is a trademark of One Identity.