Solved! Local Director 430 : SNMP Error
Moderators: Developers, Moderators
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
Solved! Local Director 430 : SNMP Error
Hello,
i have upgraded succesfully from cacti 0.8.5 to 0.8.6b. After the upgrade my cisco local directors 430 show an snmp error in the device screen. In 0.8.5 they where working and i got my interface graphs.
A snmpwalk under linux only shows specific parts of the snmp tables but not the sysdesc information. But i can grap the sysdesc manualy:
snmpwalk -v 2c -c public ***.***.***.*** sysdesc
SNMPv2-MIB::sysDescr.0 = STRING: Cisco LocalDirector 430, version 4.2.6
The local director itself is a little tricky with snmp and it is hard enough to get information out of it but as long as the device shows an snmp error it isn´t polled at all. This is new in 0.8.6b.
My system:
Intel P4, FC2, Cacti 0.8.6b, Cactid (actual from cvs)
Any idea where the problem is ?
Kind regards
Michael
i have upgraded succesfully from cacti 0.8.5 to 0.8.6b. After the upgrade my cisco local directors 430 show an snmp error in the device screen. In 0.8.5 they where working and i got my interface graphs.
A snmpwalk under linux only shows specific parts of the snmp tables but not the sysdesc information. But i can grap the sysdesc manualy:
snmpwalk -v 2c -c public ***.***.***.*** sysdesc
SNMPv2-MIB::sysDescr.0 = STRING: Cisco LocalDirector 430, version 4.2.6
The local director itself is a little tricky with snmp and it is hard enough to get information out of it but as long as the device shows an snmp error it isn´t polled at all. This is new in 0.8.6b.
My system:
Intel P4, FC2, Cacti 0.8.6b, Cactid (actual from cvs)
Any idea where the problem is ?
Kind regards
Michael
Last edited by mensmaximus on Wed Nov 10, 2004 5:39 am, edited 2 times in total.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Increase the SNMP timeout from 500ms to 1000ms. This might help, a buddy if mine had the same problem after an upgrade.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Can you get the sysDescr using SNMPv1? There has been some issues with how the device screen querys vs. how the pollers query the device. If SNMP is enabled in PHP it will favor using SNMPv1 on the device screen. This is being addressed in the lastest version.snmpwalk -v 2c -c public ***.***.***.*** sysdesc
SNMPv2-MIB::sysDescr.0 = STRING: Cisco LocalDirector 430, version 4.2.6
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
No, the Localdirector does only respond to SNMPv2c. If you say this has been adressed, do you mean i should compile cacti from the latest cvs or do you mean the latetst php version?Can you get the sysDescr using SNMPv1? There has been some issues with how the device screen querys vs. how the pollers query the device. If SNMP is enabled in PHP it will favor using SNMPv1 on the device screen. This is being addressed in the lastest version.
Michael
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Well, instead of making promises, I show you how to work around it.
And mostly because the latest version is moving into Alpha territory with all the changes being committed.
First the problem stems from SNMP in PHP being used and not the NET-SNMP binaries on the web interface. A simple but effective way to comment out the SNMP module in your PHP.INI file, if nothing else is using it. This will stop cacti from using the buildin PHP SNMP and then will pay attention to the version when querying the host.
Another alternative is to edit the ./include/config.php file and set the
to
Let me know if this resolves your issue.
Thanks,
And mostly because the latest version is moving into Alpha territory with all the changes being committed.
First the problem stems from SNMP in PHP being used and not the NET-SNMP binaries on the web interface. A simple but effective way to comment out the SNMP module in your PHP.INI file, if nothing else is using it. This will stop cacti from using the buildin PHP SNMP and then will pay attention to the version when querying the host.
Another alternative is to edit the ./include/config.php file and set the
Code: Select all
/* built-in snmp support */
$config["php_snmp_support"] = function_exists("snmpget");
Code: Select all
/* built-in snmp support */
$config["php_snmp_support"] = false;
Let me know if this resolves your issue.
Thanks,
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
There is no snmp module loaded in php.ini. Trying to uninstall php-snmp with rpm -e fails due to dependencies with cacti-0.8.6b.rony wrote: A simple but effective way to comment out the SNMP module in your PHP.INI file, if nothing else is using it.
Setting the $config["php_snmp_support"] to false does not solve the problem.rony wrote: Another alternative is to edit the ./include/config.php file
Using net-snmp-5.x or ucd-snmp-4.x (tested with two different servers and appropriate setting in cacti) makes no difference.
With and old mips based server (cobalt raq2+, debian woody, net-snmp-5.1) and cacti 0.8.4 it works like a charme:
System: Cisco LocalDirector 430, version 4.2.6
Uptime: Timeticks: (8760467) 1 day, 0:20:04.67
Hostname: ldmaster
The differencie is the Debian server use php-4.3.4 and the FC box uses php-4.3.8.
If you have any other idea please feel free to share it with me. I´ll keep on investigating.
Best regards
Michael
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Ok, remember what I said before? Forget it, it will not change the version the UI is using in 0.8.6b.
Edit ./lib/snmp.php and comment out or remove the following code around line 43:
This will force it to use the version of SNMP defined on the host.
Let me know if this works.
Thanks,
Edit ./lib/snmp.php and comment out or remove the following code around line 43:
Code: Select all
/* always use SNMP version 1 for UI stuff */
if ($environ == SNMP_WEBUI) {
$version = "1";
}
Let me know if this works.
Thanks,
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
Ok, we are a big step forward the right direction: no snmp error anymore and the device (local director) is marked as "up". So far so good - but ...rony wrote: Edit ./lib/snmp.php and comment out or remove the following code around line 43
Adding a data querie "SNMP Interface Statistic" fails:
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
Doing this in cacti 0.8.4 works perfect:
+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1'
+ Found item [ifIndex='1'] index: 1 [from value]
+ Found item [ifIndex='2'] index: 2 [from value]
+ Found item [ifIndex='3'] index: 3 [from value]
+ Located input field 'ifDesc' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2'
+ Found item [ifDesc='interface 0'] index: 1 [from value]
+ Found item [ifDesc='interface 1'] index: 2 [from value]
+ Found item [ifDesc='interface 2'] index: 3 [from value]
+ Located input field 'ifName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1'
+ Found item [ifName='End of MIB'] index: End of MIB [from value]
+ Located input field 'ifAlias' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18'
+ Found item [ifAlias='End of MIB'] index: End of MIB [from value]
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3'
+ Found item [ifType='ethernetCsmacd(6)'] index: 1 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 3 [from value]
+ Located input field 'ifSpeed' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5'
+ Found item [ifSpeed='100000000'] index: 1 [from value]
+ Found item [ifSpeed='100000000'] index: 2 [from value]
+ Found item [ifSpeed='100000000'] index: 3 [from value]
+ Located input field 'ifHwAddr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6'
+ Found item [ifHwAddr='00:00:02:B3:CC:ED:FE'] index: 1 [from value]
+ Found item [ifHwAddr='00:00:02:B3:CC:ED:FE'] index: 2 [from value]
+ Found item [ifHwAddr='00:00:02:B3:CC:ED:FE'] index: 3 [from value]
+ Located input field 'ifIP' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2'
+ Found item [ifIP=''] index: [from regexp parse]
My next test was to copy interface.xml from cacti 0.8.4 to 0.8.6b (i created a new data query based on the old interface.xml) to see wether this solves the problem. No luck, interface.xml is not the problem.
This brings me to the idea the issue may be related to data_query.php. I am still analyzing this as there are massive changes from 0.8.4 (snmp.php) to 0.8.6b (snmp.php and data_query.php).
Thank you so much for your help so far. I appretiate your input. I will post my ongoing efforts. Maybe this is helpfull for the further development of cacti which btw is one of the best pieces of software i ever saw.
Regards
Michael
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
Just an update:
Changed $config["php_snmp_support"] to false again to see wether this resolves the data_query issue without effect. Therefore default restored.
Changed SNMP_WEBUI $version to "2c". As a result the snmp_error returned. Changed to "2" and the snmp_error is gone but still querying data is impossible. Default restored again.
Changed $config["php_snmp_support"] to false again to see wether this resolves the data_query issue without effect. Therefore default restored.
Changed SNMP_WEBUI $version to "2c". As a result the snmp_error returned. Changed to "2" and the snmp_error is gone but still querying data is impossible. Default restored again.
-
- Posts: 24
- Joined: Tue Nov 09, 2004 11:43 am
SOLVED
Finaly i got it.
In snmp.php the function cacti_snmp_walk defines the snmp version for SNMP_WEBUI again. I just comented this out aswell and now it works.
Suggegstion to the developers:
Define a variable for SNMP_WEBUI only once (e.g. in snmp.php) and call it from each function block when needed.
Thanks again to Rony pointing me to the right place.
Kind regards
Michael
In snmp.php the function cacti_snmp_walk defines the snmp version for SNMP_WEBUI again. I just comented this out aswell and now it works.
Suggegstion to the developers:
Define a variable for SNMP_WEBUI only once (e.g. in snmp.php) and call it from each function block when needed.
Thanks again to Rony pointing me to the right place.
Kind regards
Michael
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
FYI,
This is being reviewed, it was changed for PHP SNMP reasons and will be fixed so this problem will not occur in 0.8.7.
This is being reviewed, it was changed for PHP SNMP reasons and will be fixed so this problem will not occur in 0.8.7.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 1 guest