cloudflare / logshare

logshare is a library & CLI client for retrieving logs from Cloudflare's Enterprise Log Share service.
https://support.cloudflare.com/hc/en-us/articles/216672448
BSD 3-Clause "New" or "Revised" License
80 stars 24 forks source link

client dest through options #6

Closed saurabhguptag closed 6 years ago

saurabhguptag commented 7 years ago

Can we have the following changes to have configurable destination of output?

On line 84 of logshare.go from if options != nil && options.Fields != nil { client.fields = options.Fields }

to

if options != nil { if options.Fields != nil { client.fields = options.Fields } if options.Dest != nil { client.dest = options.Dest } }

or anything better.

elithrar commented 7 years ago

If the latter, right now you can redirect output to a file, so I’m curious to understand your use case more. On Wed, Aug 23, 2017 at 6:57 AM Saurabh Gupta notifications@github.com wrote:

Can we have the following changes to have configurable destination of output?

On line 84 of logshare.go from if options != nil && options.Fields != nil { client.fields = options.Fields }

to

if options != nil { if options.Fields != nil { client.fields = options.Fields } if options.Dest != nil { client.dest = options.Dest } }

or anything better.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cloudflare/logshare/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AABIcMR_5DQtoE2gaVA5FOuMq_7WaJp6ks5sbC_YgaJpZM4PADjq .

saurabhguptag commented 7 years ago

Cloudflare currently only gives out combined domain analytics on its panel but not segregated based on subdomain, So to get that information I am only left out to loop through the logshare data. Now thanks to new received APIs we can filter the log fields and making manageable to store data at our end.

so I am planning to write wrapper around logshare project for our account which would post the data to either ELK or influx or either store the data to Filesystem and parse and push.

Do you have a solutions for my issue which could help me skip all this steps?

elithrar commented 7 years ago

There are no current solutions from us, although many customers have their own tooling to do this. We're investigating extending this CLI to push to the ElasticSearch bulk API, but no timeline (to be transparent: no resources committed to that yet)

On Wed, Aug 23, 2017 at 7:39 AM Saurabh Gupta notifications@github.com wrote:

Cloudflare currently only gives out combined domain analytics on its panel but not segregated based on subdomain, So to get that information I am only left out to loop through the logshare data. Now thanks to new received APIs we can filter the log fields and making manageable to store data at our end.

so I am planning to write wrapper around logshare project for our account which would post the data to either ELK or influx or either store the data to Filesystem and parse and push.

Do you have a solutions for my issue which could help me skip all this steps?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/cloudflare/logshare/issues/6#issuecomment-324356007, or mute the thread https://github.com/notifications/unsubscribe-auth/AABIcIN3-p5StcuY69GfNuUPg4DqfQ32ks5sbDmPgaJpZM4PADjq .