File tree Expand file tree Collapse file tree 6 files changed +16
-14
lines changed Expand file tree Collapse file tree 6 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 11.git
2- splunk-log -plugin
2+ splunk-logging -plugin
Original file line number Diff line number Diff line change 1- splunk-log -plugin
2- splunk-log -plugin.tar.gz
1+ splunk-logging -plugin
2+ splunk-logging -plugin.tar.gz
33.idea /
44.DS_Store
55* .pyc
Original file line number Diff line number Diff line change 11FROM golang:1.9.2
22
3- WORKDIR /go/src/github.com/splunk/splunk-log -plugin/
3+ WORKDIR /go/src/github.com/splunk/splunk-logging -plugin/
44
5- COPY . /go/src/github.com/splunk/splunk-log -plugin/
5+ COPY . /go/src/github.com/splunk/splunk-logging -plugin/
66
77
8- RUN cd /go/src/github.com/splunk/splunk-log -plugin && go get
8+ RUN cd /go/src/github.com/splunk/splunk-logging -plugin && go get
99
10- RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /bin/splunk-log -plugin .
10+ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /bin/splunk-logging -plugin .
1111
1212FROM alpine:3.7
1313RUN apk --no-cache add ca-certificates
14- COPY --from=0 /bin/splunk-log -plugin /bin/
14+ COPY --from=0 /bin/splunk-logging -plugin /bin/
1515WORKDIR /bin/
16- ENTRYPOINT [ "/bin/splunk-log -plugin" ]
16+ ENTRYPOINT [ "/bin/splunk-logging -plugin" ]
Original file line number Diff line number Diff line change 1- PLUGIN_NAME =splunk-log -plugin
1+ PLUGIN_NAME =splunk/docker-logging -plugin
22PLUGIN_TAG =latest
3- PLUGIN_DIR =./splunk-log -plugin
3+ PLUGIN_DIR =./splunk-logging -plugin
44
55all : clean docker rootfs create
66package : clean docker rootfs zip
1010 rm -rf ${PLUGIN_DIR}
1111
1212docker :
13- @echo " ### docker build: rootfs image with splunk-log -plugin"
13+ @echo " ### docker build: rootfs image with splunk-logging -plugin"
1414 docker build -t ${PLUGIN_NAME} :rootfs .
1515
1616rootfs :
Original file line number Diff line number Diff line change 11{
22 "description" : " Splunk Logging Plugin" ,
33 "documentation" : " https://github.com/splunk/docker-logging-plugin" ,
4- "entrypoint" : [" /bin/splunk-log -plugin" ],
4+ "entrypoint" : [" /bin/splunk-logging -plugin" ],
55 "network" : {
66 "type" : " host"
77 },
Original file line number Diff line number Diff line change @@ -490,13 +490,14 @@ Do a HEC POST when
490490- time out
491491*/
492492func (l * splunkLogger ) worker () {
493- timer := time .NewTicker (l .hec .postMessagesFrequency )
494493 var messages []* splunkMessage
495494 for {
495+ timer := time .NewTicker (l .hec .postMessagesFrequency )
496496 select {
497497 case message , open := <- l .stream :
498498 // if the stream channel is closed, post the remaining messages in the buffer
499499 if ! open {
500+ logrus .Debugf ("stream is closed with %d events" , len (messages ))
500501 l .hec .postMessages (messages , true )
501502 l .lock .Lock ()
502503 defer l .lock .Unlock ()
@@ -513,6 +514,7 @@ func (l *splunkLogger) worker() {
513514 messages = l .hec .postMessages (messages , false )
514515 }
515516 case <- timer .C :
517+ logrus .Debugf ("messages buffer timeout, sending %d events" , len (messages ))
516518 messages = l .hec .postMessages (messages , false )
517519 }
518520 }
You can’t perform that action at this time.
0 commit comments