[Resolved] SNMP Bridge Issue

Status
Not open for further replies.

innovot

Well-Known Member
#1
Hi, have tested https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:snmp-cacti-monitoring this morning but it is not returning any values. Have tried running sample.php directly with args guage and .1.3.6.1.4.1.22253 but it just drops to the prompt. Have added some debug lines to class.litespeed_stats.php and it does indeed read values from the .rtreports file but just does not output them. Any thoughts on why this may not be working ? Thank you.
 

innovot

Well-Known Member
#3
Looking at class.litespeed_stats.php if I print the variable $found for the regex
PHP:
$found = preg_match_all("/REQ_RATE \[([^\]]*)\]: REQ_PROCESSING: ([0-9]+), REQ_PER_SEC: ([0-9]+), TOT_REQS: ([0-9]+)/i",$content,$result);
it is always coming back as zero. $content definitely contains data when I print it. excerpt:
Code:
REQ_RATE [APVH_www.somesite.com]: REQ_PROCESSING: 0, REQ_PER_SEC: 0.0, TOT_REQS: 2, PUB_CACHE_HITS_PER_SEC: 0.0, TOTAL_PUB_CACHE_HITS: 0, PRIVATE_CACHE_HITS_PER_SEC: 0.0, TOTAL_PRIVATE_CACHE_HITS: 0, STATIC_HITS_PER_SEC: 0.0, TOTAL_STATIC_HITS: 2
 
Last edited by a moderator:

innovot

Well-Known Member
#4
Okay fixed the issue. Needed to change the regex to be:
PHP:
$found = preg_match_all("/REQ_RATE \[([^\]]*)\]: REQ_PROCESSING: ([0-9]+), REQ_PER_SEC: ([0-9]+\.[0-9]+), TOT_REQS: ([0-9]+)/i",$content,$result);
 
Last edited by a moderator:
Status
Not open for further replies.
Top