SNMP with cacti on 3.3.13

#1
I'm using LSWS 3.3.13.
I have enable SNMPD configuring snmpd.conf with:
Code:
pass .1.3.6.1.4.1.22253 /usr/bin/php5/php /opt/lsws/add-ons/snmp_monitoring/sample.php
if i run manualy the sample.php I receive a response...
Code:
# /usr/bin/php5/php -q ./sample.php -n .1.3.6.1.4.1.22253.101
.1.3.6.1.4.1.22253.101.1
string
LiteSpeed Web Server
...but if I use snmpwalk I haven't response from snmpd.
On sample.php file I view that is need to pass two parameters ($type and $OID):
PHP:
//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);

}
snmpd "pass" method pass only $OID but not $type and then
PHP:
$bridge->process()
is not run.

Thanks
 
Top