-
-
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
When running under Fedora, issues may be seen with snmp values #4726
Comments
try {
$out = @$session->get(trim($oid));
} catch (Exception $e) {
$out = false;
} That is what the code should look like there. Does it match yours? |
I think we need to isolate this error in our snmp_ignore message list. Though a generic USM error speaks to something larger. |
in /usr/share/cacti/lib/snmp.php on line: 497
|
- Attempt to fix the SNMP errors reported in #4726
@majed17, please update |
that didn't solve the problem:
|
Okay, add a Cacti log to the trimmed OID and let's see which ones cause the errors; cacti_log("The OID is '$oid'", false, 'SNMP'); Then let's try to track down the host. It's not going to be entirely easy. |
where to add it? |
Just before line 497. Review your log. |
And line 460. |
ok
|
That's a fairly generic OID, suggests that maybe the SNMP details aren't correct, You can find out the host using Your best bet is to dump the session var using |
If you want a fix for that, btw, edit the include/phpsnmp/classSNMP.php and change the $info variable to $this->info at the end of the __construct function. Then you'll be able to use $session->info to see the host details without using var_export. |
Whilst being unable to obtain SNMP data, the $session->info variable is empty despite appearing to be primed by classSNMP.php's SNMP class.
i added:
and
and replaced $info with $this->info in classSNMP.php and got:
if you need more info, please don't treat me like a programmer. just write what to add to what file with the complete syntax, thanks. |
Did you update the |
now that you mentioned it, i went ahead and did it..but that idn't chnage the output:
|
@majed17, what is the hostname? Just need the pattern, not the real name. Is it IPv4 or IPv6? The php-snmp won't work very well with IPv6. Well, it's broken. Not enough time in my days to fix that (in php). |
Last thing, is |
the host name is ipv4, (lucky you), and it's called Bo__ov 1__1 |
Okay, so no special characters like |
Package php-snmp-8.0.18-1.fc35.x86_64 is already installed. |
You updated |
the __ are substitute for letters or numbers..and this is happening to all the hosts |
I have to check the PHP documentation, but running out of time. Work starts in a few minutes. |
https://github.com/Cacti/cacti/tree/1.2.x/lib snmp.php has been updated 2 months ago, so what to be updated or from where? |
@netniV made a change yesterday. Pretty sure. Maybe he made that change locally. Anyway, just for giggles there is this line at the beginning of the file: Comment out all except the |
Oh, and he made changes to |
Yea, that dog won't hunt with php-snmp. Are you on net-snmp 5.8+? |
If so, just uninstall php-snmp and restart apache. |
Package net-snmp-1:5.9.1-7.fc35.x86_64 is already installed. yum remove php-snmp will also remove cacti, spine and net-snmp, among lots others |
use |
did the rpm -e --nodeps php-snmp and restarted apache..
|
Okay, this is fixed now, but to use snmpv3 you will have to always run with php-snmp uninstalled until we can get php-snmp updated for modern settings. I'll have to check the PHP group to see if they have incorporated them yet. |
now i get:
|
after removing host name:
|
Hostname should have been |
here it is with ->info
|
I don't see info there, have you stripped that out? |
|
full output:
|
Did update the |
You aren't logging info, just accessing it |
i restarted httpd anf php-fpm, the error persists but now i get:
|
my mistake, today is a holiday and so the host is down.. i tried another host and it is working! |
Okay, marking this closed. We will continue to tell users to uninstall |
thanks for constantly improving cacti, sadly your country banned us, almost totally, from contributing financially. |
Yea, that's some real BS. I'm not a big fan of waring around. Governments like to have control. The people just want to live their lives in peace, but the ruling class have to divide and profit on others suffering. I was once asked which country bombed more countries since the end of WWII. I was surprised to see the US had bombed more than 40 far outstripping the next country. That was my red pill moment. The US has major blood on its hands in Iraq too. Too much detail for here. Be well. |
this started happening in 1.2.18, i recall reading that it is a bug, so i waited for 1.2.20 but it is still present..
php 8.0.17
i'm on Fedora 35
The text was updated successfully, but these errors were encountered: