Fatal Error

crypted

03-02-2005 01:04:33

Fatal error Call to undefined function mysql_connect() in /usr/local/var/www/netmrg/lib/database.php on line 33

I just installed all of the stuff netmrg needed and then netmrg, I went through the installation procedure just as it said, and checked it twice to see that I didn't mess up anywhere.

Any ideas?
MYSQL is running

silfreed

03-02-2005 08:29:11

You need to have mysql support compiled into PHP or loaded as an extension. On Red Hat/Fedora boxes you need to install a 'php-mysql' package.
Let us know your platform and how you installed your PHP and we might be able to help you get the correct options compiled in.

-Doug

crypted

03-02-2005 14:39:37

Allright, now I have the stuff all setup, however, my graphs arent generating data and netmrg is crontabed and has ran thirty times. My LAN Traffic, Proccesses, etc...graphs aren't showing any data. They all look the same, and some have "nan" on them. Ideas?

silfreed

03-02-2005 14:46:58

Did you run netmrg-gatherer by hand as root before putting it in cron? If so, check the permissions of the *.rrd files (usually in /usr/local/var/lib/netmrg/rrd for source installs) and makes ure the 'netmrg user' can write to them (usually means they need to be owned by the netmrg user).

-Doug

crypted

03-02-2005 14:51:54

I checked the file ownership and they are ownded by the "netmrg" user.

[root@localhost root]# ls -la /usr/local/var/lib/netmrg/rrd/
total 996
drwxr-xr-x 2 netmrg netmrg 4096 Feb 3 1336 .
drwxr-xr-x 3 root root 4096 Feb 2 2337 ..
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_18.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_19.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_20.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_21.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_22.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_23.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_24.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_25.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_26.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_27.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_28.rrd
-rw-rw-r-- 1 netmrg netmrg 71580 Feb 3 1350 mon_29.rrd
-rw-r--r-- 1 netmrg root 71580 Feb 2 2337 zero.rrd
[root@localhost root]#

crypted

03-02-2005 15:11:15

Are there any modifications I need to do to my snmp.conf? I have SNMP setup as Community "public" which I found on Google as the name I ought to use. I'm just going through whatever may be the case. There are no errors from net-gatherer. Everythings coming out fine and quickly.


