Ok Craig ... I think I have something that may be worth working on.

Using the system('command', $retval); function I am now able to get a
positive return from the snmpset command.
I am still seeing errors, and jffnms still does not grab the config and
dump it into the DB.
This just may be an environment related and may require full paths for
the command and config-file locations.

Here is the fdry_cc.inc.php file as it is now:

<?
/* This file is part of JFFNMS
* Copyright (C) <2002-2005> Javier Szyszlican <[EMAIL PROTECTED]>
* This program is licensed under the GNU GPL, full terms in the LICENSE
file
*/

    // FOUNDRY-SN-AGENT-MIB Configuration Downloader Implementation
    //  successful (1), processing (18), timeout (6), bad access (11),
file-not-found (10)

    function config_fdry_cc_get ($ip,$rwcommunity,$server,$filename) {

        if ($ip && $rwcommunity && $server && $filename) {

            $enable = "########";
            $oid = ".1.3.6.1.4.1.1991.1.1.2.1";
            $result = true;    //There is no Destroy feature in Foundry
snmp - Forcing true for $result

            if ($result==true) {

system("snmpset -c dm3r9x6p -v 2c $ip '$oid.15.0' s $enable '$oid.5.0' a
$server '$oid.8.0' s $file 
name '$oid.9.0' i 22", $retval); 

                print("\n");
                print($retval);    // Print out $retval to ensure the
command took

                sleep (2);

                $result = snmp_get($ip,$rwcommunity,"$oid.9");

                if ($result==1);
                return true;
            }
        }
        return false;
}

    function config_fdry_cc_wait ($ip,$rwcommunity,$server,$filename) {

        $i = 0;
        do {
          $result = snmp_get($ip,$rwcommunity,"$oid.9");
          if ($result==1) return true;
          sleep (2);
        }
        while ($result==18 && $i++ < 30);
        return false;
}

?>




-- 
Jeffrey Singleton
Network Systems Administrator (Trusted Source)
Secure Computing Corporation
48000 North Point Parkway
Alpharetta, GA 30022
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to