Skip to content

Instantly share code, notes, and snippets.

@shairyar
Created October 16, 2025 07:48
Show Gist options
  • Select an option

  • Save shairyar/0250bf037e33c426caf4bc0ea5c51aa5 to your computer and use it in GitHub Desktop.

Select an option

Save shairyar/0250bf037e33c426caf4bc0ea5c51aa5 to your computer and use it in GitHub Desktop.
Send syslog-ng logs to AppSignal
@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