0.8.6.d missing hardware address/status/type in data query

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

Moderators: Developers, Moderators

User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

No. Edit Host, then Click "Create Graphs", then Click "Green Circle". See if that makes the "Up/Down" reappear.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Post by pirx »

TheWitness wrote:No. Edit Host, then Click "Create Graphs", then Click "Green Circle". See if that makes the "Up/Down" reappear.

TheWitness
Maybe I'm a bit slow. I'm not using php-snmp, snmpwalk seems to work, MIBS=ALL is not set.

I haven't changed anything else since yesterday, why should up/down now reappear. I've tried this yesterday a few times. Am I missing something you suggested? I didn't reboot, because you wrote that this would only necessary if MIBS=ALL is set.

Ralf
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If MIBS=All is set and you clear it, you need to restart Apache. With some people, it's easier to simply instruct to Reboot.

Have you attempted refreshing with the Green Circle? If it restores the information, it is likely Cactid that is affecting the display.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Post by pirx »

I've refreshed the devices with the green circle several times since yesterday. No change. I don't get up/down, type or hardware address.

Ralf
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Post by pirx »

The new php-snmp package for fedora has just been released. So I changed the cacti settings to

$config["php_snmp_support"] = function_exists("snmpget");

Cacti Variables
Operating System: unix
PHP SNMP Support: yes

No luck. After hitting the green button there are still only the numerical values for status/type and no hardware address!

I get the right values with snmpwalk (see first post), thus the MIB files can't be the cause. What's left, what more can I check?

cacti output for status
+ Located input field 'ifOperStatus' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.8'
+ Found item [ifOperStatus='1'] index: 1 [from value]
+ Found item [ifOperStatus='1'] index: 2 [from value]
...
snmpwalk for status
snmpwalk -Ov -v1 -c $cummunity $switch .1.3.6.1.2.1.2.2.1.8
INTEGER: up(1)
INTEGER: up(1)
...

cacti output for type
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3'
+ Found item [ifType='6'] index: 1 [from value]
+ Found item [ifType='6'] index: 2 [from value]
...
snmpwalk for type
snmpwalk -Ov -v1 -c $community $switch .1.3.6.1.2.1.2.2.1.3
INTEGER: ethernetCsmacd(6)
INTEGER: ethernetCsmacd(6)
...

cacti output for hardware address
Located input field 'ifHwAddr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6'
+ Found item [ifHwAddr=''] index: 1 [from value]
+ Found item [ifHwAddr=''] index: 2 [from value]
...
snmpwalk for hardware address
snmpwalk -Ov -v1 -c $community $switch .1.3.6.1.2.1.2.2.1.6
STRING: 0:b:fd:84:bd:80
STRING: 0:b:fd:84:bd:81
...

Ralf
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Aka Fixed
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Post by pirx »

TheWitness wrote:Aka Fixed
Where is the fix? I couldn't find anything related in cvs or matis.

I'm confused!

Ralf
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Sorry Ralf, I've been working too many hours between work, home and Cacti and misread your post. I don't have too much time this week. Did I have you try backing off lib/snmp.php 1 version. Give it a show and see what happens.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Post by pirx »

TheWitness wrote:Sorry Ralf, I've been working too many hours between work, home and Cacti and misread your post. I don't have too much time this week. Did I have you try backing off lib/snmp.php 1 version. Give it a show and see what happens.

TheWitness
Ok, going back to snmp.php from cacti 0.8.6c seems to solve the problem! Status/Type and HW Address is back!

1 Up GigabitEthernet1/1 Gi1/1 $serverA ethernetCsmacd(6) 1000000000 00:00:0B:FD:84:BD:80
2 Up GigabitEthernet1/2 Gi1/2 $serverB ethernetCsmacd(6) 1000000000 00:00:0B:FD:84:BD:81
3 Up GigabitEthernet2/1 Gi2/1 $serverC ethernetCsmacd(6) 1000000000 00:00:0D:65:04:DA:94

Should I open a bug report, or do you want to have a closer look at this first? Could I run into problems with this version of snmp.php in connection with cacti 0.8..6d?

BTW: I highly appreciate the time you dedicate to cacti and the users in this form!

Ralf
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Money does help :) As far as a bug report, that is not required. Would you be willing to try another version (patch) though. I believe I know what's wrong, but I need someone like yourself to test. I will attach the file, but then I have to goto work. When I get off work, you will either have turned in the day, or out somewhere having coffee with friends.

Weekends are much better for me to work with overseas users. Say, Saturday morning our time.

TheWitness
Attachments
snmp.zip
lib/snmp.php
(2.54 KiB) Downloaded 84 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

I just tried this patch, but get an error when adding a device or reloading the "SNMP - Interface Statistics" data query :

Code: Select all

Warning: Cannot modify header information - headers already sent by (output started at /cacti/cacti-0.8.6d/lib/snmp.php:215) in /cacti/cacti-0.8.6d/host.php on line 70
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok, I have to get to this after hours. Rollback for now.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Removing the last (blank) line of snmp.php removed the error, but I still don't get status, hardware address and type.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
pirx
Cacti User
Posts: 199
Joined: Tue Feb 10, 2004 10:08 am
Location: Esslingen, Germany

Post by pirx »

TheWitness wrote:Money does help :) As far as a bug report, that is not required. Would you be willing to try another version (patch) though. I believe I know what's wrong, but I need someone like yourself to test. I will attach the file, but then I have to goto work. When I get off work, you will either have turned in the day, or out somewhere having coffee with friends.
Thanks for the quick response!

With the new snmp.php get a blank page and an error in the apache error log.

PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/cacti-0.8.6d/lib/snmp.php:215) in /var/www/html/cacti-0.8.6d/graphs_new.php on line 45, referer: http://$IP/cacti/graphs_new.ph

I see that you changed this part of snmp.php. But I'm not the wolds best coder...
$o = 0;
foreach ($temp_array as $key => $val) {
$snmp_array[$o]["oid"] = ereg_replace("^\.", "", $key);
$snmp_array[$o]["value"] = format_snmp_string($val);
$o++;
}
I'll try to modify your changes, maybe I can get this working.
Weekends are much better for me to work with overseas users. Say, Saturday morning our time.
Tomorrow is a public holiday here in germany and I'll out of office until monday ;)

So, I'll stay with smp.php v0.8.6c until next week.

Have a nice weekend!
Ralf
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Interesting. Unknown end of file marker. Try this one.

TheWitness
Attachments
snmp.zip
(2.54 KiB) Downloaded 76 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests