ISPconfig 3 - awstats

Discussion in 'Tips/Tricks/Mods' started by Mouton, Mar 29, 2009.

  1. Xenocide

    Xenocide Member

    Hi Till! We meet again! haha :)

    Can you explain how one might access these? I've restored all the files that I can back to originals but I can't find any record or documentation about? Cheers
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You access them like the webalizer stats. A website has either stats created by awstats or by webalizer and both are in the same directory. The stats are created nightly, so if you switch the statsitics for a site, you will have to wait up to 24 hours.

    Just make sure that you have awstats installed and the the paths to the awstats scripts under system > server config > web match the paths in your installation.

    It is described e.g. in the manual.
     
  3. Xenocide

    Xenocide Member

    Gotta be honest, didn't even realise there was a proper manual... I've just bought it. Thankyou very much!! :)

    [Edit: and schedualed an upgrade in for my servers tonight... slaves first yeah?]
     
    Last edited: Oct 26, 2010
  4. yoplait

    yoplait Member

    yeah, that's it.
     
  5. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    This does work on ISPConfig 3.0.3 as it interacts as a plugin when updating domains or clients.

    Errors are most times due to files not created (eg .htpasswd_stats, .htaccess, etc) and people attempting to see stats before the plugin has had a chance to create them which the errors can be seen in the error logs of the site and or apache.

    Update a user/domain to force the plugin to run at least once before checking the stats and possibly run the cron once to update the awstats data files for some stats info.

    Tremors.
     
  6. TDS

    TDS New Member

    @till:

    Can you provide the default ISPConfig AWStats configuration? I had the plugin before and now ISPConfig 3.0.3. I deleted the stuff coming from the plugin without success cos only one visitor is counted per day. If I run the daily cron in the evening all things are counted correctly.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

  8. Agent_M

    Agent_M New Member

    I have version 3.0.3 installed which should of corrected awstats from only building stats from midnight to 12:30 am, but it still appears to be happening with a site, I was having the issue with this site before upgrading, and still seems to be there for this one site.

    Anyway I can correct this so it generates the entire days stats?
     
  9. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    you might need to check when ISPC rotates it's files and when awstats is processing them, it might be rotating which then works only on a small set of logs.

    I have a script which can reprocess all of ispconfig logs if you are happy to nuke your awstats dat file and reprocess the lot.
    http://www.emperor-it.com/ispconfig3.html?layout=default
     
    Last edited: Jan 6, 2011
  10. Agent_M

    Agent_M New Member

    at a quick glance, it looks like they are happening pretty much at the same time ( which might explain why the stats vary quite a bit on the sites that do work ), so maybe somedays awstats wins the race, and other days the log rotations win?

    But for one site in particular, it looks like its only ever processes that 30mins worth of data.



    I'm not worried about loosing any of the stats to date, as they either aren't accurate, or don't contain the info I want ( I should also mention this issue >> http://www.howtoforge.com/forums/showthread.php?p=248137#post248137 )

    Will this script change the log rotation or awstats times? or just reprocess the data ( sorry, am just a little unclear on what the script does ).
     
  11. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    I would tend to believe more that the both run but depending on the number of hits (size of log file) more than anything. A bigger log file on the first site will lag the process of the next one.etc.

    Awstats it meant to run just before the log was rotated if it was modified as per the instruction I wrote (where you modified the cron php file or replace webalizer bin with a script). Are you running the awstats_updateall.pl perl script doing all websites at once via cron by chance?
     
  12. Agent_M

    Agent_M New Member

    however ispc3.0.3 is set up to do it, is how its doing it, I haven't changed or modified anything from default

    and thinking about it, I am not so sure about what I said before, If the log files were rotating at about the same time as awstats, then I wouldn't be getting 30 mins worth of data for this site, I would either get 1 or 2 mins worth, or 24 hours 30mins worth, but I am getting 30 mins worth. for this one site, so I'm a little confused now.

    What is the best way to confirm when the log files are being rotated? the 2011mmdd-access.log.gz files all have a changed time of 12:31am give or take a minute, which is why I said I thought they were rotating at about the same time as awstats was building the stats.
     
    Last edited: Jan 6, 2011
  13. Agent_M

    Agent_M New Member

    Actually don't worry about this just yet, Just noticed there is a 3.0.3.2 update available, applied the update about 10 mins before awstats was due to run, and seems it has fixed the issue for me :) Thanks

    I'll post back if I'm wrong, but looks good. Although I am still having trouble with this one relating to search terms etc ( http://www.howtoforge.com/forums/showthread.php?p=248137#post248137 )
     
  14. radim_h

    radim_h Member

    default tepmplate for awastats config files?

    Hello Guys,

    I cannot find default template for awstats.
    Where is the template file or script creating /etc/awstats/awstats.domain.tld.conf ?
    i want to add some directives for each conf file...

    OR should i include my own directives for each stats any how?

    is the files /etc/awstats/awstats.conf or /etc/awstats/awstats.conf.local reflected when stats are created? it doesnt seems this way for me...

    and also: is there global password function as in ISPC2 ??

    thanks for any hint
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The awstats file gets created by the cron_daily.sh script, there is currently no template for it. Might be a goiod idea to add this as template in future.
     
  16. radim_h

    radim_h Member

    together with global password for system administrator (eg. i want to see customer's stats), i assume there is no function like this
     
  17. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Radim_h: not if you use the static page version built into ispc3, the dynamic plugin I wrote does and you modify it in the beginning of the script.

    Also as a note, the dynamic plugin version uses the /etc/awstats/awstats.model.conf as a template and does site specific in the domains conf file/

    it's all there in the script, have a read.
     
  18. radim_h

    radim_h Member

    Hope dynamic plugin will work fine, i'm wondering why your dynamic plugin for ISPC2 was never included in default setup...

    how that nice theme of yours, everything works fine with it ?
     
  19. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Use the dynamic plugin for ispconfig3, it was designed for it. ispc2 works differently but had the same basic concept/function as the way awstats for ispc3 was made (well 3 was based of 2).

    yeah that theme will not work as of 3.0.3 (I believe was) due to the new additional "Home" tab at the top. It basically played bad to it I think but I can't remember now, didn't look into it much and might just work off the new default template and tweak it from there and save as a new template again.
    I think this is the first of any positive feedback I've had of the theme so thanks, I was kind of trying to pretty it up and make it have more room with a slicker look..etc.etc. hehe
    I want to investigate on making it look like Plesk/CPanel but not too sure how well the template will handle that and my css/html ain't the best either.
     
  20. radim_h

    radim_h Member

Share This Page