gogstash icon indicating copy to clipboard operation
gogstash copied to clipboard

file output module

Open horacimacias opened this issue 5 years ago • 5 comments

I'm trying to move from logstash to gogstash but one of the things that's preventing me from moving is the lack of the file output module.

Is there anything in the works to support this? Would you have any tips/pointers in case I try to implement this myself? I'm happy to try to get this working but I'm sure I can save some time using your initial direction/tips.

horacimacias avatar Apr 11 '19 14:04 horacimacias

There is no file output currently, you can view output/stdout and implement the file output base on it.

tengattack avatar Apr 11 '19 14:04 tengattack

thanks, I'll give it a try. I'm having trouble getting a clean checkout to build. Is there any particular commit I should be using?

If I checkout master, do a dep ensure and try go build main.go I get the following errors:

gogstash/vendor/github.com/tsaikd/gogstash/config/goglog vendor/github.com/tsaikd/gogstash/config/goglog/goglog.go:20:2: unknown field 'RuntimeCallerFilters' in struct literal of type logrusutil.ConsoleLogFormatter gogstash/vendor/github.com/docker/docker/opts vendor/github.com/docker/docker/opts/address_pools.go:15:12: undefined: ipamutils.NetworkToSplit

If try to build the 0.1.16 source using godep restore I get the following error instead:

go/src/github.com/go-fsnotify/fsnotify; git checkout 629574ca2a5df945712d3079857300b5e4da0236 fatal: reference is not a tree: 629574ca2a5df945712d3079857300b5e4da0236 godep: error downloading dep (github.com/go-fsnotify/fsnotify): exit status 128 godep: Error downloading some deps. Aborting restore and check.

any suggestions?

horacimacias avatar Apr 11 '19 21:04 horacimacias

I’m using go get -u instead of godep. Maybe godep is broken now

2019年4月12日(金) 5:38 horacimacias [email protected]:

thanks, I'll give it a try. I'm having trouble getting a clean checkout to build. Is there any particular commit I should be using?

If I checkout master, do a dep ensure and try go build main.go I get the following errors:

gogstash/vendor/github.com/tsaikd/gogstash/config/goglog

vendor/github.com/tsaikd/gogstash/config/goglog/goglog.go:20:2: unknown field 'RuntimeCallerFilters' in struct literal of type logrusutil.ConsoleLogFormatter gogstash/vendor/github.com/docker/docker/opts

vendor/github.com/docker/docker/opts/address_pools.go:15:12: undefined: ipamutils.NetworkToSplit

If try to build the 0.1.16 source using godep restore I get the following error instead:

go/src/github.com/go-fsnotify/fsnotify; git checkout 629574ca2a5df945712d3079857300b5e4da0236 fatal: reference is not a tree: 629574ca2a5df945712d3079857300b5e4da0236 godep: error downloading dep (github.com/go-fsnotify/fsnotify): exit status 128 godep: Error downloading some deps. Aborting restore and check.

any suggestions?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/tsaikd/gogstash/issues/81#issuecomment-482331080, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOCYVHF3QETYUG6JVIJSWLPP6VU5ANCNFSM4HFGX2ZQ .

tengattack avatar Apr 12 '19 01:04 tengattack

I tried to use file module:

output:
  - type: stdout

  - type: file
    path: /logging/ip_test.log

but for me it just printed: tail -f /logging/ip_test.log

%{log}
%{log}
%{log}
%{log}

looks like file output module doesn't work

KVInventoR avatar May 10 '22 10:05 KVInventoR

Have a look at the documentation for the output module. You need to specify the output format to tell what fields you want written to a file and the format for it.

helgeolav avatar May 10 '22 10:05 helgeolav