Friday, September 12, 2008

awstats web site statistics for glassfish

awstats is a open source web server log analyzer. Glassfish is an open source java-based web-server. Click here to check out the statistics on my two glassfish domain servers: domain1 domain2. Of course you will restrict access when you deploy this.

To get the awstats package to work with glassfish:
  1. Download and untar awstats (to /usr/local/awstats)
  2. Follow the instructions for installing awstats and run the configuration utility.
    Remember to create the /etc/awstats/ and /var/lib/awstats/ directories and set write permission.
    Edit the config file (/etc/awstats/yourconfigfilename) and change the LogFile property to:
    LogFile="sed -e 's/"\([0-9\.]*\)"/\1 - -/g' -e 's/"\([^"]*-0800\)"/[\1]/g' /usr/local/java/web/glassfish/domains/domain1/logs/access/server_access_log.%YYYY-0-%MM-0-%DD-0.txt |"
    where "/usr/local/java/web/glassfish" is the location of your glassfish server. Also remember to change the time zone offset (mine is -0800) to your timezome offset.
    Change the DirIcons property to:
    You will probably want to change your SiteDomain and HostAliases properties to match your domain name.
    I got this info from Glen Smith's blog, Thanks!
  3. Open your glassfish admin page (, go to configuration -> http service and click the Access Logging enabled box.
    Click on the Access Log Tab and enter: %datetime% %request% %status% %response.length% %header.referer% %header.user-agent%
    in the Format text box.
    This makes your log format similar to the apache log format
  4. Go you your awstats/wwwroot directory and create a sub-directory WEB-INF
    Create a web.xml file in this directory that contains:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
    Afterwards, cd to the wwwroot/cgi-bin directory type chmod a-w *.pl just to be careful.
  5. Now, install this as a web server in the glassfish admin screen (
    Applications -> Web Applications -> Deploy
    And deploy the web server directory: /usr/local/awstats/wwwroot. Make sure your context root is awstats.

  6. Try to invoke the servlet as it's described in the awstats documentation:
    You should see the awstat config data. Cool!


r2 said...

In the 5th step, I couldn't deploy and I got this error:

Deploying application in domain failed; Error loading deployment descriptors for module [wwwroot]
Line 7 Column 16 -- Deployment descriptor file WEB-INF/web.xml in archive [wwwroot]. cvc-complex-
type.2.4.a: Invalid content was found starting with element 'servlet-class'. One of
'{"":description, "":display-name,
"":icon, "":servlet-name}' is expected.
Error loading deploy...

Do you know why it happened?


kovalan Jayamurugan said...

Excellent post!!! Java is most popular and efficient programming language available in the market today. It helps developers to create stunning desktop/web applications loaded with stunning functionalities. Best JAVA Training in Chennai | JAVA Course in Chennai

Badrul Jaman said...

Wonderful post..Excellent post, Java is most popular and efficient programming language available in the market today. It helps developers to create stunning desktop/web applications loaded with stunning functionalities.
iOS Training in Chennai | Informatica Training in Chennai

Mohamed Omer said...

Great and impressive article!!

Seo Training in Chennai

Ranjitha M said...

Thanks for your informative sharing....
online marketing courses in chennai

D Entertainment said...

mu moi ra hom nay
tim phong tro
nhạc sàn
tổng đài tư vấn luật
văn phòng luật hà nội
tổng đài tư vấn luật
thành lập công ty trọn gói
chém gió
trung tâm tiếng anh

- Xoẹt xoẹt xọe.

Đột nhiên trên tường thành có mấy đạo thân ảnh nhảy ra sau lưng của Nhạc Thành, chính là những trưởng lão có tu vi Đấu Tôn.

Nhạc Thành nhìn đám người này, tổng cộng có bảy mươi người tất cả, trong đó có những trưởng lão của Hồ Điệp cốc, Vạn Kim Môn, Cuồng Sư môn mà Nhạc Thành biết.

Vừa nghe thấy U Minh tông và Luyện Dược sư công hội sẽ công kích thành, tất cả mọi người đều lộ vẻ lo lắng, đặc biệt là khi biết có cường giả Đấu Thánh.

Tuy nhiên Nhạc Thành cũng không lo lắng, chỉ là một Thanh Ma mà thôi, lần trước Vũ Văn Nam để hắn chạy mất, không ngờ lần này hắn lại xuất hiện ở đây.

- Đến đây đi.

Nhạc Thành nhìn về phía xa xa mà nói, khóe miệng nở ra một nụ cười quỷ dị.

- Đến đây đi, mau đến đây.

Một lát sau nhìn thấy phương gia nghìn dặm chằng chịt thân ảnh, Nhạc Thành cất tiếng nói.

Trên tường thành, chúng đệ tử cũng khẩn trương, nhóm đệ tử

Rohit P said...

great job, very useful information
will try using them
seo can make any article to reach people very effectively
seo is so simple that every one will love to get training on seo seo training in bangalore

Steve Smith said...

Great and Useful Article.

Online Java Training

Online Java Training from India

Online Java Training

Online Java Training From India

Java Training Institutes in Chennai

Java Training in Chennai

Indhu Mathy said...

Awesome blog for java technolgy its very useful for java trainers.
iOS Training in Chennai | Multimedia Training in Chennai | QTP Training in Chennai | Informatica Training in Chennai | CCNA Training in Chennai | Java Training in Chennai | Oracle Training in Chennai | Android Training in Chennai

Savitha said...

Really awesome blog. Your blog is really useful for me.
Thanks for sharing this informative blog. Keep update your blog.
Oracle Training In Chennai

Diya Patel said...

Best iOS Training Institute In Chennai It’s too informative blog and I am getting conglomerations of info’s about Oracle interview questions and answer .Thanks for sharing, I would like to see your updates regularly so keep blogging.

for IT the said...

Java Articles | IT Technical Articles | Dot Net Framework Articles |
JavaScript Articles | Java Training Institutes | Single Page Application Development

Addison adolf said...

We are offering website, website design, e-commerce website and much more......

Buzz Application

Gopi Perumal said...

This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic..

CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

Jeanne Davies said...

Excellent post and wonderful blog, I really like this type of interesting articles keep it you.Android Applications Development

Nikshitha S said...

Very informative content. Digital marketing is one of the best marketing strategy through which we can promote our product or service. In digital marketing we mainly focus on SEO and SMO. The main task involved is to analyse the keyword and to bring the website at top position for the specific keyword.
digital marketing course in chennai | Digital Marketing training in chennai

Nicky Paul said...

A phone call is a phone bring in which somebody converses with a few individuals in the meantime. The phone calls might be intended to permit the called gathering to take part amid the call, or the ring might be set so that the called party simply listens into the call and can't talk. It is now and again called ATC (sound video chat).
Conference Call

Melisa said...

Nice information about the load testing!!! I prefer Loadrunner automation testing tool to validate the performance of software application/system under actual load. Loadrunner Training in Chennai | Loadrunner training institute in Chennai|Qtp training in Chennai|Best qtp training institute in Chennai

Jeanne Davies said...

Nice impressive info about website designing and also Android applications Live Updates

Nicky Paul said...

MarketPress sets the standard for WordPress eCommerce arrangements, giving an exquisite shopping background that backings all real installment passages and permits you to effortlessly oversee dissemination and shopping costs with custom transportation alternatives.
Wordpress Online Shop And Plugins Store

Kayal Vizhi said...

Nice post. Thanks for sharing.

Digital Marketing Services in Chennai

Regina Hilary said...

The war between humans, orcs and elves continues earn to die . Lead your race through a series of epic battles, using your crossbow to fend off foes and sending out units to destroy castleshappy wheels . Researching and upgrading wisely will be crucial to your success! There are 5 ages total and each one will bring you new units to train to fight in the war for you cause.
earn to die 2
Whatever you do, don’t neglect your home base because you cannot repair it and once it is destroyed, you lose! Age of War is the first game of the series and really sets the tone for the Age of War games . Also try out the Age of Defense series as it is pretty similar.
In this game, you start at the cavern men’s age, then evolvetank trouble ! There is a total of 5 ages, each with its units and turrets. Take control of 16 different units and 15 different turrets to defend your base and destroy your enemy.
The goal of the game also differs depending on the level. In most levels the goal is to reach a finish line or to collect tokens. Many levels feature alternate or nonexistent goals for the player.

Balarishi said...

Good post. Thanks for sharing.

SEO Training in Chennai

Regina Rj said...

Informative post, Thanks for sharing.

digital marketing training in chennai

Priya said...

Very useful content thanks for sharing such a informative content which provided me the required information on the various technology.
AngularJS Training in Chennai | AngularJS course in Chennai

Nikshitha S said...

Very interesting content which helps me to get the indepth knowledge about the technology. To know more detils about the course visit this website.
Spring training in Chennai | Best Spring training institute in Chennai

mythily mythu said...

spring training in chennai

mythily mythu said...

Angularjs training in chennai

for IT the said...

Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online

for IT the said...

Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

jhansi joe said...

Loadrunner is a flagship automation load testing product from HP. This products command over 70 % of market share in load and performance testing tools. Nowadays, testing professionals strong in handling Loadrunner automation tool has huge career opportunity.
Loadrunner Training in Chennai

Paul Miller said...

This technical post helps me to improve my skills set, thanks for this wonder article I expect your upcoming blog, so keep sharing...

Selenium Training in Chennai|Selenium Training

Rasool Bevi said...

The future of software testing is on positive note. It offers huge career prospects for talented professionals to be skilled software testers.
Software testing training in Chennai| Best software testing training institute in Chennai|<

charles said...

Thanks dear for the articles…. Really helpful for me and it’s according to the purpose.
seo service

for IT the said...

I have read your blog its very attractive and impressive. I like it your blog.

Internet Marketing Company Digital Marketing Agency

SEO Company in India SEO Services in India

Digital Marketing Company in Chennai

Jeorge Bush said...

Keep it up!! You have done the nice job having provided the latest information.Shavers

Mehgna Sharma said...

Nice post Thanks for the Sharing this information Big Data Hadoop Training | PHP Training in Noida


Nice to read this article.... Thanks for sharing.....
digital marketing courses in chennai

E-Search Advisors Chennai said...

Nice Post. Thanks for sharing this useful information.
SEO Training In Chennai
SEO Training Institute In Chennai

sri krishna kumar said...

You've made some good points there. I looked on the internet for more information about this
Mainframe Training In Chennai | Hadoop Training In Chennai | ETL Testing Training In Chennai

impress bss said...

Thank you for sharing valuable information
Mobile app training institue in chennai
Web designand developemnt training institue in chennai
Digital Marketing training institue in chennai

nivatha said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
Data science training in velachery
Data science training in kalyan nagar
Data Science training in OMR
Data Science training in anna nagar
Data Science training in chennai
Data Science training in marathahalli
Data Science training in BTM layout
Data Science training in rajaji nagar

Ram priya said...

Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
Devops training in Chennai
Devops training in Bangalore
Devops training in Pune
Devops Online training
Devops training in Pune
Devops training in Bangalore
Devops training in tambaram

suresh ravi said...

The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.

ccna training in chennai

ccna training in bangalore

ccna training in pune

simbu said...

Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!

java training in chennai | java training in bangalore

java online training | java training in pune

selenium training in chennai

selenium training in bangalore

genga g said...
This comment has been removed by the author.
sathya shri said...

I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks

angularjs-Training in annanagar

angularjs Training in chennai

angularjs Training in chennai

angularjs Training in bangalore

Gilbert syn said...

The instruction of automation you have sharing on this post is very much helpful to develop new intention.

GST coaching center in chennai | GST training institute in chennai| GST certification course in chennai| accounts and taxation course in chennai|Accounts training in chennai

Mouni yoga said...

Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic.
python training in velachery
python training institute in chennai

shethal said...

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

Devops Training in pune
DevOps online Training