Giter VIP home page Giter VIP logo

observe-kafka-go's Introduction

observe-kafka-go

Unofficial Observe Apache Kafka consumer

High-level Architecture

Architecture

Instructions

Build the binary

git clone https://github.com/rustomax/observe-kafka-go.git
cd observe-kafka-go
go mod tidy
go build

Create configuration file

Create config file. i.e. /etc/observe/kafka-linux-host-monitoring.json, replacing placeholders with correct values.

{
    "apiUrl": "collect.observeinc.com/v1/http",
    "extraPath": "observe/collector/host",
    "customer": "<OBSERVE_CUSTOMER_NUMBER>",
    "token": "<OBSERVE_TOKEN>",
    "topic": "<KAFKA_TOPIC",
    "brokerAddress": "<KAFKA_BROKER_URI",
    "consumerGroup": "<KAFKA_CONSUMER_GROUP"    
}

For example:

{
    "apiUrl": "collect.observeinc.com/v1/http",
    "extraPath": "observe/collector/host",
    "customer": "123456789012",
    "token": "super-secret-datastream-token-generated-by-observe",
    "topic": "linux-host-monitoring",
    "brokerAddress": "kafka1.home:9092",
    "consumerGroup": "observe-consumer"
}

If you change the location of the config file, don't forget to update systemd script observe-kafka-go.service with the path to the config file ExecStart=/usr/bin/observe-kafka-go /etc/observe/kafka-linux-host-monitoring.json

Install the binary

sudo mv observe-kafka-go /usr/bin/
sudo chown root.root /usr/bin/observe-kafka-go
chmod 755 /usr/bin/observe-kafka-go

Configure rsyslog

sudo cp scripts/40-observe-kafka-go.conf /etc/rsyslog.d
sudo mkdir /var/log/observe/
sudo chown syslog.adm /var/log/observe/

Install systemd service

sudo cp scripts/observe-kafka-go.service /etc/systemd/system/
sudo chown root.root /etc/systemd/system/observe-kafka-go.service
sudo systemctl daemon-reload
sudo systemctl enable --now observe-kafka-go.service

Verification

Check that service is running and sending data to Observe

sudo systemctl status observe-kafka-go

Consumer-Service

Review the detailed consumer log

tail -f /var/log/observe/observe-kafka-go.log

Check that the data is coming into Observe

Verify that the datastream (or the Observation table) is receiving the events, i.e.

Datastream

observe-kafka-go's People

Contributors

rustomax avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.