Trouble getting web hits without data template working

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
kevinz
Posts: 17
Joined: Thu May 22, 2003 8:03 am

Trouble getting web hits without data template working

Post by kevinz »

I'm trying to set up my first graph of web hits from the localhost where Cacti is running. I think I'm having problems because there's no data template for 'Unix - web hits' and I'm trying to define one by trial and error. I have been successful graphing both local and remote interface data, but these can be set up just through polling hosts and data templates. I'm using Cacti 0.8.

The script shown in "View Polling Host" seems to run correctly, and shows an incrementing number:
centernet:~ # perl /usr/local/httpd/htdocs/cacti8/scripts/webhits.pl /usr/local/apache/logs/access_log
2078centernet:~ # perl /usr/local/httpd/htdocs/cacti8/scripts/webhits.pl /usr/local/apache/logs/access_log
2117centernet:~ #

The Data Source Debug seems normal:
/usr/local/rrdtool/bin/rrdtool create \
/usr/local/httpd/htdocs/cacti8/rra/centernet_cnwebhits_89.rrd \
--step 300 \
DS:cn-web-hits:COUNTER:600:0:1000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \

Graph Management -> Graph Debug says "ERROR: can't make a graph without contents." There are "No items" listed in Graph Items. I use the Graph Templates pull-down to choose 'web hits,' the template I created. This shows up in the Graph Item Input Section. I use the pull-down there to select 'Centernet Web hits' and the click "Save." It reports that the save was successful. However, if I go back to Graph Management, there's still "No items" in the Graph Item list.

Any idea's where I can begin to fix this? Thanks for your help.

-Kevin Zembower
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Are there graph items defined in your "web hits" graph template? What happens if you create a new graph and select "web hits" as the graph template? I have not yet encountered this if Cacti is in fact not pulling down graph items from the template as it should.

-Ian
kevinz
Posts: 17
Joined: Thu May 22, 2003 8:03 am

Post by kevinz »

I created a new graph, and selected 'web hits' as the Graph Template, and clicked "Save." It gave me a new page, with "No Graph Items" on it, but "web hits" next to the pull down menu for Adding Graph items. I tried to select "Centernet web hits," which showed up in the pull-down menu, and clicked "Save" and got "Save Successful" but there were still no graphed items.

Hope this helps. Thanks for you work on this system. I appreciate any advice you can offer.

-Kevin
kevinz
Posts: 17
Joined: Thu May 22, 2003 8:03 am

Post by kevinz »

On the "Web Hits" graph template, there is one "Graph Item Input" called "web hits." It's field type is "Data Source" but it's Associated Graph Items is "No items." I don't understand how I can add Associated Graph Items.

Thanks.

-Kevin
kevinz
Posts: 17
Joined: Thu May 22, 2003 8:03 am

Post by kevinz »

Trying to freshen this up so that someone will notice and give me a hand.

Thanks for any help offered.

-Kevin
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Trouble getting web hits without data template working

Post by sergani »

Hello Kevin,

I know it's a very old topic, but I'd like to know if you could help me with the steps required to log web hits through Cacti.
I'm running Cacti 0.8.7g

Thanks in advance
//M
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Trouble getting web hits without data template working

Post by TheWitness »

You should Google for this script. I bet it's still out there. 'tail' 'grep' and 'wc' are good starters. But perl is going to be much more thorough.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Trouble getting web hits without data template working

Post by sergani »

I find it funny that all replies I'm getting with regards to my question about graphing web hits all point in the same direction; search and re-search :)

Guys, I have read through the documentation, and as I mentioned on the list, I'm not a newbie to go search how grep and wc work.. I mean, come on!!

All I'm asking for, simply, is some guidance from those who already spent sometime doing so, and are now logging web hits - easy :)

If anyone has any other reply other than "go and search", please come forward with it, I'd be glad to read it through - and yes, in the meantime, I am researching and googling about this :)

Thanks all...
//M
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Trouble getting web hits without data template working

Post by TheWitness »

That's funny, it took me less than 60 seconds to find this:

http://forums.cacti.net/viewtopic.php?f=12&t=9861

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
sergani
Posts: 24
Joined: Sun Sep 18, 2011 3:49 am
Location: Cairo, Egypt

Re: Trouble getting web hits without data template working

Post by sergani »

TheWitness wrote:That's funny, it took me less than 60 seconds to find this:

http://forums.cacti.net/viewtopic.php?f=12&t=9861

TheWitness
Touche :)
But I believe apachestats alone needs some more research :)

Anywayz, thanks for the tip..
//M
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests