Cacti Polling Host

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

irfan199
Posts: 19
Joined: Tue Mar 17, 2009 6:52 am

Cacti Polling Host

Post by irfan199 »

Hi, I'm downloading Cacti Polling Host from official cacti site at :
http://docs.cacti.net/usertemplate:host:cacti:poller

But I found problems in ss_poller.php, it called to undefined function db_fetch_cell().

I tried to import /lib/database.php, and it creates other errors. Is there any fix for this? I'm using cacti 0.8.7.d.

Thanks
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Where did you store that script?
Please see "System Utilities -> View Poller Cache" and filter for that host. Please post your findings for that very data input method
Reinhard
irfan199
Posts: 19
Joined: Tue Mar 17, 2009 6:52 am

Post by irfan199 »

Hi, from the poller_cache content, I see no problem here. The error is displayed when I tried to run the script from command line. File ownership (chown) has already changed so the script can be run from the poller user.
Attachments
Poller_cache.png
Poller_cache.png (74.1 KiB) Viewed 6251 times
irfan199
Posts: 19
Joined: Tue Mar 17, 2009 6:52 am

Post by irfan199 »

I added
include_once(dirname(__FILE__) . "/../include/global.php");

The problem is solved.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is a good hint.
Trying to reproduce this on a pristine F10 Cacti 087d. No luck. everything's fine. While I do accept your patch, I wonder in which way your installation differs. May you please post details?
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Uploaded a new version at http://docs.cacti.net/usertemplate:host:cacti:poller including a fix that applies to both 086 and 087 type cacti
Reinhard
irfan199
Posts: 19
Joined: Tue Mar 17, 2009 6:52 am

Post by irfan199 »

Hi, this is my environment, using Redhat EL 5
Attachments
CactiTech_sup2.jpg
CactiTech_sup2.jpg (74.6 KiB) Viewed 6103 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Ok, but what do you want to tell us by posting this?
Reinhard
sidacoq
Posts: 14
Joined: Wed Jul 30, 2008 3:34 am
Location: Chartres

Re: Cacti Polling Host

Post by sidacoq »

Hi :)

I have a issue with this template.
I think it lacks a script <cacti_user_stats.php> ??
http://docs.cacti.net/usertemplate:host ... lling_host

Thanks all.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti Polling Host

Post by gandalf »

Why do you think so?
R.
sidacoq
Posts: 14
Joined: Wed Jul 30, 2008 3:34 am
Location: Chartres

Re: Cacti Polling Host

Post by sidacoq »

Because, i haven't graph on plugins : Cacti User Login Statistic, Cacti User session Statistic & Cacti User Statistic.
And on "View Cacti Log File" i have

11/29/2010 10:35:05 AM - SPINE: Poller[0] Host[5] ERROR: Empty result [localhost]: '/usr/bin/php -q /var/www/cacti/scripts/cacti_user_stats.php'
11/29/2010 10:35:05 AM - SPINE: Poller[0] Host[5] ERROR: Empty result [localhost]: '/usr/bin/php -q /var/www/cacti/scripts/cacti_user_stats.php'
11/29/2010 10:35:05 AM - SPINE: Poller[0] Host[5] ERROR: Empty result [localhost]: '/usr/bin/php -q /var/www/cacti/scripts/cacti_user_stats.php'

Thx.
sidacoq
Posts: 14
Joined: Wed Jul 30, 2008 3:34 am
Location: Chartres

Re: Cacti Polling Host

Post by sidacoq »

any idea ?
thank you.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti Polling Host

Post by gandalf »

Hmm,I don't think that I integrated those scripts/templates for user statistics (I suppose browniebraun wrote them) into my poller stats.
R.
srossen
Posts: 43
Joined: Mon Jun 13, 2005 1:10 pm

Re: Cacti Polling Host

Post by srossen »

Anyone have the missing file (cacti_user_stats.php)?
tosage
Cacti User
Posts: 164
Joined: Wed Jul 28, 2010 5:05 am
Location: France

Re: Cacti Polling Host

Post by tosage »

srossen wrote:Anyone have the missing file (cacti_user_stats.php)?
The file is in the V3 of archive file

Here : http://docs.cacti.net/usertemplate:host ... lling_host

You must rename the file cacti_user.stats.php in cacti_user_stats.php
And in the file, i put a :

print "valid:$user_logins_valid invalid:$user_logins_invalid active:$session_counter_active sleeping:$session_counter_sleeping garbage:$session_counter_garbage uactive:$user_counter_active usleeping:$user_counter_sleeping\n";
Because when I test the script, the prompt is at the end of the line.

And I added the end tag of php ?> at the end of the file :roll:

If anyone can convert the host template v3 compatible for cacti 0.8.7e, thanks :wink:
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests