Syslog NG - MacOS Testing
  • GSOC - Project Report
  • Testing Methodology
  • Testing Status
  • Installation
  • Modules
    • afsocket [17]
      • network() Source Driver
      • network() Destination Driver
      • syslog() Source/Destination Driver
      • unix-stream() Source Driver
      • unix-stream() Destination Driver
      • unix-dgram() Source/Destination Driver
      • TLS-Encryption
        • Using network()
        • Using syslog()
    • affile [6]
      • file() Source Driver
      • file() Destination Driver
      • pipe() Source Driver
      • pipe() Destination Driver
      • wildcard_file() Source Driver
      • stdin() Source Driver
    • afprog [2]
      • program() Source Driver
      • program() Destination Driver
    • system [1]
      • Collecting local logs pre macOS 10.15 Catalina
    • afuser [1]
    • pseudofile [1]
    • mod-python [7]
      • python() Source Driver
      • python-fetcher() Source Driver
      • python() Destination Driver*
    • afmongodb [1]
    • http [1]
    • riemann [1]
    • redis [1]
    • elasticsearch-http [1]
    • afsql [1]
    • afsmtp [1]
Powered by GitBook
On this page
  • Status
  • Testing
  • Configuration File Used
  • Proof

Was this helpful?

  1. Modules

riemann [1]

The riemann module has only one driver, which is the riemann() destination driver. The riemann() driver sends your data (for example, metrics or events) to a Riemann monitoring system.

Status

x86

Works

ARM

Works

Testing

Riemann Setup

To test this driver, we need to set up Riemann first. You can use Homebrew to brew install all the necessary dependencies.

To be able to successfully test this driver, we need to install riemann and riemann-client. To install all these, we need to do the following:

$ brew install riemann $ brew install riemann-client

To run riemann in the foreground, use: $ riemann

However, you might run into the issue of not having a config file present depending on your mode of installation. We can make our own config file for the same.

; -*- mode: clojure; -*-
; vim: filetype=clojure

(logging/init {:file "riemann.log"})

; Listen on the local interface over TCP (5555), UDP (5555), and websockets
; (5556)
(let [host "127.0.0.1"]
  (tcp-server {:host host})
  (udp-server {:host host})
  (ws-server  {:host host}))

; Expire old events from the index every 5 seconds.
(periodically-expire 5)

(let [index (index)]
  ; Inbound events will be passed to these streams:
  (streams
    (default :ttl 60
      ; Index all events immediately.
      index

      ; Log expired events.
      (expired
        (fn [event] (info "expired" event))))))
        
; Default Config File Till Now

(streams
  (where (description "syslog-ng riemann test")
    #(info %)))

Where, the last added statement allows us to print incoming messages that have the matching description.

Configuration File Used

@version: 3.33
@include "scl.conf"

options {
    stats-freq(10);
    time-reopen(10);
};

source custom
{
    example-msg-generator(
        num(20)
        freq(5)
        template("Message to Riemann")
    );
};

destination d_riemann {
	riemann(
		# Explicitly specify the localhost.
		server("127.0.0.1")
		port(5555)
		ttl("300.5")
		metric(int("$SEQNUM"))
		description("syslog-ng riemann test")
		state("ok")
		attributes(x-ultimate-answer("$(+ $PID 42)")
				   key("MESSAGE", rekey(add-prefix("x-")) )
				   )
	);
};

log {
    source(custom);
    destination(d_riemann);
};

Proof

Previoushttp [1]Nextredis [1]

Last updated 1 year ago

Was this helpful?

Riemann driver tested on macOS (x86)
Riemann driver tested on macOS (ARM)