Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file output module #81

Open
horacimacias opened this issue Apr 11, 2019 · 5 comments
Open

file output module #81

horacimacias opened this issue Apr 11, 2019 · 5 comments

Comments

@horacimacias
Copy link

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.

@tengattack
Copy link
Contributor

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

@horacimacias
Copy link
Author

horacimacias commented Apr 11, 2019

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?

@tengattack
Copy link
Contributor

tengattack commented Apr 12, 2019 via email

@KVInventoR
Copy link

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

@helgeolav
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants