Skip to content

daystram/audit

Repository files navigation

🛰️ Audit

Github Actions Codecov Docker Pulls MIT License

Audit is a service monitor and incident manager.

Features

  • WIP: Service availability/uptime monitoring
  • WIP: Response time logging
  • WIP: HTTP service tracking
  • WIP: TCP/UDP service tracking
  • WIP: Incident log management
  • WIP: Multi-region distributed tracker agents

Services

The application comes in two parts:

Name Code Name Stack
Back-end audit-be Go, Gin + Gorm, gRPC, InfluxDB, PostgreSQL
Tracker audit-tr Go, gRPC
Front-end audit-fe TypeScript, Vue.js

Develop

Generate Protobuf and Mocks

The project relies on some parts of the code being generated, notably the protocol buffers and the mocks used for testing. To generate these files, install protoc and mockgen. Then run the target on the Makefile.

Install the Go and Go gRPC plugin for protoc:

$ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.27
$ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.1

Generate the files:

$ make all

audit-be

audit-be uses Go Modules module/dependency manager, hence at least Go 1.11 is required. To ease development, comstrek/air is used to live-reload the application. Install the tool as documented.

To begin developing, simply enter the sub-directory and run the development server:

$ cd audit-be
$ go mod tidy
$ air

audit-tr

Populate .env.development with the required credentials.

To begin developing, simply enter the sub-director and run the development server:

$ cd audit-fe
$ yarn
$ yarn serve

audit-fe

Populate .env.development with the required credentials.

To begin developing, simply enter the sub-directory and run the development server:

$ cd audit-fe
$ yarn
$ yarn serve

Deploy

Both audit-be and audit-fe are containerized and pushed to Docker Hub. They are tagged based on their application name and version, e.g. daystram/audit:be or daystram/audit:be-v1.1.0.

To run audit-be, run the following:

$ docker run --name audit-be --env-file ./.env -p 8080:8080 -d daystram/audit:be

And audit-fe as follows:

$ docker run --name audit-fe -p 80:80 -d daystram/audit:fe

Dependencies

The following are required for audit-be to function properly:

  • InfluxDB
  • PostgreSQL

Their credentials must be provided in the configuration file.

Helm Chart

WIP

Docker Compose

WIP

License

This project is licensed under the MIT License.