AwStats Added

Hello again,


I have installed DA's awstats over the 3rd party plugin (now disabled), but I run into some trouble when it comes to the fact that the IP-addresses doesn't want to resolve now.

I am running CentOS 4.6 currently, and I'd like the global settings to be "resolve on", but also if available some kind of geoip-setting. (what is this module? Does it exist and how do I enable it?)

I went here and saw something about this.

So my main questions are;
  • How do I set a "default" awstats.conf files that apply for all users?
  • Where do I find this global conf file?
  • Is it safe to run the commands listed below to delete all the current users' conf-files?

Code:
find . -name "awstats.*.conf" -exec rm -rf {} \;

Thank you in advance :)
 
Also, could someone print out a "default" tally from /etc/cron.d/directadmin_cron? (CentOS 4.6, with awstats enabled)

Mine looks like this;
Code:
* * * * * root /usr/local/directadmin/dataskq
2 0-23/6 * * * root echo 'action=vacation&value=all' >> /usr/local/directadmin/data/task.queue;
#5 5 * * 0 root /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
10 0 * * * echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
20 4 1 * * root echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
0 4 * * * root echo 'action=check&value=license' >> /usr/local/directadmin/data/task.queue

Thank you :)
 
You can edit the main awstats configuration file here: /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf. You can run the command if you want to remove all awstats.anyword.conf files. And the directadmin_cron file in your 2nd post is the default that comes with DA. Good luck! :)
 
You can edit the main awstats configuration file here: /usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf. You can run the command if you want to remove all awstats.anyword.conf files. And the directadmin_cron file in your 2nd post is the default that comes with DA. Good luck! :)

Thanks Martynas, you're a star :)

Follow-up question: How would one go ahead to put in geo-ip targeting/results, and how to enable resolving ip-addresses by default?
 
(Thank you again)

Regarding resolving IP-addresses, in the awstats.conf file, the following is listed that is relevant I'd think:

Code:
# If you want to have hosts reported by name instead of ip address, AWStats
# need to make reverse DNS lookups (if not already done in your log file).
# With DNSLookup to 0, all hosts will be reported by their IP addresses and
# not by the full hostname of visitors (except if names are already available
# in log file).
# If you want/need to set DNSLookup to 1, don't forget that this will reduce
# dramatically AWStats update process speed. Do not use on large web sites.
# Note: Reverse DNS lookup is done on IPv4 only (Enable ipv6 plugin for IPv6).
# Note: Result of DNS Lookup can be used to build the Country report. However
# it is highly recommanded to enable the plugin 'geoip' or 'geoipfree' to
# have an accurate Country report with no need of DNS Lookup.
# Possible values:
# 0 - No DNS Lookup
# 1 - DNS Lookup is fully enabled
# 2 - DNS Lookup is made only from static DNS cache file (if it exists)
# Default: 2
# 
DNSLookup=2

# AWStats can do reverse DNS lookups through a static DNS cache file that was
# previously created manually. If no path is given in static DNS cache file
# name, AWStats will search DirData directory. This file is never changed.
# This option is not used if DNSLookup=0.
# Note: DNS cache file format is 'minsince1970 ipaddress resolved_hostname'
# or just 'ipaddress resolved_hostname'
# Change : Effective for new updates only
# Example: "/mydnscachedir/dnscache"
# Default: "dnscache.txt"
#   
DNSStaticCacheFile="dnscache.txt"


# AWStats can do reverse DNS lookups through a DNS cache file that was created
# by a previous run of AWStats. This file is erased and recreated after each
# statistics update process. You don't need to create and/or edit it.
# AWStats will read and save this file in DirData directory.
# This option is used only if DNSLookup=1.
# Note: If a DNSStaticCacheFile is available, AWStats will check for DNS
# lookup in DNSLastUpdateCacheFile after checking into DNSStaticCacheFile.
# Change : Effective for new updates only
# Example: "/mydnscachedir/dnscachelastupdate"
# Default: "dnscachelastupdate.txt"
#
DNSLastUpdateCacheFile="dnscachelastupdate.txt"

# You can specify specific IP addresses that should NOT be looked up in DNS.
# This option is used only if DNSLookup=1.
# Note: Use space between each value.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "123.123.123.123 REGEX[^192\.168\.]"
# Default: ""
#
SkipDNSLookupFor=""

# If the "DirData" directory (see above) does not exist, AWStats return an
# error. However, you can ask AWStats to create it.
# This option can be used by some Web Hosting Providers that has defined a
# dynamic value for DirData (for example DirData="/home/__REMOTE_USER__") and
# don't want to have to create a new directory each time they add a new user.
# Change : Effective immediatly
# Possible values: 0 or 1
# Default: 0
#
CreateDirDataIfNotExists=0

With the above, there is no resolving being made.
 
Can someone paste a awstats.model.conf

Hi,

Can someone please paste the file awstats.model.conf?
 
Did you delete it? If yes - just run awstats.sh again at it will create a new file.
 
Replying to my own post;

The line
Code:
10 0 * * * echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
is relevant to the daily tally, right?

The thing is that the system doesn't seem to want to update the statistics with this cron-information.

When I do
Code:
echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

(Second command on new line)
it seem to update user statistics.

Advice please :)

(thanks)

Also, could someone print out a "default" tally from /etc/cron.d/directadmin_cron? (CentOS 4.6, with awstats enabled)

Mine looks like this;
Code:
* * * * * root /usr/local/directadmin/dataskq
2 0-23/6 * * * root echo 'action=vacation&value=all' >> /usr/local/directadmin/data/task.queue;
#5 5 * * 0 root /sbin/quotaoff -a; /sbin/quotacheck -augm; /sbin/quotaon -a;
10 0 * * * echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue
20 4 1 * * root echo 'action=reset&value=all' >> /usr/local/directadmin/data/task.queue
0 4 * * * root echo 'action=check&value=license' >> /usr/local/directadmin/data/task.queue

Thank you :)
 
According to the above, all is okay as I can see that 1-minute log-entry, for example.

As I have a server with not many users on it, I have (now) enabled statistics update every 4 hours, according to this link. (If there is something not right about the format on that entry, do say.)

I will wait and see if both bandwidth, but also statistics update every 4 hours now.

I also managed to enable GeoIP within AwStats (with API) + adding this globally, and it's working quite nicely :) (Thanks for the info!)
 
I have installed awstats but now I want to uninstall it and back to webalizer. I don't know how to do it. Can anyone help me?
 
Code:
perl -pi -e 's|awstats=1|awstats=0|' /usr/local/directadmin/conf/directadmin.conf
perl -pi -e 's|webalizer=0|webalizer=1|' /usr/local/directadmin/conf/directadmin.conf
echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
 
Should
Code:
10 0 * * * echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

be
Code:
10 0 * * * [B]root[/B] echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue

?



I ask because it still won't update as it should.
 
Ah, sorry, I didn't see that :) Yes, it must contain the "root" word.
 
I think both of them are the same but webalizer is a bit easier than awstats to view!

Hmm, I personally think that Awstats is far superior to webalizer, especially utilizing the plugins (such as geoIP) that are visible inside the configuration file.
 
Back
Top