-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note about php_snmp and snmp v3 #3818
Comments
You have PHP Snmp module installed, but do you have it enabled? |
phpinfo() says: |
It was really about some of the advanced features, for example the SNMP Output Format and IPv6 support, which .... last time I checked, were not supported in PHP-SNMP. I have not looked at the code for over a year though. Someone should. @xmacan can you take a peak? We also have the AES512 stuff to think about as we move forward. |
I just took a look value_output_format(hex/ascii) has not been addressed, and would have to hack around to see if it was built on Net-SNMP 5.8, if it would support the higher encryption levels outside of AES/SHA1, etc. |
Even php8 does not seem to support more than SHA, AES, AES128. So, both those two things need someone to help the PHP team out with. |
I guess that it isn't only our problem. I found this https://github.com/FreeDSx/SNMP |
Oh, that's slick. You want to do a pull on this one? |
I can try it, but I need few days. I'm busy now |
I like the idea of using a library that we can contribute to or fork, have we checked the license usage? This should go against develop. |
Yea, I'm all for this as well. We will still have to hack spine to get it in there, but it's simply a minor code change, and no third party locked in PHP module update required. |
I am having an issue with this using the Fedora packaged Cacti (& Spine). This may help other Cacti on Fedora users.
The big warning for PHP SNMP is true for SNMPv3. It doesn't work plus there seem to be other incompatibilities in terms of authentication and privacy methods supported that cause PHP SNMP to fail and errors to be written to the cacti.log.
Command line is working fine (note as far as net-snmp is concerned, AES appears to be an alias for AES-128):
The Cacti GUI SNMP config for local Linux machine is:
Within Cacti the local Linux machine monitoring method is SNMPUptime. The error returned to Cacti is:
Oddly, I don't see any errors in cacti.log giving clues as to why PHP SNMP isn't happy.
Trying to remove php-snmp on Fedora unfortunately tries to remove cacti and cacti-spine as dependencies:
Looking at the files delivered:
It looks as though commenting out the line in /etc/php.d/20-snmp.ini and restarting PHP should disable it:
That change does disable PHP SNMP and now Cacti is using net-snmp the polling works as expected.
|
I think we need to change the wording to "disable php-snmp" rather than remove. You are correct, packages that install Cacti will automatically install and enable php-snmp as a module. You may need to check on an upgrade that it doesn't become re-enabled. What do you think about that minor change in wording @TheWitness ? |
Right, if you are using snmpV3, you MUST disable php-snmp until someone, even myself, get's enough spare time to fix this in php-snmp. Unfortunately, I took a dive and then fell short when I found the mountain of work to get output parsing moved to the updated Net-SNMP API. Since then, I've been so busy on other projects, I've not had the time to double back. |
I ran into this same problem recently when moving cacti to another server. The old server runs RHEL 7 while the new server runs RHEL 9. After moving everything over, many (maybe all) of the devices were not polling until I disabled php-snmp (in 20-snmp.ini per previous comments). Although that fixed most of the polling issues, the SNMPv3 devices that were using SHA and DES remained un-pollable. The workaround for those devices is to revert back to SNMPv2. old server (RHEL 7)cacti version 1.2.25 new server (RHEL 9)cacti version 1.2.25 Eventually I'd like to convert back to SNMPv3 polling for those devices when this gets fixed. |
In Technical Support is note:
PHP SNMP | Installed. If you are planning on using SNMPv3, you must remove php-snmp and use the Net-SNMP toolset.
Is it still true? I don't have much experience with v3 but I have to add SNMP v3 only device and it is working without problems. I have installed:
net-snmp.x86_64 1:5.7.2-48.el7_8.1 @updates
net-snmp-agent-libs.x86_64 1:5.7.2-48.el7_8.1 @updates
net-snmp-devel.x86_64 1:5.7.2-48.el7_8.1 @updates
net-snmp-libs.x86_64 1:5.7.2-48.el7_8.1 @updates
net-snmp-utils.x86_64 1:5.7.2-48.el7_8.1 @updates
php-snmp.x86_64 5.4.16-48.el7 @base
Cacti Version | 1.2.12
Cacti OS | unix
NET-SNMP Version | NET-SNMP version: 5.7.2
PHP Version | 5.4.16
The text was updated successfully, but these errors were encountered: