AFP548 Changing the world one server at a time.

AWStats?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #357506
    Sarah R.
    Participant

    Hello, there.

    Any chance anyone is using AWStats out there, and can help me out?

    I am running 10.2.8 Server. I have AWStats installed and running, but still have some questions on how to best implement and automate it.

    —

    I’m trying to set up a cron job for my stats package to get new stats hourly.
    I would like it to generate these stats from my httpd access log. I have already successfully changed access_log to use the combined format.

    I ran the stats package from the command line successfully, and generated a log file that was then outputted to an HTML file. Subsequent attempts to update this information produces a new HTML file successfully – but uses the old data!

    The example cron entry is as follows:

    0 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update
    >/dev/null

    Is this all I need to do? Is this directed to /dev/null so that the machine does not become overloaded with stats? Is the html output file set up in the config file for AWStats, so that I don’t need to specify it?

    Finally, The other thing I need to do is specify that all the reports are run. The
    instructions say the following (which I don’t really follow at all):

    http://awstats.sourceforge.net/docs/awstats_setup.html#READ

    Step 3 : Read Statistics

    To see results of analyze, you have several solutions depending on your
    security policy.

    * First solution is to build the main reports, in a static HTML page, from the
    command line, like this (jump to second solution if you have ONLY CGI access):
    perl awstats.pl -config=myvirtualhostname -output -staticlinks >
    awstats.myvirtualhostname.html

    You can use all other output options (each of them give you another report).
    This is how to use all other possible output options(1) :
    perl awstats.pl -config=myvirtualhostname -output=alldomains -staticlinks >
    awstats.myvirtualhostname.allhosts.html
    perl awstats.pl -config=myvirtualhostname -output=allhosts -staticlinks >
    awstats.myvirtualhostname.allhosts.html
    perl awstats.pl -config=myvirtualhostname -output=lasthosts -staticlinks >
    awstats.myvirtualhostname.lasthosts.html
    perl awstats.pl -config=myvirtualhostname -output=unknownip -staticlinks >
    awstats.myvirtualhostname.unknownip.html
    perl awstats.pl -config=myvirtualhostname -output=alllogins -staticlinks >
    awstats.myvirtualhostname.alllogins.html
    perl awstats.pl -config=myvirtualhostname -output=lastlogins -staticlinks >
    awstats.myvirtualhostname.lastlogins.html
    perl awstats.pl -config=myvirtualhostname -output=allrobots -staticlinks >
    awstats.myvirtualhostname.allrobots.html
    perl awstats.pl -config=myvirtualhostname -output=lastrobots -staticlinks >
    awstats.myvirtualhostname.lastrobots.html
    perl awstats.pl -config=myvirtualhostname -output=urldetail -staticlinks >
    awstats.myvirtualhostname.urldetail.html
    perl awstats.pl -config=myvirtualhostname -output=urlentry -staticlinks >
    awstats.myvirtualhostname.urlentry.html
    perl awstats.pl -config=myvirtualhostname -output=urlexit -staticlinks >
    awstats.myvirtualhostname.urlexit.html
    perl awstats.pl -config=myvirtualhostname -output=browserdetail -staticlinks >
    awstats.myvirtualhostname.browserdetail.html
    perl awstats.pl -config=myvirtualhostname -output=osdetail -staticlinks >
    awstats.myvirtualhostname.osdetail.html
    perl awstats.pl -config=myvirtualhostname -output=unknownbrowsers -staticlinks
    > awstats.myvirtualhostname.unknownbrowsers.html
    perl awstats.pl -config=myvirtualhostname -output=unknownos -staticlinks >
    awstats.myvirtualhostname.unknownos.html
    perl awstats.pl -config=myvirtualhostname -output=refererse -staticlinks >
    awstats.myvirtualhostname.refererse.html
    perl awstats.pl -config=myvirtualhostname -output=refererpages -staticlinks >
    awstats.myvirtualhostname.refererpages.html
    perl awstats.pl -config=myvirtualhostname -output=keyphrases -staticlinks >
    awstats.myvirtualhostname.keyphrases.html
    perl awstats.pl -config=myvirtualhostname -output=keywords -staticlinks >
    awstats.myvirtualhostname.keywords.html
    perl awstats.pl -config=myvirtualhostname -output=errors404 -staticlinks >
    awstats.myvirtualhostname.errors404.html

    Note (1): If you prefer, you can use awstats_buildstaticpages tool to build all
    those pages in one command or to generate PDF files.

    Note (2): You can also add a filter on the following output reports:urldetail,
    urlentry, urlexit, allhosts, refererpages.
    filter can be a regexp on the full key you want awstats to present information
    about and you must use it after the output parameter separated by a “:”.
    For example, to output the urldetail report, with a filter on all pages that
    contains /news, you can use the following command line:
    perl awstats.pl -config=myvirtualhostname -output=urldetail:/news -staticlinks
    > awstats.myvirtualhostname.urldetailwithfilter.html

    Note (3): If you want to build a report for a particular month, add options
    -month=MM -year=YYYY.
    To build a report for full year (warning: This may use a lot of memory and
    CPU), add options -month=all -year=YYYY.

    * Second solution is to view dynamically your statistics from a browser. For
    this, use URL:
    http://www.myserver.mydomain/cgi-bin/awstats.pl?config=myvirtualhostname
    where myvirtualhostname is used to know which config file to use (AWStats will
    use awstats.myvirtualhostname.conf file).

    Note (1): All output command line options (except -staticlinks) are still
    available when using AWStats as a browser.
    Just use them as URL parameters like this example
    http://www.myserver.mydomain/cgi-bin/awstats.pl?month=MM&year=YYYY&output=unkno
    wnos

    Note (2): If AllowToUpdateStatsFromBrowser parameter is set to 1 in AWStats
    config/domain file, you will also be able to run the update process from your
    browser. Just click on link “Update now”.

    #357507
    Sarah R.
    Participant

    One minor point, as well:

    I have the icon directory installed in the following path (its default):

    /Library/WebServer/CGI-Executables/awstats/wwwroot/icon

    and in my configuration file for my site, I have placed an absolute path to identify its location:

    —

    # Relative or absolute web URL of your awstats icon directory.
    # If you build static reports (“… -output > outputpath/output.html”), enter
    # path of icon directory relative to the output directory ‘outputpath’.
    # Example: “/awstatsicon”
    # Example: “../icon”
    # Default: “/icon” (means you must copy icon directories in “/mywwwroot/icon”)
    #

    —
    yet the icons on my stats page (the one I have produced so far, that is) fail to load. Can anyone offer any help at all on these issues?

    Thanks.

    #370459
    Nosferatu
    Participant

    have you tried right clicking and looking at the file properties from the browser? see where the browser thinks the icons should be located…

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.