This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project | |
| name = "normz" | |
| description = "zeromq microservice for log normalization" | |
| script = "zproject.gsl" | |
| email = "bknox@digitalocean.com" | |
| > | |
| <include filename = "license.xml" /> | |
| <version major = "0" minor = "1" patch = "0" /> | |
| <use project = "czmq"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ./autogen.sh | |
| autoreconf: Entering directory `.' | |
| autoreconf: configure.ac: not using Gettext | |
| autoreconf: running: aclocal -I config --force -I config | |
| configure.ac:138: error: AC_SUBST: `json-c_CFLAGS' is not a valid shell variable name | |
| ../../lib/autoconf/general.m4:1511: AC_ARG_VAR is expanded from... | |
| /usr/share/aclocal/pkg.m4:106: PKG_CHECK_MODULES is expanded from... | |
| configure.ac:138: the top level | |
| autom4te: /usr/bin/m4 failed with exit status: 1 | |
| aclocal: error: echo failed with exit status: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "czmq.h" | |
| // DEBUG - set to true for some output | |
| #define DEBUG false | |
| #define TRANSIT_TOTAL 1024 * 1024 | |
| #define TRANSIT_SLICE TRANSIT_TOTAL / 4 | |
| #define FRAGMENT_SIZE 65536 | |
| #define SERVER_HWM (TRANSIT_TOTAL / FRAGMENT_SIZE) * 2 | |
| #define TICK_SECONDS 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module(load="imczmq") | |
| input( | |
| type="imczmq" | |
| endpoints=">tcp://127.0.0.1:31337" | |
| socktype="ROUTER" | |
| authtype="CURVESERVER" | |
| clientcertpath="/home/bknox/.curve/" | |
| servercertpath="/home/bknox/.curve/logging_server_cert" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net" | |
| "os" | |
| "strings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package captainslog | |
| import "sync" | |
| type Queue struct { | |
| q []SyslogMsg | |
| lock *sync.Mutex | |
| } | |
| func NewQueue(max int) *Queue { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "czmq.h" | |
| int | |
| main (void) | |
| { | |
| zsock_t *server = zsock_new (ZMQ_SERVER); | |
| assert (server); | |
| zsock_bind (server, "tcp://127.0.0.1:31337"); | |
| char *msg = zstr_recv (server); | |
| printf ("msg: %s", msg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func TestExternalServer(t *testing.T) { | |
| client := NewClient(NewSecurityNull()) | |
| err := client.Connect("tcp://127.0.0.1:31337") | |
| if err != nil { | |
| t.Error(err) | |
| } | |
| err = client.Send([]byte("HELLO")) | |
| if err != nil { | |
| t.Error(err) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template(name="cee_syslog" type="list") { | |
| constant(value="{\"@timestamp\":\"") | |
| property(name="timereported" dateFormat="rfc3339") | |
| constant(value="\",\"syslog_host\":\"") | |
| property(name="hostname") | |
| constant(value="\",\"syslog_program\":\"") | |
| property(name="programname") | |
| constant(value="\",\"syslog_severity\":\"") | |
| property(name="syslogseverity-text") | |
| constant(value="\",\"syslog_facility\":\"") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "time" | |
| "github.com/zeromq/goczmq" | |
| ) |