LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Webalizer with DNS lookups (https://www.linuxquestions.org/questions/linux-software-2/webalizer-with-dns-lookups-205965/)

jnichel 07-16-2004 03:21 PM

Webalizer with DNS lookups
 
I am trying to get webalizer up and running on a RHEL 3.0 box, but am having problems with getting the DNS lookup to work. I configured webalizer as such...

./configure --enable-dns --with-db=/usr/include/db4

Config, compile, install all went fine, but when I try to run webalizer on one of my log files, I get this....

Warning: Invalid keyword 'DNSCache' (/etc/webalizer/kegworks.conf)
Warning: Invalid keyword 'DNSChildren' (/etc/webalizer/kegworks.conf)
DNS support not present, aborting...

I've made sure that webalizer wasn't installed from an RPM anywhere on the box, removed, re-configured, re-compiled, and re-installed numerous times now, but still get the same error.

Any ideas?

korozion 07-16-2004 03:23 PM

Very easy, just turn on reverse DNS lookups in apache (op whatever webserver you are using). That will allow webalizer to see the dns names

jnichel 07-16-2004 03:26 PM

Quote:

Originally posted by korozion
Very easy, just turn on reverse DNS lookups in apache (op whatever webserver you are using). That will allow webalizer to see the dns names
I would prefer not to put that load on my webserver. The way I understood the webalizer docs is that this did not need to be done with Apache to get DNS lookups to work when configuring webalizer with the --enable-dns switch. Is this not the case?

Donboy 07-16-2004 03:32 PM

Are you able to do normal lookups from the machine? Like if you type "host [someipaddress]" is it able to convert the IP into a domain name? Check /etc/resolv.conf and be sure you've got good nameservers listed in there.

If you've got a whole bunch of log files you need to process on there, consider running a caching DNS server somewhere on your LAN or on the machine itself and it will speed up webalizer when it runs... otherwise it has to query your upstream ISP for all the lookups which can make it crunch for a while on all those log files.

bulliver 07-16-2004 03:35 PM

Have a look at this link:

http://www.mrunix.net/webalizer/faq.html

Question 7...

jnichel 07-16-2004 03:44 PM

Quote:

Originally posted by Donboy
Are you able to do normal lookups from the machine? Like if you type "host [someipaddress]" is it able to convert the IP into a domain name? Check /etc/resolv.conf and be sure you've got good nameservers listed in there.

If you've got a whole bunch of log files you need to process on there, consider running a caching DNS server somewhere on your LAN or on the machine itself and it will speed up webalizer when it runs... otherwise it has to query your upstream ISP for all the lookups which can make it crunch for a while on all those log files.

Yeah, the box can resolve. That's a good idea for the caching nameserver, if I get past this problem with webalizer, that'll probably be my next step.

jnichel 07-16-2004 03:50 PM

Quote:

Originally posted by bulliver
Have a look at this link:

http://www.mrunix.net/webalizer/faq.html

Question 7...

One of the first places I looked. According to that, webalizer will do reverse DNS lookups without having the webserver do it. I'm trying to figure out why it's telling me "DNS support not present, aborting..." when I did configure / compile it with DNS support.

Donboy 07-16-2004 04:55 PM

Maybe you have the wrong settings in your /etc/kegworks.conf file. The error you got seems to suggest that it doesn't like the keywords you put in the config file.

http://linux.cudeso.be/linuxdoc/weba...php#dns_lookup

Can you post your config file for us to see.

jnichel 07-16-2004 05:31 PM

Quote:

Originally posted by Donboy
Maybe you have the wrong settings in your /etc/kegworks.conf file. The error you got seems to suggest that it doesn't like the keywords you put in the config file.

http://linux.cudeso.be/linuxdoc/weba...php#dns_lookup

Can you post your config file for us to see.

Sure.....

Code:

LogFile        /webserver/server/logs/temp/kegworks.com-access_log
LogType        clf
OutputDir      /webserver/vhosts/dotcomholdingsofbuffalo.com/docs/secure/stats/kegworks.com/
HistoryName    /webserver/vhosts/dotcomholdingsofbuffalo.com/docs/secure/stats/kegworks.com/webalizer.hist
#Incremental    no
#IncrementalName        webalizer.current
ReportTitle    Usage Statistics for
HostName        KegWorks.com
#HTMLExtension  html
PageType        htm*
PageType        cgi
PageType        php
PageType        pl
UseHTTPS        no
DNSCache        /webserver/vhosts/dotcomholdingsofbuffalo.com/docs/secure/stats/kegworks.com/dns_cache.db
DNSChildren    10
#HTMLPre <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
#HTMLHead <META NAME="author" CONTENT="The Webalizer">
#HTMLBody <BODY BGCOLOR="#E8E8E8" TEXT="#000000" LINK="#0000FF" VLINK="#FF0000">
#HTMLPost      <BR CLEAR="all">
#HTMLTail <IMG SRC="msfree.png" ALT="100% Micro$oft free!">
#HTMLEnd </BODY></HTML>
Quiet          yes
ReallyQuiet    no
TimeMe          no
#GMTTime        no
#Debug          no
#FoldSeqErr    no
#VisitTimeout  1800
#IgnoreHist    no
#CountryGraph  yes
#DailyGraph    yes
#DailyStats    yes
#HourlyGraph    yes
#HourlyStats    yes
#GraphLegend    yes
#GraphLines    2
#TopSites      30
#TopKSites      10
#TopURLs        30
#TopKURLs      10
#TopReferrers  30
#TopAgents      15
#TopCountries  30
#TopEntry      10
#TopExit        10
#TopSearch      20
#TopUsers      20
#AllSites      no
#AllURLs        no
#AllReferrers  no
#AllAgents      no
#AllSearchStr  no
#AllUsers      no
#IndexAlias    home.htm
#IndexAlias    homepage.htm
#HideSite      *mrunix.net
#HideSite      localhost
#HideReferrer  mrunix.net/
#HideReferrer  Direct Request
HideURL        *.gif
HideURL        *.GIF
HideURL        *.jpg
HideURL        *.JPG
HideURL        *.png
HideURL        *.PNG
HideURL        *.ra
#HideAgent      RealPlayer
#HideUser      root
#HideUser      admin
#GroupURL      /cgi-bin/*      CGI Scripts
#GroupURL      /images/*      Images
#GroupSite      *.aol.com
#GroupSite      *.compuserve.com
#GroupReferrer  yahoo.com/      Yahoo!
#GroupReferrer  excite.com/    Excite
#GroupReferrer  infoseek.com/  InfoSeek
#GroupReferrer  webcrawler.com/ WebCrawler
#GroupUser      root            Admin users
#GroupUser      admin          Admin users
#GroupUser      wheel          Admin users
#GroupAgent    MSIE            Micro$oft Internet Exploder
#HideAgent      MSIE
#GroupAgent    Mozilla        Netscape
#HideAgent      Mozilla
#GroupAgent    Lynx*          Lynx
#HideAgent      Lynx*
#HideAllSites  no
#GroupDomains  0
#GroupShading  yes
#GroupHighlight yes
#IgnoreSite    bad.site.net
#IgnoreURL      /test*
#IgnoreReferrer file:/*
#IgnoreAgent    RealPlayer
#IgnoreUser    root
#IgnoreURL      *
#IncludeURL    ~joeuser*
#IgnoreUser    *
#IncludeUser    someuser
#MangleAgents    0
SearchEngine    yahoo.com      p=
SearchEngine    altavista.com  q=
SearchEngine    google.com      q=
SearchEngine    eureka.com      q=
SearchEngine    lycos.com      query=
SearchEngine    hotbot.com      MT=
SearchEngine    msn.com        MT=
SearchEngine    infoseek.com    qt=
SearchEngine    webcrawler      searchText=
SearchEngine    excite          search=
SearchEngine    netscape.com    search=
SearchEngine    mamma.com      query=
SearchEngine    alltheweb.com  query=
SearchEngine    northernlight.com  qr=
#DumpPath      /var/lib/httpd/logs
#DumpHeader    no
#DumpExtension  tab
#DumpSites      no
#DumpURLs      no
#DumpReferrers  no
#DumpAgents    no
#DumpUsers      no
#DumpSearchStr  no


Donboy 07-17-2004 08:25 PM

Quote:

I'm trying to figure out why it's telling me "DNS support not present, aborting..." when I did configure / compile it with DNS support.
I suspect that maybe it's not finding the right libraries for everything it needs. Notice in the webalizer FAQ in #18 that somebody submitted a fix that says it needs to be "db1" instead of what you used which was "db4". Where did you get the "db4" option to use in your configure line??? Just wondering why you picked that... must be something you found that's supposed to help.

Also, your config file is huge! Here's mine, which is typical of all the ones I have for each domain...

Code:

## Webalizer Config File
LogFile                        /home/username/www/logs/access.log.1.gz
OutputDir                /home/username/www/html/stats
HistoryName                /home/username/www/html/stats/webalizer.hist
IncrementalName                /home/username/www/html/stats/webalizer.current
Incremental                yes
HostName                domain.net
PageType                htm*
PageType                php*
PageType                pl
PageType                cgi
Quiet                        yes
HideURL                        *.gif
HideURL                        *.GIF
HideURL                        *.jpg
HideURL                        *.JPG
HideURL                        *.png
HideURL                        *.PNG


jnichel 07-17-2004 10:20 PM

Quote:

Originally posted by Donboy
I suspect that maybe it's not finding the right libraries for everything it needs.
I'm sure the problem lies along those lines somewhere, but where? Course, I wouldn't think it would configure, much less compile if libraries are missing.

Quote:

Originally posted by Donboy
Notice in the webalizer FAQ in #18 that somebody submitted a fix that says it needs to be "db1" instead of what you used which was "db4". Where did you get the "db4" option to use in your configure line??? Just wondering why you picked that... must be something you found that's supposed to help.
That's just where the DB files are installed for RHEL AS v3.0

Quote:

Originally posted by Donboy
Also, your config file is huge! Here's mine, which is typical of all the ones I have for each domain...
Just the sample config file shipped with Webalizer. I'll trim it if I can ever get it working.

Donboy 07-18-2004 12:41 AM

Well, in that case it beats me! If you've configured with those arguments and it still acts like you haven't, you may want to try the webalizer mailing list.

http://groups.yahoo.com/group/webalizer/

The author of the package is active on there so I'm sure you can get some good help there. I hate directing people away from LQ, but sometimes you gotta go to the source.

Sorry I couldn't help.

dablan 07-30-2004 07:13 PM

Sorry,

Did you find the solution, because i am having the same problem...

I hope yo read this...

Thanks,

Donboy 07-30-2004 07:49 PM

Hey! Welcome to LQ!

I think the root of jnichel's original problem is that he didn't want to allow DNS lookups on his machine. Is that also the case for you? Its probably none of my business, but I'm just curious about why you wouldn't want to allow lookups on a machine anyhow?

In post #3 jnichel seemed worried about causing additional load on his machine. I think it's safe to say that the load being put on a machine by webalizer isn't terribly much, and if you run it at 3am when things are quiet it's probably not going to cause your users much grief.

jnichel 07-30-2004 10:20 PM

Quote:

Originally posted by dablan
Sorry,

Did you find the solution, because i am having the same problem...

I hope yo read this...

Thanks,

I didn't find a solution. I finally just gave up, and started writing my own analyzer with php and MySQL. Not as full featured as Webalizer yet, but give me time. :D

jnichel 07-30-2004 10:26 PM

Quote:

Originally posted by Donboy
In post #3 jnichel seemed worried about causing additional load on his machine. I think it's safe to say that the load being put on a machine by webalizer isn't terribly much, and if you run it at 3am when things are quiet it's probably not going to cause your users much grief.
That's not it. I wanted Webalizer to do the DNS lookups...I didn't want my webserver (Apache) to do the lookups...that's where I was worried about the added load. Webalizer configured and compiled fine when I enabled DNS lookups, but when I try to run it it tells me that DNS is _not_ enabled.

dablan 07-30-2004 10:33 PM

I guess you want to use mysql so you can save the history of the logs and save some extra disk space emptying them, right???

If that's your idea, what language are you working on?

I can help if you need some...

jnichel 07-30-2004 10:43 PM

Quote:

Originally posted by dablan
I guess you want to use mysql so you can save the history of the logs and save some extra disk space emptying them, right???

If that's your idea, what language are you working on?

For the most part, MySQL is because it's what I know best out of the different DB's I work with, and I don't like talking to the Oracle admins. :D

I'm using php for the front end, but Perl for the daily dumping/truncating of the logs to the db, Again, sticking with what I know.

dablan 07-30-2004 10:49 PM

ok!

So you are going with the best!!! :D

If you need help, i am on

zygron 08-28-2004 09:29 PM

Webalizer fix
 
Hello,

I experienced the same problem, webalizer 2.0.10 didn't want to resolve dns saying "DNS Support is not enabled" although i had compiled with --enable-dns.
After reading this thread i had a glance at the sources, there seem to be something wrong with the configure file, although --enable-dns was specifed when configuring, USE_DNS is never defined so the sources are compiled without dns support, there's also an issue with the berkeley db headers included by default, if HAVE_DB_185H is defined (and it never is even if the header is present) it should use <db_185.h> otherwise it fallbacks to <db.h> which is apparently incompatible (some functions prototypes differs so you get compile errors). I was to lazy to check the whole configure file to see where the error was so i decided to force DNS Support & use of db_185 by modifying slightly the makefile:

Makefile - line 28, the original file looks like this

LIBS = -lgd -lpng -lz -lm -lnsl
DEFS = -DETCDIR=\"/etc\" -DHAVE_SOCKET=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_GETOPT_H=1 -DHA VE_MATH_H=1

Modify the lines so they look like this:

LIBS = -lgd -lpng -lz -lm -lnsl -ldb
DEFS = -DETCDIR=\"/etc\" -DHAVE_SOCKET=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_GETOPT_H=1 -DHA VE_MATH_H=1 -DUSE_DNS -DHAVE_DB_185_H

(you just need to append -ldb to LIBS, and -DUSE_DNS to DEFS -DHAVE_DB_185_H to DEFS)

Once you modified the file just save, and do a:

make clean
make
make install

As long as you have the db_185.h header it should compile and link fine.

Hope that helps...

Regards

vboulytchev 04-12-2007 10:29 AM

solution
 
recompile your webalizer with --enable-dns :)