Also, from net-gathering
[root@localhost netmrg]# netmrg-gatherer -c1023 -l1023
NetMRG starting.
Locking Settings
Unlocking Settings
Creating Lockfile.
Locking Settings
Unlocking Settings
Initializing SNMP library.
Initializing RRDTOOL pipe.
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking MySQL
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Unlocking MySQL
Locking Settings
Unlocking Settings
Locking ActiveThreads
[ACTIVE] Last 0, Now 0
[Dev 0002] Starting device thread at 2005-02-03 142234.
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking MySQL
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
Unlocking MySQL
[Dev 0002] MySQL connection established.
[Dev 0002] Home Device / 127.0.0.1
[Dev 0002] Starting SNMP Session.
[Dev 0002] SNMPv1
[Dev 0002] Port 161; Timeout 1000000; Retries 3.
Locking SNMP
Unlocking SNMP
[Dev 0002] SNMP Query ('127.0.0.1', 'public', 'system.sysUpTime.0')
[Dev 0002] SNMP Uptime is 140024 (5186108 centiseconds)
[Dev 0002] SNMP Query ('127.0.0.1', 'public', 'interfaces.ifNumber.0')
[Dev 0002] Number of Interfaces is 0
[Dev 0002] [Sub 0005] Starting Subdevice.
[Dev 0002] [Sub 0005] [Mon 0024] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0024] SNMP Query ('127.0.0.1', 'public', '.1.3.6.1.2.1.25.1.6.0')
[Dev 0002] [Sub 0005] [Mon 0024] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0024] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_24.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0024] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0019] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0019] SNMP Query ('127.0.0.1', 'public', 'enterprises.ucdavis.systemStats.ssCpuRawUser.0')
[Dev 0002] [Sub 0005] [Mon 0019] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0019] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_19.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0019] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0018] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0018] SNMP Query ('127.0.0.1', 'public', 'enterprises.ucdavis.systemStats.ssCpuRawSystem.0')
[Dev 0002] [Sub 0005] [Mon 0018] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0018] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_18.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0018] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0020] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0020] SNMP Query ('127.0.0.1', 'public', 'enterprises.ucdavis.systemStats.ssCpuRawNice.0')
[Dev 0002] [Sub 0005] [Mon 0020] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0020] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_20.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0020] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0025] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0025] SNMP Query ('127.0.0.1', 'public', 'laLoad.1')
[Dev 0002] [Sub 0005] [Mon 0025] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0025] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_25.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0025] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0026] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0026] SNMP Query ('127.0.0.1', 'public', 'laLoad.2')
[Dev 0002] [Sub 0005] [Mon 0026] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0026] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_26.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0026] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0027] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0027] SNMP Query ('127.0.0.1', 'public', 'laLoad.3')
[Dev 0002] [Sub 0005] [Mon 0027] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0027] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_27.rrd N'
Locking RRD
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0027] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0028] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0028] SNMP Query ('127.0.0.1', 'public', 'memAvailSwap.0')
OK u0.00 s0.01 r0.00
OK u0.00 s0.01 r0.00
OK u0.00 s0.01 r0.00
OK u0.00 s0.01 r0.00
OK u0.00 s0.01 r0.00
OK u0.00 s0.01 r0.00
OK u0.00 s0.01 r0.00
[Dev 0002] [Sub 0005] [Mon 0028] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0028] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_28.rrd N'
Locking RRD
OK u0.00 s0.01 r0.01
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0028] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0029] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0029] SNMP Query ('127.0.0.1', 'public', 'memAvailReal.0')
[Dev 0002] [Sub 0005] [Mon 0029] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0029] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_29.rrd N'
Locking RRD
OK u0.00 s0.01 r0.01
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0029] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0023] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0023] SNMP Query ('127.0.0.1', 'public', 'tcp.tcpCurrEstab.0')
[Dev 0002] [Sub 0005] [Mon 0023] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0023] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_23.rrd N'
Locking RRD
OK u0.01 s0.01 r0.02
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0023] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0022] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0022] SNMP Query ('127.0.0.1', 'public', 'ifOutOctets.%ifIndex%')
[Dev 0002] [Sub 0005] [Mon 0022] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0022] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_22.rrd N'
Locking RRD
OK u0.01 s0.01 r0.19
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0022] Value is not numeric.
[Dev 0002] [Sub 0005] [Mon 0021] Starting Monitor.
[Dev 0002] [Sub 0005] [Mon 0021] SNMP Query ('127.0.0.1', 'public', 'ifInOctets.%ifIndex%')
[Dev 0002] [Sub 0005] [Mon 0021] Value U
Locking Settings
Unlocking Settings
Locking Settings
Unlocking Settings
[Dev 0002] [Sub 0005] [Mon 0021] RRD 'update /usr/local/var/lib/netmrg/rrd/mon_21.rrd N'
Locking RRD
OK u0.01 s0.01 r0.19
Unlocking RRD
[Dev 0002] [Sub 0005] [Mon 0021] Value is not numeric.
[Dev 0002] Cleaning up SNMP Session.
[Dev 0002] Trimming device event log.
Locking Settings
Unlocking Settings
[Dev 0002] Ending device thread at 2005-02-03 142235, after a duration of 1 seconds.
Locking ActiveThreads
Unlocking ActiveThreads
Unlocking ActiveThreads
Closed MySQL connection.
Runtime 1
Locking Settings
Unlocking Settings
Closed RRDTOOL pipe.
Cleaned up SNMP.
Locking Settings
Unlocking Settings
[root@localhost netmrg]#

crypted

05-02-2005 03:28:01

Can anyone help? (

balleman

05-02-2005 15:42:11

It does appear that you have an snmpd.conf issue. Look through this thread to see if anything helps http//lists.netmrg.net/viewtopic.php?p=130#130