[solved] SNMP Bridge Issue

Discussion in 'General' started by innovot, Aug 25, 2014.

  1. innovot

    innovot Member

    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.
     
  2. innovot

    innovot Member

    Sorry to bring to the top an old post but have tried this again and still cannot get it to work. Help please ?
     
  3. innovot

    innovot Member

    Looking at class.litespeed_stats.php if I print the variable $found for the regex

    $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:

    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
     
  4. innovot

    innovot Member

    Okay fixed the issue. Needed to change the regex to be:

    $found = preg_match_all("/REQ_RATE \[([^\]]*)\]: REQ_PROCESSING: ([0-9]+), REQ_PER_SEC: ([0-9]+\.[0-9]+), TOT_REQS: ([0-9]+)/i",$content,$result);
     

Share This Page