Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to setup Awstats for my application running on glassfish server?

Posted on 2011-10-12
4
Medium Priority
?
1,553 Views
Last Modified: 2012-05-12
Hi,
Can someone explain me briefly and clearly how to setup AWstats for my application running on glassfish server?

Thanks,
0
Comment
Question by:Tolgar
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
trackstudio10 earned 2000 total points
ID: 36956101
In brief:
1. upload and extract awstats package
3. Make sure that all pl files within awstats/ and awstats/cgi-bin folders have execute permissions.
2. Edit local.awstats.conf configration file to add strings similar to the following:
LogFile="/usr/glassfish/domains/domain1/logs/access/server_access_log.%YYYY-0-%MM-0-%DD-0.txt"
  - This should be path to your log file
SiteDomain=“yourdomainname.com”
HostAliases=“yourdomainname.com www.yourdomainname.com”
LogFormat=1
LoadPlugin=“geoip GEOIP_STANDARD GeoIP.dat”

The detailed instruction on installation and configuring is outlined at:
http://blog.tourgeek.com/2008/09/using-awstats-with-glassfish.html
0
 

Author Comment

by:Tolgar
ID: 37102593
Hi,
I set up AWStats for my web application. I made the changes as you recommended.

But I got this error.

How can I fix it?


# perl awstats.pl -update -config=productionCodeSearch
Create/Update database for config "/etc/awstats/awstats.productionCodeSearch.conf" by AWStats version 7.0 (build 1.971)
From data in log file "/opt/glassfish/domains/domain1/logs/access/server_access_log.2011-11-08.txt"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
AWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log.
Your log file /opt/glassfish/domains/domain1/logs/access/server_access_log.2011-11-08.txt must have a bad format or LogFormat parameter setup does not match this format.
Your AWStats LogFormat parameter is:
1
This means each line in your web server log file need to have "combined log format" like this:
111.22.33.44 - - [10/Jan/2001:02:14:14 +0200] "GET / HTTP/1.1" 200 1234 "http://www.fromserver.com/from.htm" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"
And this is an example of records AWStats found in your log file (the record number 50 in your log):
"xxx.xx.xx.xxx" "NULL-AUTH-USER" "08/Nov/2011:03:14:46 -0500" "GET /srcsearch/Preview.do?file=toolbox%2Fdistcomp%2Fsrc%2Fbuiltins%2Fgpu%2Fscripts%2FCUTypes.pm&searchString=%22int8+cplx+t%22&caseSensitive=false&indexId=1&indexDir= HTTP/1.1" 200 0
Setup ('/etc/awstats/awstats.productionCodeSearch.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Open in new window



Thanks,
0
 

Author Comment

by:Tolgar
ID: 37102727
and in the 5th step of the instructions in the blog, I got this error while deploying:
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 
'{"http://java.sun.com/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name, 
"http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":servlet-name}' is expected. 
Error loading deploy...

Open in new window



Can you please help me?

Thanks,
0
 

Author Comment

by:Tolgar
ID: 37102869
Note: I changed the acces log format in glassfish server as recommended in the blog. I think this will solve the my first question.

But the problem that I had in deployment has not been solved yet.

Any idea?

Thanks,

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you with short command examples how to obtain a packet footprint of all traffic flowing thru your Juniper device running ScreenOS. I do not know the exact firmware requirement, but I think the fprofile command is availab…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month12 days, 14 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question