GoLogServer

command module
v0.0.0-...-cae1d7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 25 Imported by: 0

README

GoLogServer

GoLogServer is a part of the gologging system, a centralized logging system written in go. Daemons (GoLogD) push logs to the server. The server stores them and allows you to view and filter the logs using the client.

Logtypes

See GoLogD

Install

Compile

Install go 1.13, clone this repository. Then run

go mod download
go build -o gologserver

to compile it. Then you need to install a mysql database and import the database.db.
Run ./gologserver run once to create a config.json file.

Docker

Run following commands to create a new directory and a default config file

mkdir ./data &&
docker run -it --rm \
-v `pwd`/data:/app/data \ 
jojii/gologserver:latest

Run this to create a new container and start the logger
docker run -d --name gologserver \
--restart=unless-stopped \ 
-v `pwd`/data:/app/data \ 
jojii/gologserver:latest
Deploy in kubernetes

The Files are located in ./kubernetes

  1. Adjust the configmap.yaml to your needs.
  2. Run kubectl apply -f configmap.yaml to create the configmap
  3. Adjust servicePorts and externalIPs to your kubernetes setup
  4. Run kubectl apply -f logserver.yaml to create a deployment, service and a replicaset

Token generation

Logging daemons need a token. You have to add a row into the user table to activate one (or multiple)

INSERT INTO User (username, token) VALUES ('LoggerNameHere', '24ByteTokenHere')

Important

If you want to run this server after 02/07/2106 6:28am you need to run

ALTER TABLE `SystemdLog` CHANGE `date` `date` BIGINT(20) UNSIGNED NOT NULL;
ALTER TABLE `CustomLog` CHANGE `date` `date` BIGINT(20) UNSIGNED NOT NULL;

to avoid an integer overflow. The unixtimestamp will be greater than the maximum of an unsigned int so it won't work anymore!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL