Hello everyone,

I created a Host_Config get script using CISCO-CONFIG-COPY-MIB as a
template.

I added a vardump after the first function in order to find out why it
was not able to create the file?
Are the snmp version and rw community name supposed to be a part of the
same string?

Here is the vardump output:


$ php tftp_get_host_config.php 

array(2) {
  [0]=>
  array(2) {
    ["function"]=>
    string(18) "config_fdry_cc_get"
    ["args"]=>
    array(4) {
      [0]=>
      &string(13) "192.168.19.19"
      [1]=>
      &string(9) "v2:ts_ops"
      [2]=>
      &string(13) "192.168.19.20"
      [3]=>
      &string(17) "468ada66070d0.dat"
    }
  }
  [1]=>
  array(4) {
    ["file"]=>
    string(55) "/usr/local/share/jffnms/engine/tftp_get_host_config.php"
    ["line"]=>
    int(49)
    ["function"]=>
    string(20) "call_user_func_array"
    ["args"]=>
    array(2) {
      [0]=>
      &string(18) "config_fdry_cc_get"
      [1]=>
      &array(4) {
        [0]=>
        string(13) "192.168.19.19"
        [1]=>
        string(9) "v2:ts_ops"
        [2]=>
        string(13) "192.168.19.20"
        [3]=>
        string(17) "468ada66070d0.dat"
      }
    }
  }
}
19:23:20  :  H   2 : 192.168.19.19 : fdry_cc : Error Getting File (2028.31 msec)
19:23:24  :  H   3 : 192.168.19.17 : cisco_cc : OK same config as last one (2) 
(4231.06 msec)
19:23:24 TIMES  : Total Time 6269.8 msec.

As you can see the cisco switch has no problem downloading the config and 
completing the task.

Anyway .. here is the working SNMP string that when run from command-line, does 
download the config, as long as the path/file is already created and writable:

        
snmpset -v2c -c private switch .1.3.6.1.4.1.1991.1.1.2.1.15.0 s
enable .1.3.6.1.4.1.1991.1.1.2.1.5.0 a
127.0.0.1 .1.3.6.1.4.1.1991.1.1.2.1.8.0 s
subdir/targetfile .1.3.6.1.4.1.1991.1.1.2.1.9.0 i 22



-- 
Jeffrey Singleton
Network Systems Administrator (Trusted Source)
Secure Computing Corporation
48000 North Point Parkway
Alpharetta, GA 30022
C: +1 770-820-2909
O: +1 678-904-3694
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to