[withdrawn] Poller Performance Plugin, now at V0.32

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

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

[withdrawn] Poller Performance Plugin, now at V0.32

Post by gandalf »

Based on a patch and reworking of Howie (see: http://forums.cacti.net/viewtopic.php?t=12369), I updated the PollPerf Plugin. From README:
/*******************************************************************************

Author ......... Reinhard Scheck
Contact ........ gandalf @ cacti forums
Home Site ...... http://www.cacti.net
Program ........ Cacti Poller Performance
Version ........ 0.32
Purpose ........ Determine poller performance per Host

*******************************************************************************/

----[ Purpose

This plugin analyzes cacti.log output running DEBUG mode
It then computes some runtime statistics per Host

----[ Features

1) Will switch to DEBUG mode at a predefined timestamp
2) Will stop DEBUGging after a predefined amount of polling cycles
3) Then analyzes the complete cacti.log file and fills a SQL table for
each host
4) Features a GUI to display results of that table.
Allows for sorting of each column in ASC and DESC order.

----[ Prerequisites

Before you install PollPerf, you need to have met the following pre-requisites:

1) Cacti 0.8.6i or Above. Versions of Cacti prior to 0.8.6 are not supported.
2) Cacti Plugin Architecture. Tested with V1.1, should work at least with V1.0

