graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Go (Golang) to Graylog

Build Status

graylog-golang

graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Go (Golang) to Graylog

Example

package main

import (
  "github.com/robertkowalski/graylog-golang"
)

func main() {

  g := gelf.New(gelf.Config{})

  g.Log(`{
      "version": "1.0",
      "host": "localhost",
      "timestamp": 1356262644,
      "facility": "Google Go",
      "short_message": "Hello From Golang!"
  }`)
}

Setting Config Values

g := gelf.New(gelf.Config{
  GraylogPort:     80,
  GraylogHostname: "example.com",
  Connection:      "wan",
  MaxChunkSizeWan: 42,
  MaxChunkSizeLan: 1337,
})

Tests

go test

Benchmarks

go test --bench=".*"
Similar Resources

Kafka tool to emit tombstones for messages based on header value matches

Langolier Langolier is a CLI tool to consume a Kafka topic and emit tombstones for messages matched by header name/value pairs. Usage Usage of langoli

Sep 22, 2021

Service responsible for streaming Kafka messages.

kafka-stream 🧙🏼‍♂️ Service responsible for streaming Kafka messages. What it does? This service reads all messages from the input topic and sends th

Oct 16, 2021

Batch messages over a time interval

timebatch timebatch is a package for batching messages over a time interval. This can be useful for receiving messages that occur "quickly" and sendin

Nov 3, 2021

Send messages to icq-chatid when new order arrive

Получить номер последнего заказа, способ оплаты, способ доставки SELECT virtuemart_order_id FROM ce7l3_virtuemart_orders ORDER BY virtuemart_order_id

Dec 22, 2021

Go library for dealing with Ademco and Contact-ID messages

Ademco For Go A lightweight golang library for dealing with Contact-ID and Ademco messaging formats. Installation install via go get $ go get github.c

Jan 11, 2022

Korero - Send, recieve and manage messages on multiple platforms

Korero: Send, recieve and manage messages on multiple platforms Korero is a term

Jun 22, 2022

CLI tool for generating random messages with rules & publishing to the cloud services (SQS,SNS,PUB/SUB and etc.)

Randomsg A CLI tool to generate random messages and publish to cloud services like (SQS,SNS,PUB/SUB and etc.). TODO Generation of nested objects is no

Sep 22, 2022

Go service for CRUD note, log tracking by RabbitMQ

Go service for CRUD note, log tracking by RabbitMQ

Service for CRUD note, log tracking by RabbitMQ Architecture Three components: Service note CRUD, use a DB RabbitMQ for saving messages pushed from se

Nov 29, 2021

A demonstration of the transactional outbox messaging pattern (+ Log Trailing) with Amazon DynamoDB (+ Streams) written in Go

🎇 Gluon A composable message bus for Event-Driven systems written in Go.

Apr 12, 2022
Comments
  • Use Dial instead of DialUDP and ResolveUDPAddr

    Use Dial instead of DialUDP and ResolveUDPAddr

    The motivation behind this is to support IPv6 hosts as DialUDP currently gives preference to IPv4 (might be fixed in 1.14): https://github.com/golang/go/issues/28666

    Dial must be a sensible choice I believe as it takes off the overhead of DNS lookup and also prioritization of IPv4 and IPv6 which is automatically performed (v6 > v4).

  • Set MaxChunkSizeWan in Log() despite of setting lan chunksize

    Set MaxChunkSizeWan in Log() despite of setting lan chunksize

    Here when loging a new log https://github.com/robertkowalski/graylog-golang/blob/e5295cfa28272ada50cb9b5d97696ee06e49ed42/gelf.go#L72

    Instead, should I call this function? https://github.com/robertkowalski/graylog-golang/blob/e5295cfa28272ada50cb9b5d97696ee06e49ed42/gelf.go#L109

Sending line notifications using a binary, docker or Drone CI.
Sending line notifications using a binary, docker or Drone CI.

drone-line Sending line notifications using a binary, docker or Drone CI. Register Line BOT API Trial Please refer to LINE Business Center. Feature Se

Sep 27, 2022
A dead simple Go library for sending notifications to various messaging services.
A dead simple Go library for sending notifications to various messaging services.

A dead simple Go library for sending notifications to various messaging services. About Notify arose from my own need for one of my api server running

Jan 7, 2023
May 11, 2023
Laboratório de Kafka com Golang - Full Cycle

APACHE KAFKA "O Apache Kafka é uma plataforma distribuída de streaming de eventos open-source que é utilizada por milhares de empresas para uma alta p

Jan 27, 2022
RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue

RapidMQ RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue in the Go programming langu

Sep 27, 2022
Apache Kafka Web UI for exploring messages, consumers, configurations and more with a focus on a good UI & UX.
Apache Kafka Web UI for exploring messages, consumers, configurations and more with a focus on a good UI & UX.

Kowl - Apache Kafka Web UI Kowl (previously known as Kafka Owl) is a web application that helps you to explore messages in your Apache Kafka cluster a

Jan 3, 2023
An opinionated package that helps you print user-friendly output messages from your Go command line applications.

github.com/eth-p/clout (Command Line Output) clout is a package that helps you print user-friendly output messages from your Go command line applicati

Jan 15, 2022
A basic presence tracker, that sends messages when the provided user's presence changed, written with discordgo

presenceTracker A basic presence tracker, that sends messages when the provided user's presence changed, written with discordgo Just put the User ID t

Oct 12, 2022
A script written to automatically send whatsapp messages

whatsapp-auto-message A script written to automatically send whatsapp messages Config Dosyasını Ayarlama { "numbers": "phone_numbers.txt", "sleep": 2,

Jul 21, 2022
replicate messages from streaming channel to jetstream

NATS Streaming/Jetstream Replicator [SJR] Introduction This project replicates messages from streaming channels to jetstream. but why? At Snapp when w

Dec 15, 2022