Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 29, 2017 5:49 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: [withdrawn] Poller Performance Plugin, now at V0.32
PostPosted: Sun Mar 04, 2007 12:59 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Based on a patch and reworking of Howie (see: http://forums.cacti.net/viewtopic.php?t=12369), I updated the PollPerf Plugin. From README:
Quote:
/*******************************************************************************

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:
File comment: The Code
pollperf-v0.32.tgz [14.61 KiB]
Downloaded 1188 times

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Last edited by gandalf on Fri Mar 30, 2007 3:47 pm, edited 9 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 6:56 am 
Offline
Cacti User
User avatar

Joined: Tue Aug 22, 2006 3:07 am
Posts: 64
Location: Rotterdam, The Netherlands
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 :
Quote:
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 7:11 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 7:38 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 2:23 pm 
Offline
Cacti User
User avatar

Joined: Tue Aug 22, 2006 3:07 am
Posts: 64
Location: Rotterdam, The Netherlands
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 05, 2007 3:56 pm 
Offline
Cacti User
User avatar

Joined: Tue Jul 12, 2005 8:16 pm
Posts: 250
i think i have found a small bug in setup.php

the problem occurs when the code
Code:
"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:
"general_header" => array(

should be renamed to
Code:
"plugin_pollperf_header" => array(

look at the code for plugin weathermap, it is correct


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 06, 2007 3:03 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 13, 2007 3:55 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 10:35 am 
Offline
Cacti User
User avatar

Joined: Mon Nov 04, 2002 9:15 am
Posts: 110
Location: ACEH
I got this error while running this plugin. any help would be great. Thanks.

Code:
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 '%%%%')" 


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 2:39 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 28, 2007 1:46 pm 
Offline
Cacti User

Joined: Fri Feb 16, 2007 11:37 am
Posts: 372
Location: Emeryville, CA
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:
$plugins[] = 'pollperf';
. Then i go to give my account permissions to view this plugin, i get the following error message:
Quote:
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

_________________
Cacti Version - 0.8.7b
Plugin Architecture - 2.2 Beta
Poller Type - CMD.php
Server Info - Linux 2.6.9-78.0.1.ELsmp
Web Server - Apache/2.0.52 (Red Hat)
PHP - 4.3.9
MySQL - 4.1.22
RRDTool - 1.2.23
SNMP - 5.1.2
Plugins
    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)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 29, 2007 2:52 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
I'm quite sure it's the same issue just as one post above this one. Please verify
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 30, 2007 9:51 am 
Offline
Cacti User

Joined: Fri Feb 16, 2007 11:37 am
Posts: 372
Location: Emeryville, CA
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:
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:
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

_________________
Cacti Version - 0.8.7b
Plugin Architecture - 2.2 Beta
Poller Type - CMD.php
Server Info - Linux 2.6.9-78.0.1.ELsmp
Web Server - Apache/2.0.52 (Red Hat)
PHP - 4.3.9
MySQL - 4.1.22
RRDTool - 1.2.23
SNMP - 5.1.2
Plugins
    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)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 30, 2007 11:36 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 30, 2007 1:33 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Please perform and check:
Code:
$ 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

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 46 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group