Darren,
The only thing that I can think of is making this don't work is that I'm escaping the ' to \' for inclusion in the DB and the DB may be returning it without the slash.
So, if your config has any ' character in it, that may trigger a difference, if it is, please replace line 85 of tftp_get_hosts_config.php to:
$config_data_old = str_replace ("'","\'",$aux["config"]);And then try the tftp_get_hosts_config again.
If you don't have any ' characters in the config, I'm out of ideas and I'll need more debugs inside the JFFNMS code that will include your configuration, like doing a debug() call of the 2 variables compared.
Javier
Darren Gibbs wrote:
Javier.
OK - listed below is the steps performed
1) telnet to 172.16.1.65 2) login and enable 3) copy running-config tftp 4) filename 1 test-config2 5) repeat with filename test-config2 6) md5sum test-config1 7) md5sum test-config2
Results listed below
sky20:/usr/local/jffnms/tftpd # md5sum test-config1 1adabcc18881c934dd8d60b73279efd1 test-config1 sky20:/usr/local/jffnms/tftpd # md5sum test-config2 1adabcc18881c934dd8d60b73279efd1 test-config2 sky20:/usr/local/jffnms/tftpd #
I can't see a difference between the md5sum results.
diff provides no difference either.
running the tftp_get_host_config.php script again confirms that my install of JFFNMS still thinks 172.16.1.65 has a different config to the last one.
Darren
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Javier Szyszlican Sent: Tuesday, 6 July 2004 11:57 AM Cc: [EMAIL PROTECTED] Subject: Re: [jffnms-users] Saved configurations - limits?
Darren,
Somehow the configs are different.
Please do two 'copy running tftp' from one of your switches to the tftp server. Save both files with different names and then use md5sum to get the hashes. (You can also run a diff -Nru on them, but jffnms uses md5).
If they are equal, we've a problem somewhere.
Javier
Darren Gibbs wrote:
Javier.
Just did that - twice, immediately after each other - and this is what I
got
sky20:/usr/local/jffnms/engine # php -q tftp_get_host_config.php : H 4 : 172.16.1.2 : cisco_cc : OK same config as last one (2)
(4258.51
msec) : H 5 : 172.16.1.67 : cisco_cc : OK new config id 24 (4086.55 msec) : H 6 : 172.16.1.65 : cisco_cc : OK new config id 25 (4131.96 msec) : H 7 : 172.16.1.129 : cisco_cc : OK same config as last one (5)
(4212.7
msec) : H 8 : 172.16.1.130 : cisco_cc : OK new config id 26 (4332.45 msec) : H 16 : 172.16.1.71 : cisco_cc : OK new config id 27 (4327.96 msec) TIMES : Total Time 25392.61 msec. sky20:/usr/local/jffnms/engine # php -q tftp_get_host_config.php : H 4 : 172.16.1.2 : cisco_cc : OK same config as last one (2)
(4242.56
msec) : H 5 : 172.16.1.67 : cisco_cc : OK new config id 28 (4149.2 msec) : H 6 : 172.16.1.65 : cisco_cc : OK new config id 29 (4111.67 msec) : H 7 : 172.16.1.129 : cisco_cc : OK same config as last one (5) (4083.18 msec) : H 8 : 172.16.1.130 : cisco_cc : OK new config id 30 (4322.32 msec) : H 16 : 172.16.1.71 : cisco_cc : OK new config id 31 (4327.87 msec) TIMES : Total Time 25266.67 msec. sky20:/usr/local/jffnms/engine #
Notice the entries for 172.16.1.67, 172.16.1.65, 172.16.1.130 &
172.16.1.71
- new configs saved for each of them, yet there was literally 5 seconds
between the
two calls of tftp_get_host_config.php, and I *know*, without a doubt,
there
was no possibility of any changes being made to those devices in this
timeframe.
The devices in question are all switches, and are running IOS 12.0 or higher.
Any clues?
Thanks.
Darren
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Javier Szyszlican Sent: Tuesday, 6 July 2004 11:14 AM Cc: [EMAIL PROTECTED] Subject: Re: [jffnms-users] Saved configurations - limits?
Hi Darren,
You should run tftp_get_host_config.php manually to see why jffnms is adding another configuration to the DB.
JFFNMS users md5 to compare the configs, so they have to be exactly the same, if the MD5 hash is different, then the program will add a new
record.
Javier
Darren Gibbs wrote:
Craig.
I'm absolutely sure the configurations are identical - I'vew gone through
them line by line - the file sizes are exactly the same, and there's no difference that I can see.
Selecting "view diff" betwen two config files from the same device shows me nothing.
diff is definitely installed on the box, and as far as I can tell, JFFNMS knows its correct location, and it is executable by all users.
Darren
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Monday, 5 July 2004 8:35 PM To: [EMAIL PROTECTED] Subject: Re: [jffnms-users] Saved configurations - limits?
On Mon, Jul 05, 2004 at 02:47:51PM +1000, Darren Gibbs wrote:
Is there a limit to the number of copies of a device configuration JFFNMS will save?
I've got some devices for which JFFNMS has saved a copy of the
configuration
every day, regardless of them being exactly the same.
I don't think so, are you sure they're identical? I know Alteons change their configurations around even when they are the same.
An out-there question, do you have diff? Does JFFNMS know where it is?
- Craig
-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Javier Szyszlican, Project Leader, JFFNMS [EMAIL PROTECTED]
I hope JFFNMS or I were helpful to you, if you can, please donate at http://jffnms.org/donate
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jffnms-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jffnms-users
