go-kafka-hook

module
v0.0.0-...-702e412 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: Apache-2.0

README

go-kafka-hook

A web application is written in go lang; that logs the HTTP requests it responds; to a file, Kafka, and a database.

Prerequisites

  • docker
  • docker-compose

Installation

Clone the repo

git clone https://github.com/ecoderat/go-kafka-hook.git

Change to the directory where you cloned this repository

cd go-kafka-hook

Run docker-compose with build tag

sudo docker-compose up --build

Monitoring with Grafana

Usage Grafana
  1. Open a new tab.
  2. Browse to localhost:3000.
Add a metrics data source
  1. In the side bar, hover your cursor over the Configuration (gear) icon, and then click Data Sources.
  2. Click Add data source.
  3. In the list of data sources, click Postgresql.
  4. In the URL box, enter http://172.17.0.1:5432.
  5. In the Database box, enter test.
  6. In the User box, enter postgres.
  7. In the Password box, enter password.
  8. In the SSL Mode box, turn disable.
  9. In the Version box, enter 12.
  10. Click Save & Test.
Build a dashboard
  1. In the side bar, hover your cursor over the Create (plus sign) icon and then click Dashboard.
  2. Click Add new panel.
  3. Configire like that:

Remove

Stops containers and removes containers with data

docker-compose down --remove-orphans --volumes

Contact

Murat Güngör - @ecoderat - [email protected]

Project Link: https://github.com/ecoderat/go-kafka-hook

License

Distributed under the Apache License. See LICENSE for more information.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