Sending some nats messages to logstash
Go Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CONTRIBUTING.md
LICENSE
Makefile
README.md
VERSION
nats_to_logstash.go
nats_to_logstash_test.go

README.md

nats_to_logstash

THIS REPO HAS BEEN DEPRECATED, PLEASE DON'T USE IT

Synopsis

This library will resend configured nats messages directly to logstash through a tcp connection.

In order to get some messages accessible through logstash we needed a tool to connect nats and logstash

Build status

  • master: CircleCI Master
  • develop: CircleCI Develop

Usage

You just need to send a 'monitor.user' message looking like:

  package main

  import(
    "runtime"

    "github.com/carrenza/nats_to_logstash"
  )

  logstash_hostname := "127.0.0.1"
  logstash_port := 9000
  logstash_timeout := 500
  nats_address := "nats://localhost:4222"
  l := nats_to_logstash.New(logstash_hostname, logstash_port, logstash_timeout, nats_address)

  subjects := []string{"*"}
  err := l.Subscribe(subjects, func(s string) string { return s })
  if err == nil {
    runtime.Goexit()
  }

Installation

make deps

Running Tests

make test

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Moreover, if your pull request contains patches or features, you must include relevant unit tests.

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, this project is maintained under the Semantic Versioning guidelines.

Copyright and License

Code and documentation copyright since 2015 r3labs.io authors.

Code released under the Mozilla Public License Version 2.0.