----[ Installation

Install is similar to other plugins.
Realm ID 8 is used (console access). No sql import necessary

----[ Usage

Define Settings first
- a timestamp to start DEBUG level
- a count for the numbers of polling cycles for sampling

Goto "Poller Performance" item found below "Utilities". Find all
statistics there. You may want to sort by any column.

----[ Additional Help?

If you need additional help, please goto forums.cacti.net.

----[ Possible Bugs?

If you figure out this problem, let me know!!!

----[ Special Thanks

I want to thank Howie for the first implementation of this plugin
based on some patch that I created in 2006

----[ Future Changes

Enable Web GUI to REFRESH the plugin_pollperf_data table.
But this is a background task and will take considerable time.

----[ Changelog
--- SVN ---

--- 0.32 ---
feature: reset verbosity to LOW at max to avoid log file filling up
bug: pollperf_parse.php not running when necessary

--- 0.31 ---

--- 0.3 ---
Parsing is done at end of the DEBUGging cycle. Parser now runs as a
background php command and fills the plugin_pollperf_data table.

--- 0.2 ---
Add management of DEBUG mode, sorting columns

--- 0.1 ---
Initial release, authored by Howie
Please be VERY, VERY careful. This version will automatically switch logging level to DEBUG and reset it after some cycles. I've taken very much effort to avoid mis-behaviour. But if resetting logging level fails, this will SURELY BLOW YOUR FILESYSTEM. I don't hope so, but ...
Reinhard

Updated to V0.32
Attachments
pollperf-v0.32.tgz
The Code
(14.61 KiB) Downloaded 1376 times
Last edited by gandalf on Fri Mar 30, 2007 3:47 pm, edited 9 times in total.
User avatar
ruud
Cacti User
Posts: 64
Joined: Tue Aug 22, 2006 3:07 am
Location: Rotterdam, The Netherlands
Contact:

Post by ruud »

Uuhm, maybe it's just me, but nothing happens..

I placed the plugin into the plugin directory, added the plugin to my config.php, made sure the file right are correct..

But nothing happens, no new tab, no new options.. The only change i can see is that pollerperf gets mentioned in the hostinfo :
Cacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - Cactid v0.8.6i
Server Info - Linux 2.6.17-gentoo-r8
Web Server - Apache
PHP - 5.1.6-pl6-gentoo
PHP Extensions - libxml, xml, standard, SPL, sockets, snmp, session, Reflection, mysql, mcrypt, mbstring, iconv, gettext, gd, dom, dba, date, zlib, pcre, openssl, apache2handler, rrdtool, eAccelerator
MySQL - 5.0.26
RRDTool - 1.2.15
SNMP - 5.4
Plugins
  • Thresholds (thold - v0.3.0)
    Device Monitoring (monitor - v0.7)
    Network Discovery (discovery - v0.7)
    Report Creator (reports - v0.1b)
    Network Tools (tools - v0.2)
    Host Info (hostinfo - v0.1)
    killspike (killspike - v0.1.0a)
    pollerperf
Server #1 : Cacti 0.8.7b | cmd.php | HP Proliant DL380 G5 (Dual Core Xeon 3.2 GHz, 14 Gb, 2x73 Gb RAID1 - System + 3x73 Gb RAID5 - SQL/RRA) | Gentoo Linux
_________SYSTEM STATS: Time:114.6022 Method:cmd.php Processes:8 Threads:N/A Hosts:408 HostsPerProcess:51 DataSources:32276 RRDsProcessed:16148
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

ruud wrote: But nothing happens, no new tab, no new options.. The only change i can see is that pollerperf gets mentioned in the hostinfo :
It appears under the Utilities section in the Console menu (down the side), not as a new tab.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Unfortunately, I published 2 different versions for some hours. Only difference was the "homepage" url; no functional differences.
Now, only the correct one is attached (Will have to provide the Screenshot later)
Reinhard
User avatar
ruud
Cacti User
Posts: 64
Joined: Tue Aug 22, 2006 3:07 am
Location: Rotterdam, The Netherlands
Contact:

Post by ruud »

Ah yes, that solved it for me.. THANX !
Server #1 : Cacti 0.8.7b | cmd.php | HP Proliant DL380 G5 (Dual Core Xeon 3.2 GHz, 14 Gb, 2x73 Gb RAID1 - System + 3x73 Gb RAID5 - SQL/RRA) | Gentoo Linux
_________SYSTEM STATS: Time:114.6022 Method:cmd.php Processes:8 Threads:N/A Hosts:408 HostsPerProcess:51 DataSources:32276 RRDsProcessed:16148
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

i think i have found a small bug in setup.php

the problem occurs when the code

Code: Select all

"general_header"
is used by 2 or more plugins

i have the same problem in manage plugin (in fact, your plugin has conflicted with mine on my system)

Code: Select all

"general_header" => array(
should be renamed to

Code: Select all

"plugin_pollperf_header" => array(
look at the code for plugin weathermap, it is correct
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Nice find, thanks.
I'm thinking about re-working the plugin. I suppose, global sorting of all hosts is a must. But on our production system (~15000 ds), it takes too long. So I will call a background parser to fill some sql table. The GUI will only display this table as usual. Perhaps I will implement sth like a "Re-Scan cacti.log" button; let's see. Will take some time as my favorite volleyball team is very busy this weekend :wink:
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Uploaded new version (including bug fix from above).
Now allows for total sorting. Executed parsing in background for all hosts of the host table. If you want to re-read the log file, you have to run pollperf_parse.php manually. But there should be no real need for this (except for testing purpose).
Please comment
Reinhard
User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

Post by sizulku »

I got this error while running this plugin. any help would be great. Thanks.

Code: Select all

03/14/2007 10:32:53 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT host.id, host.disabled, host.status, host.hostname, host.description, plugin_pollperf_data.lstart, plugin_pollperf_data.lend, plugin_pollperf_data.ds_count, plugin_pollperf_data.diff, plugin_pollperf_data.rate, plugin_pollperf_data.ds_per_run, plugin_pollperf_data.dur_per_run FROM host LEFT JOIN plugin_pollperf_data ON (host.id = plugin_pollperf_data.id) WHERE (host.hostname LIKE '%%%%' OR host.description LIKE '%%%%') ORDER BY description ASC LIMIT 0,30"  
03/14/2007 10:32:53 PM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select COUNT(host.id) FROM host LEFT JOIN plugin_pollperf_data ON (host.id = plugin_pollperf_data.id) WHERE (host.hostname LIKE '%%%%' OR host.description LIKE '%%%%')"  
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You tried to display data while the data collection was not yet finished.
Remember to activate this plugin from "Settings -> Misc". You will define a start time there and a count. Unless this count of poller cycles has passed, the plugins has not yet created the given table.
So please activate it and wait that amount of polling cycles (you may start with one single cycle). Then you should see the data
Reinhard
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

Gandolf (or anyone else),
I am having a problem with this plugin. I have unzipped the above file to %cactiroot%\plugins\pollperf. I have edited \include\config.php to include

Code: Select all

$plugins[] = 'pollperf';
. Then i go to give my account permissions to view this plugin, i get the following error message:
Notice: Undefined index: index.php: in E:\cacti\lib\functions.php on line 1422
.

I am have some performance lag on my poller, and i would love to try and narrow down where this is coming from.

Any assistance is appreciated.

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I'm quite sure it's the same issue just as one post above this one. Please verify
Reinhard
apperrault
Cacti User
Posts: 379
Joined: Fri Feb 16, 2007 11:37 am
Location: Emeryville, CA
Contact:

Post by apperrault »

Thanks for the info Gandolf, I let the system run it's course last night. It is supposed to run for 10 cycles, which it appears it did (my log file is now very large) but when i click on Poller Performance from the console, I get nothing, and when i look at the cacti log i see this in there:

Code: Select all

 03/30/2007 07:42:07 AM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed "SELECT host.id, host.disabled, host.status, host.hostname, host.description, plugin_pollperf_data.lstart, plugin_pollperf_data.lend, plugin_pollperf_data.ds_count, plugin_pollperf_data.diff, plugin_pollperf_data.rate, plugin_pollperf_data.ds_per_run, plugin_pollperf_data.dur_per_run FROM host LEFT JOIN plugin_pollperf_data ON (host.id = plugin_pollperf_data.id) WHERE (host.hostname LIKE '%%%%' OR host.description LIKE '%%%%') ORDER BY description ASC LIMIT 0,30"
03/30/2007 07:42:07 AM - CMDPHP: Poller[0] ERROR: SQL Cell Failed "select COUNT(host.id) FROM host LEFT JOIN plugin_pollperf_data ON (host.id = plugin_pollperf_data.id) WHERE (host.hostname LIKE '%%%%' OR host.description LIKE '%%%%')"
Also, at the top of the page on the Poller Performance page is see the following:

Code: Select all

Notice: Undefined index: index.php: in E:\cacti\lib\functions.php on line 1432

Notice: Undefined index: index.php: in E:\cacti\lib\functions.php on line 1451
Any assistance would be greatly appreciated.

Thanks

app
[b]Cacti Version[/b] - 0.8.7b
[b]Plugin Architecture[/b] - 2.2 Beta
[b]Poller Type[/b] - CMD.php
[b]Server Info[/b] - Linux 2.6.9-78.0.1.ELsmp
[b]Web Server[/b] - Apache/2.0.52 (Red Hat)
[b]PHP[/b] - 4.3.9
[b]MySQL[/b] - 4.1.22
[b]RRDTool[/b] - 1.2.23
[b]SNMP[/b] - 5.1.2
[b]Plugins[/b][list]Global Plugin Settings (settings - v0.5)
SuperLinks (superlinks - v0.72)
Host Info (hostinfo - v0.2)
Report Creator (reports - v0.3)
Update Checker (update - v0.4)
Realtime for Cacti (realtime - v0.35)
Cacti Log View (clog - v1.1)
RRD File Cleaner (rrdclean - v0.36)
Network Discovery (discovery - v0.9)
Uptime (uptime - v0.4)[/list]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

FIRST OF ALL:
Make sure to reset "Settings -> General -> Poller Logging Level" to LOW at least. Else, your cacti.log may increase beyond limits.
Currently, I'm examining the problem; will report later
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please perform and check:

Code: Select all

$ grep POLLPERF ./log/cacti.log 
03/30/2007 06:35:03 PM - POLLPERF: Poller[0] PollPerf STARTING
03/30/2007 07:25:04 PM - POLLPERF: Poller[0] PollPerf ENDING: 2
03/30/2007 07:25:37 PM - POLLPERF: Poller[0] Poller Performance Parser is now running
03/30/2007 07:25:37 PM - POLLPERF: Poller[0] Poller Performance Parser has finished
You should see exactly this result, timestamps will vary. And please report your "Settings -> Misc" for this plugin.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests