This is getting funny weird.
What does JFFNMS do with those temporary files for config dumps?
Crate file, Dump Data, then Insert into DB, right?
I know this process works now ... but for whatever reason JFFNMS does
not grab the file and dump the data to the DB
Here is a directory listing during one of the tests ...
NOTE: The $filename is being created, and is receiving the config ...
but the file is deleted before JFFNMS does anything with it, so the
config never makes it to the DB
$ ls -l /usr/local/share/jffnms/engine/tftpd
total 8
-rw-rw-rw- 1 jffnms www 2819 Jul 26 17:25 46a911484ed5c.dat <====
File created by JFFNMS but is deleted before anything can be done
-rw-rw-rw- 1 root www 2819 Jul 26 17:21 config <===== File I
created by running the snmpset command manually
Here is what I see when I run the tftp_get_config script from the engine
folder:
$ php tftp_get_host_config.php
.1.3.6.1.4.1.1991.1.1.2.1.15.0 = STRING: "########" //enable
password
.1.3.6.1.4.1.1991.1.1.2.1.5.0 = IpAddress: 10.40.30.8 // tftp
server IP
.1.3.6.1.4.1.1991.1.1.2.1.8.0 = STRING: "46a91525759ac.dat" //
$filename
.1.3.6.1.4.1.1991.1.1.2.1.9.0 = INTEGER: 22 // Action
0No log handling enabled - turning on stderr logging //
Do not know what these errors are, but they appear to not be fatal.
netsnmp_assert pss->s_snmp_errno != (-11) failed snmp_api.c:3124
snmp_build()
17:42:09 : H 11 : 192.168.7.254 : fdry_cc : Error Waiting transfer to
finish (12066 msec)
17:42:09 TIMES : Total Time 12075.35 msec.
#############
So .. to recap ... The script for my foundry load balancer copy-config
does work....its a huge hack, but does return the correct values.
The temp file (represented as $filename) is created and the config is
dumped into it.
The temp file is then deleted 'before' being processed and thrown into
the DB.
We are trying to trace the path of all of these functions that JFFNMS
uses to see if we can find out where what and why.
We are so close to success ... it is almost painful ;)
On Thu, 2007-07-26 at 14:56 -0500, Jeffrey Singleton wrote:
> 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;
> }
>
> ?>
>
>
>
>
>
>
>
> plain text document attachment (ATT3384264.txt), "ATT3384264.txt"
>
> -------------------------------------------------------------------------
> 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/
--
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