Skip to content

Instantly share code, notes, and snippets.

@ajgarlag
Created June 24, 2016 07:38
Show Gist options
  • Save ajgarlag/b9629ee42fc1f6e90ff269f56e919ad2 to your computer and use it in GitHub Desktop.
Save ajgarlag/b9629ee42fc1f6e90ff269f56e919ad2 to your computer and use it in GitHub Desktop.
How to log your Linux to RunAbove PaaS Log with rsyslog 8.0+
$DefaultNetstreamDriverCAFile /etc/ssl/certs/ca-certificates.crt
template(
name="PaaSLog"
type="list"
) {
constant(value="<")
property(name="pri")
constant(value=">1")
constant(value=" ")
property(name="timestamp" dateFormat="rfc3339")
constant(value=" ")
property(name="hostname")
constant(value=" ")
property(name="app-name")
constant(value=" ")
property(name="procid")
constant(value=" - ")
constant(value="[")
constant(value="xxxxx@xxxxx")
constant(value=" ")
constant(value="X-OVH-TOKEN=\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"")
constant(value=" ")
constant(value="facility=")
constant(value="\"")
property(name="syslogfacility-text")
constant(value="\"")
constant(value=" ")
constant(value="priority=")
constant(value="\"")
property(name="syslogpriority-text")
constant(value="\"")
constant(value="]")
constant(value=" ")
property(name="msg")
constant(value="\n")
}
*.* action(type="omfwd" Template="PaaSLog" Target="laas.runabove.com"
Port="6514" Protocol="tcp" StreamDriver="gtls" StreamDriverMode="1"
StreamDriverAuthMode="x509/name" StreamDriverPermittedPeers="laas.runabove.com")

How to log your Linux to RunAbove PaaS Log with rsyslog 8.0+

This configuration was tested in Debian Jessie

1. Install required packages

apt-get install rsyslog rsyslog-gnutls

2. Configure rsyslog

Copy the file 50-ruabove-paas-log.conf to /etc/rsyslog.d

2.1 Edit custom params

Set your X-OVH-TOKEN and the SD-ID of the STRUCTURED-DATA

3. Enjoy

😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment