Host SNMP error

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: Host SNMP error

Post by mrscary »

last major errors in my log is this and it does it A LOT
ERROR PHP WARNING: A non-numeric value encountered in file: C:\inetpub\wwwroot\cacti\lib\rrd.php on line: 937
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Host SNMP error

Post by netniV »

Yeah, sounds like PHP had screwed up its part of the installation somehow, but at least you got it sorted.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: Host SNMP error

Post by mrscary »

yeah except for this part ERROR PHP WARNING: A non-numeric value encountered in file: C:\inetpub\wwwroot\cacti\lib\rrd.php on line: 937
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Host SNMP error

Post by netniV »

Try adding these to your file:

Code: Select all

diff --git a/lib/rrd.php b/lib/rrd.php
index 2d8413367..518e15a34 100644
--- a/lib/rrd.php
+++ b/lib/rrd.php
@@ -933,6 +933,8 @@ function rrdtool_function_fetch($local_data_id, $start_time, $end_time, $resolut
                                                if ($show_unknown) {
                                                        $fetch_array['values'][$index][$timestamp] = 'U';
                                                }
+                                       } elseif (!is_numeric($number)) {
+                                               cacti_log('WARNING: Unexpected value "' . $number . '" is non-numeric', false, 'RRD');
                                        } else {
                                                $fetch_array['values'][$index][$timestamp] = $number + 0;
                                        }
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mrscary
Cacti User
Posts: 149
Joined: Tue Aug 26, 2014 2:58 pm

Re: Host SNMP error

Post by mrscary »

to which file exactly?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests