Cacti 0.6.6 snmp broken

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
zman
Posts: 3
Joined: Sat Feb 02, 2002 7:00 pm
Location: Portland, OR

Post by zman »

After adding a host to snmp interfaces nothing is shown. Refreshing and adding 300 to php.ini still gives me nothing.
Running Redhat 7.2 w/ ucd-snmp 4.2.3, php 4.1.2. I have confirmed that my snmp is functional and when manually running snmpget/snmpwalk I get the correct results.
This is a fresh install of cacti. Previous cacti versions did not have this failure.
Everything else works great.
Any ideas what could be causing this?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

If you are using a default installation of Redhat 7.2, I am going to assume that you do not have SNMP compiled into your php binary.

If this is the case, under 'cacti Settings' make sure your 'snmpget Path' and 'snmpwalk Path' both point to valid binaries.

If that does not work, is there anything that you upgraded besides cacti? I know that cacti works fine with ucd-snmp 4.2.3 and Redhat 7.2. However, I also know that PHP 4.1.2 is fairly new. Make sure that your php.ini looks ok.

Update me on your progress,

-Ian
zman
Posts: 3
Joined: Sat Feb 02, 2002 7:00 pm
Location: Portland, OR

Post by zman »

On 2002-03-17 21:28, raX wrote:
If you are using a default installation of Redhat 7.2, I am going to assume that you do not have SNMP compiled into your php binary.

If this is the case, under 'cacti Settings' make sure your 'snmpget Path' and 'snmpwalk Path' both point to valid binaries.

If that does not work, is there anything that you upgraded besides cacti? I know that cacti works fine with ucd-snmp 4.2.3 and Redhat 7.2. However, I also know that PHP 4.1.2 is fairly new. Make sure that your php.ini looks ok.

Update me on your progress,

-Ian
I have 2 machines w/RH7.2 that have Apache+PHP+UCD-SNMP installed from source.
On both machines snmp is compiled into the php cgi binary. Since the last rev of Cacti both machines have been wiped clean and a complete OS re-install performed.

On Machine both machines I'm using SNMP 4.2.3. On machine A I'm using PHP 4.1.1 and Machine B PHP 4.1.2. I verified both machines have the correct path to the snmpget/walk binaries.
I tried both Cacti versions 0.6.6/0.6.5 and both exhibit same behavior. I checked all log files and no errors present. I checked php.ini and also turned on all errors (except notify) and see no errors. So, now I believe its something I did but haven't a clue where to look next.
As to the Cacti SNMP interfaces page, is there any way to see whats going on behind the scenes when I click on 'refresh' and or add a new interface? Something (on my end) is broke, just don't know where or how to see it.

thanks
nakturk
Posts: 1
Joined: Tue Mar 19, 2002 7:00 pm

Post by nakturk »

On 2002-03-17 02:11, zman wrote:
After adding a host to snmp interfaces nothing is shown. Refreshing and adding 300 to php.ini still gives me nothing.
Running Redhat 7.2 w/ ucd-snmp 4.2.3, php 4.1.2. I have confirmed that my snmp is functional and when manually running snmpget/snmpwalk I get the correct results.
This is a fresh install of cacti. Previous cacti versions did not have this failure.
Everything else works great.
Any ideas what could be causing this?
I'm running Cacti 0.6.6 on Mandrake 8.1 with
net-snmp 4.2.1 (no snmp support compiled into php).
I also had the same problem and discovered that it is due to ifDescr returned by snmpwalk.
my snmpwalk return ifDescr for eth1 asinterfaces.ifTable.ifEntry.ifDescr.2 = "eth0" Hex: 65 74 68 30 which causes problem whiles inserting into MySQL.

so I added these two lines to include/snmp_functions.php at line 87
$iiii = explode(" ", $interface_description);<br>
$interface_description = str_replace(""", "", $iiii[0]);

Also for snmpget changed line 417 as $snmp_output_octets = `$path_snmpget <b>-O v</b> $snmp_ver $snmp_ip '$snmp_community' $snmp_octet_name.$snmp_int
erface_number`;

hope this helps.

<font size=-1>[ This Message was edited by: nakturk on 2002-03-20 07:19 ]</font>
supertux
Posts: 14
Joined: Mon Jan 21, 2002 7:00 pm
Location: Munich, Germany
Contact:

Post by supertux »

Thanks, that fixed it for me! Except for a missing in the second line of code.

/*$interface_description = trim(ereg_replace(".*=","",$interface_description));*/
$iiii = explode(" ", $interface_description);
$interface_description = str_replace(""", "", $iiii[0]);

PS. Dont forget to comment the old line (82)


<font size=-1>[ This Message was edited by: supertux on 2002-03-20 09:18 ]</font>

<font size=-1>[ This Message was edited by: supertux on 2002-03-20 09:19 ]</font>

<font size=-1>[ This Message was edited by: supertux on 2002-03-20 09:20 ]</font>
Guest

Post by Guest »

raX wrote:If you are using a default installation of Redhat 7.2, I am going to assume that you do not have SNMP compiled into your php binary.

If this is the case, under 'cacti Settings' make sure your 'snmpget Path' and 'snmpwalk Path' both point to valid binaries.

If that does not work, is there anything that you upgraded besides cacti? I know that cacti works fine with ucd-snmp 4.2.3 and Redhat 7.2. However, I also know that PHP 4.1.2 is fairly new. Make sure that your php.ini looks ok.

Update me on your progress,

-Ian
Cacti 0.6.7 has fixed my issues. I could not get previous version to work at all for snmp interfaces. Thanks to all who provided solutions but none of them worked for me.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Excellent. Glad to hear that some of my SNMP revisions paid off. Tell me if you have any more problems.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests