LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Cacti Templates "ExtApp" and "Vhost" queries not working

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2012, 05:39 AM
TiME TiME is offline
Member
 
Join Date: Nov 2010
Posts: 10
Unhappy Cacti Templates "ExtApp" and "Vhost" queries not working

I've setup LiteSpeed's Cacti templates according to this article: http://www.litespeedtech.com/support...cti_monitoring
However, the data queries for "ExtApp" and "Vhost" return 0 items and 0 rows. The "General" data query is working fine though and it's graphs too.

Cacti version: 0.8.7i
LiteSpeed version: 4.1.10 Standard
SNMPD: net-snmp-5.3.2.2

ExtApp query debug:
Code:
+ Running data query [11].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/litespeed_extapp.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.22253.300' Index Count: 0
+ No SNMP data returned
Vhost query debug:
Code:
+ Running data query [10].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/litespeed_vhost.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.22253.200' Index Count: 0
+ No SNMP data returned
snmpd.conf
Code:
rocommunity xxx
pass .1.3.6.1.4.1.22253 /usr/local/lsws/lsphp5/bin/php /usr/local/lsws/add-ons/snmp_monitoring/sample.php
sample.php
Code:
<?

/*--------------------------------
assuming  following entry in /etc/snmp/snmpd.conf

pass .1.3.6.1.4.1.22253 /usr/bin/php smaple.php

if you change the default parent oid node: .1.3.6.1.4.1.22253, you must also modify the OID entries .xml files.
--------------------------------*/


require_once("class.litespeed_snmp_bridge.php");

$processes = 0; //<-- value of > 1 only valid LiteSpeed Enterprise (num of cpus licensed)
$report_path = "/tmp/lshttpd/"; //<-- path to .rtreport folder. Default is /tmp/lshttpd/

$cache_time = 0; //<-- seconds to cache parsed data
$cache_file = "/tmp/_lsws_sampe_cache.txt"; //<-- cache file..full path.


//get params from snmpd pass mechanism
if(array_key_exists(1,$_SERVER["argv"]) && array_key_exists(2,$_SERVER["argv"])) {
	$type = trim($_SERVER["argv"][1]);
	$oid = trim($_SERVER["argv"][2]);

	$bridge = new litespeed_snmp_bridge($processes, $report_path, $cache_time, $cache_file);
	$bridge->process($type, $oid);
	
}

?>
PS: I have to correct my statement about "General" query graphs are working. They're displayed (eg. rrd files existing), but don't show any data. Also with the above configuration, all my other graphs stopped working.

Last edited by TiME; 02-15-2012 at 05:02 AM..
Reply With Quote
  #2  
Old 02-12-2012, 06:46 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Can you try "Monitor LiteSpeed Server Status via RRD Graph"
http://www.litespeedtech.com/support...aph_monitoring

it's simple and easy to setup, and we recommend it.

if RRD working fine, probably "class.litespeed_snmp_bridge.php" need some update, to fix your cacti issue.
Reply With Quote
  #3  
Old 02-15-2012, 04:56 AM
TiME TiME is offline
Member
 
Join Date: Nov 2010
Posts: 10
Code:
[root@xxx]# /usr/local/lsws/lsphp5/bin/php /xxx/ls_stats/update.php
Working on cpu
Memory read error
Reply With Quote
  #4  
Old 02-15-2012, 02:41 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
/path/to/lsphp5 usually refers to /usr/local/lsws/fcgi-bin/lsphp5 (/usr/local/lsws is the lsws install root). iow, the correct command is:
Quote:
/usr/local/lsws/fcgi-bin/lsphp5 /xxx/ls_stats/update.php
Reply With Quote
  #5  
Old 02-16-2012, 04:35 AM
TiME TiME is offline
Member
 
Join Date: Nov 2010
Posts: 10
Thanks for your reply, but same result, I've already tried that.
Reply With Quote
  #6  
Old 04-14-2013, 05:29 AM
ihost ihost is offline
New Member
 
Join Date: Apr 2013
Posts: 1
Default class.litespeed_stats.php

change;
$found = preg_match_all("/REQ_RATE \[([^\]]*)\]: REQ_PROCESSING: ([0-9]+), REQ_PER_SEC: ([0-9]+).([0-9]+), TOT_REQS: ([0-9]+)/i",$content,$result);
and
$found = preg_match_all("/EXTAPP \[([^\]]*)\] \[([^\]]*)\] \[([^\]]*)\]: CMAXCONN: ([0-9]+), EMAXCONN: ([0-9]+), POOL_SIZE: ([0-9]+), INUSE_CONN: ([0-9]+), IDLE_CONN: ([0-9]+), WAITQUE_DEPTH: ([0-9]+), REQ_PER_SEC: ([0-9]+).([0-9]+), TOT_REQS: ([0-9]+)/i",$content,$result);
Reply With Quote
Reply

Tags
cacti, litespeed, monitoring, templates

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:08 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.