From 7b4ff754f4e3e56c8d1232bf0c02ff90fefe85cc Mon Sep 17 00:00:00 2001 From: sschindler Date: Fri, 2 Oct 2015 21:01:47 +0200 Subject: [PATCH] cosmetic changes * minor renaming of samples * readme adapted --- Makefile | 12 ++++++------ README.md | 16 ++++++++++++++-- ...son-gelf-packaging.c => json-gelf-encoding.c} | 0 3 files changed, 20 insertions(+), 8 deletions(-) rename sample/{json-gelf-packaging.c => json-gelf-encoding.c} (100%) diff --git a/Makefile b/Makefile index b72123e..f549fc3 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ default: journal-gateway-gelf-source source: journal-gateway-gelf-source -sample-gelf: json-gelf-packaging +sample-gelf: json-gelf-encoding sample-curl: curl-try-sending @@ -24,11 +24,11 @@ journal-gateway-gelf-source: journal-gateway-gelf-source.o journal-gateway-gelf-source.o: $(SRC_DIR)/journal-gateway-gelf-source.c $(CC) $(CFLAGS) $(SRC_DIR)/journal-gateway-gelf-source.c -o journal-gateway-gelf-source.o -json-gelf-packaging: json-gelf-packaging.o - $(CC) json-gelf-packaging.o -ljansson $(SYSTEMD_LDFLAGS) -o json-gelf-packaging +json-gelf-encoding: json-gelf-encoding.o + $(CC) json-gelf-encoding.o -ljansson $(SYSTEMD_LDFLAGS) -o json-gelf-encoding -json-gelf-packaging.o: $(SAMPLE_DIR)/json-gelf-packaging.c - $(CC) $(CFLAGS) $(SAMPLE_DIR)/json-gelf-packaging.c -o json-gelf-packaging.o +json-gelf-encoding.o: $(SAMPLE_DIR)/json-gelf-encoding.c + $(CC) $(CFLAGS) $(SAMPLE_DIR)/json-gelf-encoding.c -o json-gelf-encoding.o curl-try-sending: curl-try-sending.o $(CC) curl-try-sending.o $(shell curl-config --libs) -o curl-try-sending @@ -37,4 +37,4 @@ curl-try-sending.o: $(SAMPLE_DIR)/curl-try-sending.c $(CC) $(CFLAGS) $(shell curl-config --cflags) $(SAMPLE_DIR)/curl-try-sending.c -o curl-try-sending.o clean: - rm -f *.o journal-gateway-gelf-source json-gelf-packaging curl-try-sending + rm -f *.o journal-gateway-gelf-source json-gelf-encoding curl-try-sending diff --git a/README.md b/README.md index fcaf909..3f96739 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ Mode of Operation | | | | +----------------+ +-----+--+-----+ ``` -Installation ------------- +Build +----- You will need jansson, libcurl and the systemd-headers. @@ -80,6 +80,18 @@ JOURNAL_SOURCE_DIR the source folder for the logs. Use --help for an overview of all commands. +## Configuration + +You can change two parameters in /etc/journal-gateway-gelf-source.conf: + +``` +JOURNAL_REMOTE_TARGET="http://127.0.0.1:12345/gelf" +JOURNAL_SOURCE_DIR="/var/log/journal/" +``` + +which changes the target and the source folder of the logs. +Mind the format of the target if you want to send messages to a graylog server. + Example ------- diff --git a/sample/json-gelf-packaging.c b/sample/json-gelf-encoding.c similarity index 100% rename from sample/json-gelf-packaging.c rename to sample/json-gelf-encoding.c