A simple but powerful centralized logging solution written in go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
JojiiOfficial cae1d7f93b
Merge pull request #20 from JojiiOfficial/dependabot/go_modules/github.com/JojiiOfficial/GoAw-1.2.6
1 year ago
constants update code style 1 year ago
kubernetes remove IP 1 year ago
.gitignore improve config format 1 year ago
Config.go update config datatypes 1 year ago
Database.go add clean logs command 1 year ago
Dockerfile update readme.md 1 year ago
Handlers.go fix parsing pushed logs 1 year ago
Helper.go update code style 1 year ago
LICENSE Initial commit 2 years ago
Models.go update code style 1 year ago
Queries.go update code style 1 year ago
README.md Update README.md 1 year ago
Responses.go added fetch ips 2 years ago
RestLogger.go improve logging 1 year ago
Routes.go added push custom log formats 2 years ago
StartServer.go add graceful shutdown 1 year ago
database.db added Database structure 2 years ago
go.mod Bump github.com/JojiiOfficial/GoAw from 1.2.1 to 1.2.6 1 year ago
go.sum Bump github.com/JojiiOfficial/GoAw from 1.2.1 to 1.2.6 1 year ago
main.go add graceful shutdown 1 year ago
update.sh updated update.sh 2 years ago

README.md

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!