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

Piping in 0.8 not working? #115

Closed
LeeNX opened this issue May 20, 2014 · 5 comments
Closed

Piping in 0.8 not working? #115

LeeNX opened this issue May 20, 2014 · 5 comments

Comments

@LeeNX
Copy link

LeeNX commented May 20, 2014

Seems that 0.8 piping might be broken or I am doing something wrong ...

If I do:
cat d7_live-access.log | goaccess -p ~/.goaccessrc
I get the help screen?

if I do:
goaccess -p ~/.goaccessrc -f d7_live-access.log
I get the awesome goaccess reporting screen!

Looking to process the *.gz files using zcat, but that was not working either.

@allinurl
Copy link
Owner

On 0.8 the way the config file is read changed, however, it should still be able to parse your previous config file. By default GoAccess will try to read a global config file, usually under /usr/etc/, otherwise it will look under ~/.goaccessrc.

Could you please post your goaccessrc file?

@LeeNX
Copy link
Author

LeeNX commented May 20, 2014

cat ~/.goaccessrc

color_scheme 1
date_format %d/%b/%Y
# ServerFQDN ClientIP RemoteLogName RemoteUserName TimeRequestRecieved FirstLineOfRequest FinalStatus SizeOfResponceBytes Referer UserAgent TimeTaken2ServeRequest_ms
log_format %^ %h %^ %^[%d:%^] "%r" %s %b "%R" "%u" %D
log_file STDIN

goaccess is not using my ~/.goaccessrc file as the config file, that is why I am doing -p ~/.goaccessrc, but the problem I am referring to here is that I can't pipe a log file to goaccess as I have been able to in the past.

@allinurl
Copy link
Owner

By default it tries to read a global config file /usr/etc/goaccess.conf, you can use --no-global-config to ignore reading this file and instead it will read ~/.goaccessrc.

The pipe should work if you remove the log_file STDIN line from your ~/.goaccessrc.

cat log | goaccess --no-global-config

@LeeNX
Copy link
Author

LeeNX commented May 20, 2014

You are spot on!! Thanks, removing '''log_file STDIN''' from my ~/.goaccessrc worked.

Maybe adding https://github.com/allinurl/goaccess/blob/master/config/goaccess.conf to /etc/ in the DEB packages would help.

Making a short version of --no-global-config like -ngc or something would be easier too, I am damed lazy bugger. 😃

I believe this issue is closed?

Thanks for the quick response and support.

@allinurl
Copy link
Owner

I can certainly add a shortcut for --no-global-config. I'll update the deb packages to use /etc by default. Thanks for pointing this out.

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

2 participants