also, when you do ./configure --enable-dns --enable-debug...
make sure you have your DB installed

configure: warning: You must have a V1.85 compatable DB library!
configure: warning: DNS lookup code will be disabled...


./configure --enable-dns --enable-debug --with-db=/usr/include/ --with-dblib=/usr/lib/

lcoffin 01-23-2009 11:13 AM

Fixed for me....
 
This is a really old thread (:eek:!) but I ran into the same problem and was able to eventually get it fixed.

The problem was two-fold...

A) Didn't have the Berkeley DB libraries and headers installed

B) Had to do a 'make clean' before doing a new 'make'


== A ==

When you configure webalizer, even with the --enable-dns option, you need to be on the lookout for this warning:

configure: WARNING: db.h not found.. DNS/GeoDB code disabled!

configure will complete even with that warning message and tell you to run 'make'... but DNS support won't be included. You have to watch for that warning message. If you see it, it means Berkeley DB isn't installed.

== B ==

After installing Berkeley DB, I redid the ./configure and it showed that db.h was found, but after doing a make && make install, webalizer was still saying that DNS support wasn't present. This was because re-running ./configure didn't invalidate all the old '*.o' files in the webalizer src dir and dns support was still missing from them. I had to do an explicit 'make clean' before doing the 'make && make install'.


Hope this helps someone! :)

---Lawrence


All times are GMT -5. The time now is 11:43 PM.