« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
GitHub · Extracted in 888 ms

GitHub - MonaxGT/parsefields: Tools for parse JSON-like logs for collecting unique fields and events

Source: https://github.com/MonaxGT/parsefields

Repository navigation

parsefields
Public

About

Tools for parse JSON-like logs for collecting unique fields and events

Topics

event fields go golang json log logging mapping schema

Resources

Readme Apache-2.0 license Activity

Stars

9 stars

Watchers

1 watching

Forks

1 fork Report repository
Branches

Tags
Go to Branches page Go to Tags page

Latest commit

 

History


23 Commits
View commit history for this file.

Folders and files

Name Name Last commit message Last commit date
service/ parsefields service/ parsefields    
storage storage    
.gitignore .gitignore    
.travis.yml .travis.yml    
Dockerfile Dockerfile    
LICENSE LICENSE    
README.md README.md    
docker-compose.yml docker-compose.yml    
go.mod go.mod    
go.sum go.sum    
http.go http.go    
http_test.go http_test.go    
parse.go parse.go    
parse_test.go parse_test.go    

Repository files navigation

parsefields

Tool for parse JSON-like logs for collecting unique fields. Main purpose to collect JSON-data with typical events and fields it is useful when you want to create mapping schema for database and you want to reduce the risks of forgotten fields. By default separator between to nested structs is "->", but you can change it with environment.

API consist:

-  POST /v1/json/
-  POST /v1/mjson/
-  GET /v1/fileds/
-  GET  /v1/events/
-  GET /v1/events/:logname/:eventid
-  DELETE /v1/events/:logname/:eventid
-  DELETE /v1/fields/:field

P.S. additionally info about all new events/fields will be show in stdout.

Deploy

docker build . -t parsefield
docker run -d -p 8000:8000 parsefield

or

docker-compose -p 8000:8000 -d up 

Usage

Push new log for parse

Single message per request

curl -X POST -d '{"process_name": "calc.exe", "process_path":"C:\\windows\\system32"}'  127.0.0.1:8000/v1/json/

Multiple message per request

curl -X POST -d '[{"process_name": "calc.exe", "process_path":"C:\\windows\\system32"},{"process_image": "calc.exe", "process_path":"C:\\windows\\system32"},{"pid":"1"}]'  127.0.0.1:8000/v1/mjson/

All unique fields

curl 127.0.0.1:8000/v1/fields/

All unique events

curl 127.0.0.1:8000/v1/events/

Show body of event

curl 127.0.0.1:8000/v1/events/Sysmon/999 

Delete events, fields

curl -X DELETE 127.0.0.1:8000/v1/events/Sysmon/999 - delete events with logname Sysmon and eventId 999
curl -X DELETE 127.0.0.1:8000/v1/fields/key - delete field with name key

About

Tools for parse JSON-like logs for collecting unique fields and events

Topics

event fields go golang json log logging mapping schema

Resources

Readme Apache-2.0 license Activity

Stars

9 stars

Watchers

1 watching

Forks

1 fork Report repository

Releases

Packages

Used by

Contributors

Languages