New and more Poller Statistics (0.8.6i based)

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

Moderators: Developers, Moderators

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

Post by gandalf »

The first one
- Host: the total number of targets polled
- Hosts per Process: it is possible to run more than a single process in parallel. In your case "Hosts per process" = "Hosts", so you're running a single process only
- DataSources: the number of items you're polling. E.g. inbound and outbound traffic for a single interface count as "two"
- RRDs: number of rrd files used. A rrd file may incorporate 1..many data sources

The second one:
- Poller runtime: the total time betwen poller start and poller end. Should be less than 300
- Process: as said above: currently 1
- Threads: valid only when using cactid. As you're using cmd.php as a poller, the value is reported as NaN

Reinhard
super-hornet
Cacti User
Posts: 175
Joined: Sun May 27, 2007 5:42 pm

Post by super-hornet »

Thanks gandalf for this cool scripts. I just imported it in and running.

SH
stefoxa
Posts: 4
Joined: Fri Sep 14, 2007 10:35 am

Post by stefoxa »

Hello,

I use cacti0.8.6j and cactid 0.8.6i.
I don't use boost server and all the graphs run, except the "recache stats".

When I run manually the commands:
#php ss_poller.php

I have this result:
Time:1.1720 Method:cactid Processes:1 Threads:1 Hosts:4 HostsPerProcess:4 DataSources:3 RRDsProcessed:3
snmp:0 script:2 script_server:1

So the following line is miss:
RecacheTime:xxx HostsRecached:x

In the log cacti.log:
DEBUG: SQL Cell: "select value from settings where name='stats_recache'"
09/17/2007 05:52:03 PM - CACTID: Poller[0] Host[3] DS[137] SS[0] WARNING: Result from SERVER not valid. Partial Result: ...

Indeed, the table Mysql settings not contain an entry for "stats_recache".

My Question:
How to make to activate the recache ?
stefoxa
Posts: 4
Joined: Fri Sep 14, 2007 10:35 am

Post by stefoxa »

Thank you in advance.
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

Post by sh0x »

Hi, for some reason my rrd's aren't being created.. i ran the script server manually ss_poller works fine. I check the sql db and the data is there and being updated, but no rrds for only this script (i only have snmp script queries until now, this is my first php script in use).

I'm not sure where to look to see why the rrd's are not being created. I tryed debug logging. I also have pollperf plugin still loaded. I use cactid, but I tried with cmd.php and still no rrd, using patched .8.6.j and v0.8.6i cactid.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Which graphs did you try to create? Are ALL rrds missing or only those of a specific graph? What does cacti.log show in debug mode (or just try to run cactid against this device only using --verbosity=5)
Reinhard
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

Hi,

I've set this up and all is working well, except for the recache graph. Is this made defunct in 0.8.6j or is it an addon / script I dont have?

The debug's on it check out OK.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Recache should always work. Boost is the only optional one. Please post a screenshot from Graph Management in DEBUG mode
Reinhard
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

Here it is, it's nan'ing, yet every other graph (statistics/objects/runtime) is working ok
Attachments
Recache issue
Recache issue
recache issue.JPG (123.07 KiB) Viewed 9061 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please run mysql from command line and ask for

Code: Select all

SELECT * FROM `settings` WHERE name = stats_poller;
Post the output here. Are you sure to use the latest code?
Reinhard
ben_c
Cacti User
Posts: 203
Joined: Mon May 14, 2007 8:12 pm
Location: Melbourne, Australia.

Post by ben_c »

mysql> SELECT * FROM `settings` WHERE name = stats_poller;
ERROR 1054 (42S22): Unknown column 'stats_poller' in 'where clause'

Yes, latest stable cacti/cactid/rrdtool/php/mysql :)
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi Reinhard

I'm using the "old" version of your template with Cacti 0.8.7, and it returns the following error :

Code: Select all

$ /usr/bin/php -q /home/cactiuser/cacti-0.8.7/scripts/ss_poller.php
PHP Fatal error:  Call to undefined function db_fetch_cell() in /home/cactiuser/cacti-0.8.7/scripts/ss_poller.php on line 22
Should I include global.php instead of config.php ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Well, I've upgraded to this "new" script, and it's working fine with Cacti 0.8.7a :)

(and it's really nicier)
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Igloo
Posts: 22
Joined: Fri Dec 01, 2006 8:24 am

Post by Igloo »

ss_poller.php gives me the following error

igloo:/usr/share/cacti/site/scripts# php ss_poller.php

Fatal error: Call to undefined function db_fetch_cell() in /usr/share/cacti/site/scripts/ss_poller.php on line 26


php 5 mysql 5.

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

Post by gandalf »

Please read last two posts of fmangeant in this thread
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests