summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-28 00:46:32 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-28 00:55:24 +0200
commit7b17a7d72f5ba5ad838b19803534c56a46f3bce9 (patch)
tree86d9c9f9faed485fe683e00c56dfbaa4324504fc /Makefile.am
parentbe3ea5eaf24f4507efe88b450f751da860a9d21c (diff)
journal: add minimal journal gateway daemon based on GNU libmicrohttpd
This minimal HTTP server can serve journal data via HTTP. Its primary purpose is synchronization of journal data across the network. It serves journal data in three formats: text/plain: the text format known from /var/log/messages application/json: the journal entries formatted as JSON application/vnd.fdo.journal: the binary export format of the journal The HTTP server also serves a small HTML5 app that makes use of the JSON serialization to present the journal data to the user. Examples: This downloads the journal in text format: # systemctl start systemd-journal-gatewayd.service # wget http://localhost:19531/entries Same for JSON: # curl -H"Accept: application/json" http://localhost:19531/entries Access via web browser: $ firefox http://localhost:19531/
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index be92356f67..f7249987d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2651,6 +2651,43 @@ EXTRA_DIST += \
CLEANFILES += \
src/journal/journald-gperf.c
+if HAVE_MICROHTTPD
+
+gatewayddocumentrootdir=$(pkgdatadir)/gatewayd
+
+rootlibexec_PROGRAMS += \
+ systemd-journal-gatewayd
+
+systemd_journal_gatewayd_SOURCES = \
+ src/journal/journal-gatewayd.c
+
+systemd_journal_gatewayd_LDADD = \
+ libsystemd-shared.la \
+ libsystemd-logs.la \
+ libsystemd-journal-internal.la \
+ libsystemd-id128-internal.la \
+ libsystemd-daemon.la \
+ $(MICROHTTPD_LIBS)
+
+systemd_journal_gatewayd_CFLAGS = \
+ -DDOCUMENT_ROOT=\"$(gatewayddocumentrootdir)\" \
+ $(AM_CFLAGS) \
+ $(MICROHTTPD_CFLAGS)
+
+EXTRA_DIST += \
+ units/systemd-journal-gatewayd.service.in
+
+dist_systemunit_DATA += \
+ units/systemd-journal-gatewayd.socket
+
+nodist_systemunit_DATA += \
+ units/systemd-journal-gatewayd.service
+
+dist_gatewayddocumentroot_DATA = \
+ src/journal/browse.html
+
+endif
+
# ------------------------------------------------------------------------------
if ENABLE_COREDUMP
systemd_coredump_SOURCES = \