Created
October 16, 2025 07:48
-
-
Save shairyar/0250bf037e33c426caf4bc0ea5c51aa5 to your computer and use it in GitHub Desktop.
Send syslog-ng logs to AppSignal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @version: 3.30 | |
| @include "scl.conf" | |
| # Sources | |
| source s_local { | |
| internal(); | |
| }; | |
| source s_network { | |
| network( | |
| port(514) | |
| transport("tcp") | |
| ); | |
| }; | |
| # AppSignal template | |
| template t_appsignal { | |
| template("<$PRI>1 $R_ISODATE $HOST $PROGRAM $PID ${MSGID:--} [APPSIGNAL-API-KEY] $MSG\n"); | |
| }; | |
| # AppSignal destination | |
| destination d_appsignal { | |
| network( | |
| "appsignal-endpoint.net" | |
| port(6514) | |
| transport("tls") | |
| tls( | |
| peer-verify("required-trusted") | |
| ca-dir("/etc/ssl/certs") | |
| sni(yes) | |
| ) | |
| template(t_appsignal) | |
| persist-name("appsignal_test") | |
| ); | |
| }; | |
| # Also log locally for debugging | |
| destination d_local { | |
| file("/var/log/syslog-ng/messages"); | |
| }; | |
| # Log what we're sending to AppSignal | |
| destination d_debug { | |
| file("/var/log/syslog-ng/appsignal-formatted.log" template(t_appsignal)); | |
| }; | |
| # Routing | |
| log { | |
| source(s_local); | |
| source(s_network); | |
| destination(d_appsignal); | |
| destination(d_local); | |
| destination(d_debug); | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment