Code Monkey home page Code Monkey logo

Comments (8)

allinurl avatar allinurl commented on May 21, 2024

Ruslan, how are you running goaccess from the cron? Also make sure
~/.goaccessrc exists.

On Wed, Oct 2, 2013 at 4:53 PM, Ruslan Keba [email protected] wrote:

Looks like goaccess do not see ~/.goaccessrc when running from cron.
I feel it is not goaccess problem, but rather cron.
May be you can help?

Thank you!


Reply to this email directly or view it on GitHub.

from goaccess.

abgit avatar abgit commented on May 21, 2024

@rukeba , make sure you use absolute paths inside cron.
Anyway, if you don't need to export html or csv you shouldn't get any problem.

best,

from goaccess.

rukeba avatar rukeba commented on May 21, 2024

@allinurl, I am running goaccess from the cron like this:

# cd to $HOME above is present
cat /var/log/nginx/access.***.log.1 | goaccess -a > report.html

The ~/.goaccessrc exists and it contains custom log format (%T added).
When i run goaccess manually, i get report with request times.
When it running from cron i get report without request time.

from goaccess.

rukeba avatar rukeba commented on May 21, 2024

@abgit thank you! i will check it.

from goaccess.

allinurl avatar allinurl commented on May 21, 2024

@rukeba, as @abgit said, check your paths. If running

cat /var/log/nginx/access.***.log.1 | goaccess -a > report.html

shows request times, then running it through the cron should do the same thing.

You can also try using -p to specify the configuration file (v0.6.1).

Let me know how that goes. Thanks!

On Thu, Oct 3, 2013 at 4:54 AM, Ruslan Keba [email protected] wrote:

@abgit thank you! i will check it.


Reply to this email directly or view it on GitHub.

from goaccess.

abgit avatar abgit commented on May 21, 2024

@rukeba @allinurl , i have already a goaccess executed inside cron.

Anyway, i have post a issue about a problem when goaccess is used inside sh -c. goaccess tries to automagically detect if output ">" is used in command line based on isatty(). The problem is that isatty() don't detect ">" when goaccess is invoked inside a sh -c as string.

I think it's better to make goaccess export only when defined explicity by command line, eg:
goaccess -f access.log -o html > output.html
goaccess -f access.log -o csv > output.csv
This way, we don't need to goaaccess tries to automagically find if ">" was used or not .. and it will work as expected when invoked inside a linux "find".

best,

from goaccess.

rukeba avatar rukeba commented on May 21, 2024

Thank you, @allinurl, @abgit for suggestions!

You were right, the issue was in paths.
goaccess 0.5 located in /usr/bin, but newest goaccess 0.6.1 located in /usr/local/bin and by default called 0.5.

I fixed goaccess path to absolute path and explicitly set path to config with -p option.

Now all works like a charm.
Many thanks!

from goaccess.

allinurl avatar allinurl commented on May 21, 2024

That's great! Closing this issue.

from goaccess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.