Details
-
Bug
-
Resolution: Not A Bug
-
Major
-
None
-
None
-
None
Description
Graph generation not working after svn update to 23.6.12860 (r12863) from ~r12651
Error reported:
syntax error, unexpected token "<<" in /opt/observium/html/includes/graphs/graph.inc.php:199
#0: (unknown function) called at [/opt/observium/html/includes/graphs/graph.inc.php:199]
194: $return = rrdtool_graph($graphfile, $rrd_options);
195: //print_vars($GLOBALS['exec_status']);
196:
197: unlink($graphfile);
198:
199: <<<<<<< .mine
200: if (isset($config['graph_types'][$type][$subtype]['long']) && empty($graph_return['descr']))
201: {
202: $graph_return['descr'] = $config['graph_types'][$type][$subtype]['long'];
{{203: }}}
204: } else {
{{}}
{}
Attachments
Issue Links
- mentions
-
OBS-4531 PHP Parse error: syntax error, unexpected '=' in /opt/observium/includes/observium.inc.php on line 427
-
- Resolved
-
Activity
Hey Mike,
i reverted html/includes/graphs/graph.inc.php and mibs/fortinet/FORTINET-FORTIGATE-MIB, as they were listed as a conflict. This seems to have resolved the issue with the graphs. I assume a collegue of mine ran svn update and just promted with keep. Haven't used svn beofre, thanks for the support.
Output of: svn status
? check-errors-test.php
? html/info.php
? html/output
M mibs/apc/PowerNet-MIB
? mibs/bachmann/PTOPO-MIB
M mibs/cisco/CISCO-ENTITY-VENDORTYPE-OID-MIB
M mibs/cisco/CISCO-LWAPP-AP-MIB
M mibs/cisco/CISCO-LWAPP-DOT11-CLIENT-MIB
M mibs/cisco/CISCO-LWAPP-MOBILITY-EXT-MIB
M mibs/cisco/CISCO-LWAPP-REAP-MIB
M mibs/cisco/CISCO-LWAPP-ROGUE-MIB
M mibs/cisco/CISCO-LWAPP-WLAN-POLICY-MIB
M mibs/cisco/CISCO-LWAPP-WLAN-SECURITY-MIB
M mibs/cisco/CISCO-PRODUCTS-MIB
M mibs/cisco/CISCO-RTTMON-MIB
M mibs/cisco/CISCO-RTTMON-TC-MIB
M mibs/cisco/OLD-CISCO-CHASSIS-MIB
M mibs/ciscosb/CISCOSB-AAA
M mibs/ciscosb/CISCOSB-COPY-MIB
M mibs/ciscosb/CISCOSB-DHCPCL-MIB
M mibs/ciscosb/CISCOSB-DHCPv6-CLIENT
M mibs/ciscosb/CISCOSB-EMBWEB-MIB
M mibs/ciscosb/CISCOSB-FINDIT
M mibs/ciscosb/CISCOSB-LLDP-MIB
M mibs/ciscosb/CISCOSB-Physicaldescription-MIB
M mibs/ciscosb/CISCOSB-RMON
M mibs/ciscosb/CISCOSB-SSH-MIB
M mibs/ciscosb/CISCOSB-STACK-MIB
M mibs/ciscosb/CISCOSB-TRAPS-MIB
M mibs/ciscosb/CISCOSB-Tuning
M mibs/ciscosb/CISCOSB-rlBrgMcMngr-MIB
M mibs/f5/LOAD-BAL-SYSTEM-MIB
M mibs/juniper/JUNIPER-CHASSIS-DEFINES-MIB
M mibs/juniper/JUNIPER-COS-MIB
M mibs/juniper/JUNIPER-IF-MIB
M mibs/juniper/JUNIPER-IFOPTICS-MIB
M mibs/juniper/JUNIPER-IPSEC-FLOW-MON-MIB
M mibs/juniper/JUNIPER-JDHCPV6-MIB
M mibs/juniper/JUNIPER-JS-NAT-MIB
M mibs/juniper/JUNIPER-JS-SMI
M mibs/juniper/JUNIPER-LDP-MIB
M mibs/juniper/JUNIPER-MIB
M mibs/juniper/JUNIPER-NAT-MIB
M mibs/juniper/JUNIPER-PING-MIB
M mibs/juniper/JUNIPER-SMI
M mibs/juniper/JUNIPER-SRX5000-SPU-MONITORING-MIB
M mibs/juniper/JUNIPER-TIMING-NOTFNS-MIB
M mibs/juniper/JUNIPER-USER-AAA-MIB
M mibs/nokia/TIMETRA-SAS-PORT-MIB
M mibs/nokia/TIMETRA-SAS-QOS-MIB
M mibs/nokia/TIMETRA-SAS-SERV-MIB
M mibs/nokia/TIMETRA-SAS-SYSTEM-MIB
M mibs/nokia/TIMETRA-SAS-VRTR-MIB
M mibs/nokia/TN-BFD-MIB
M mibs/nokia/TN-CLEAR-MIB
M mibs/nokia/TN-CONN-PROF-MIB
M mibs/nokia/TN-DOT3-OAM-MIB
M mibs/nokia/TN-ETH-RING-MIB
M mibs/nokia/TN-FILTER-MIB
M mibs/nokia/TN-IEEE8021-CFM-MIB
M mibs/nokia/TN-IGMP-SNOOPING-MIB
M mibs/nokia/TN-LAG-MIB
M mibs/nokia/TN-LLDP-MIB
M mibs/nokia/TN-LOG-MIB
M mibs/nokia/TN-MC-REDUNDANCY-MIB
M mibs/nokia/TN-MIRROR-MIB
M mibs/nokia/TN-MPLS-MIB
M mibs/nokia/TN-MPLS-TP-MIB
M mibs/nokia/TN-OAM-TEST-MIB
M mibs/nokia/TN-PACKETSWITCH-MIB
M mibs/nokia/TN-PMON-MIB
M mibs/nokia/TN-PORT-MIB
M mibs/nokia/TN-QOS-MIB
M mibs/nokia/TN-RMD-CFM-MIB
M mibs/nokia/TN-RMD-EFM-MIB
M mibs/nokia/TN-RMD-IF-MIB
M mibs/nokia/TN-RMD-SYSTEM-MIB
M mibs/nokia/TN-RMD-TC-MIB
M mibs/nokia/TN-RMD-TSOP-MIB
M mibs/nokia/TN-SAP-MIB
M mibs/nokia/TN-SAS-IEEE8021-CFM-MIB
M mibs/nokia/TN-SAS-IEEE8021-PAE-MIB
M mibs/nokia/TN-SAS-MIRROR-MIB
M mibs/nokia/TN-SAS-OAM-TEST-MIB
M mibs/nokia/TN-SAS-PORT-MIB
M mibs/nokia/TN-SAS-QOS-MIB
M mibs/nokia/TN-SAS-SDP-MIB
M mibs/nokia/TN-SAS-SERV-MIB
M mibs/nokia/TN-SDP-MIB
M mibs/nokia/TN-SERV-MIB
M mibs/nokia/TN-TC-MIB
M mibs/nokia/TN-VRTR-MIB
M mibs/nokia/TROPIC-1830PSD-CAPABILITY-MIB
M mibs/nokia/TROPIC-1830VWM-CAPABILITY-MIB
M mibs/nokia/TROPIC-ABSNODE-MIB
M mibs/nokia/TROPIC-ABSNODE-NOTIFICATION-MIB
M mibs/nokia/TROPIC-ACCESSPORT-MIB
M mibs/nokia/TROPIC-ALARMPANEL-MIB
M mibs/nokia/TROPIC-AMPLIFIER-MIB
M mibs/nokia/TROPIC-ASON-MIB
M mibs/nokia/TROPIC-BREAKER-MIB
M mibs/nokia/TROPIC-CARD-MIB
M mibs/nokia/TROPIC-CONTROLCARD-MIB
M mibs/nokia/TROPIC-DIAGNOSTIC-MIB
M mibs/nokia/TROPIC-EXPROPTICALCARD
M mibs/nokia/TROPIC-EXPRSCALARS
M mibs/nokia/TROPIC-FAN-MIB
M mibs/nokia/TROPIC-GENERIC-LOG-MIB
M mibs/nokia/TROPIC-GENERIC-NOTIFICATION-MIB
M mibs/nokia/TROPIC-GLOBAL-REG
M mibs/nokia/TROPIC-GMPLS-CPIF-MIB
M mibs/nokia/TROPIC-GMPLS-DPIF-MIB
M mibs/nokia/TROPIC-GMPLS-LSP-MIB
M mibs/nokia/TROPIC-GMPLS-NE-MIB
M mibs/nokia/TROPIC-GMPLS-NOTIFICATION-MIB
M mibs/nokia/TROPIC-IEEE8023br-MIB
M mibs/nokia/TROPIC-L1SERVICE-MIB
M mibs/nokia/TROPIC-LOG-MIB
M mibs/nokia/TROPIC-NOTIFICATION-MIB
M mibs/nokia/TROPIC-OCH-MIB
M mibs/nokia/TROPIC-OPTICALCARD-MIB
M mibs/nokia/TROPIC-OPTICALPORT-MIB
M mibs/nokia/TROPIC-OSPF-MIB
M mibs/nokia/TROPIC-OTH-MIB
M mibs/nokia/TROPIC-OTUODU-MIB
M mibs/nokia/TROPIC-PHMNOTIFICATION-MIB
M mibs/nokia/TROPIC-POWERMGMT-MIB
M mibs/nokia/TROPIC-PSD-MIB
M mibs/nokia/TROPIC-PTP-MIB
M mibs/nokia/TROPIC-ROE-MIB
M mibs/nokia/TROPIC-SHELF-MIB
M mibs/nokia/TROPIC-SLOT-MIB
M mibs/nokia/TROPIC-SOFTWARE-MIB
M mibs/nokia/TROPIC-STATISTICS-MIB
M mibs/nokia/TROPIC-SYNCE-MIB
M mibs/nokia/TROPIC-SYSTEM-MIB
M mibs/nokia/TROPIC-TC
M mibs/nokia/TROPIC-USERMGMT-MIB
M mibs/nokia/TROPIC-VTSCONN-MIB
M mibs/nokia/TROPIC-VWMMS-MIB
M mibs/nokia/TROPIC-WAVEKEY-MIB
M mibs/rfc/BGP4V2-MIB
M mibs/rfc/BGP4V2-TC-MIB
M mibs/rfc/POWER-ETHERNET-MIB
? mibs/rubytech/PRIVATETECH-GEL2ESW10G-FUNCTION-MIB
? mibs/rubytech/PRIVATETECH-GEL2ESW26K-FUNCTION-MIB
? mibs/rubytech/PRIVATETECH-GEPoEL2ESW12-FUNCTION-MIB
? mibs/rubytech/RUBYTECH-FGS2528KX-FUNCTION-MIB
M mibs/synology/SYNOLOGY-DISK-MIB
M mibs/synology/SYNOLOGY-EBOX-MIB
M mibs/synology/SYNOLOGY-FLASHCACHE-MIB
M mibs/synology/SYNOLOGY-GPUINFO-MIB
M mibs/synology/SYNOLOGY-ISCSILUN-MIB
M mibs/synology/SYNOLOGY-RAID-MIB
M mibs/synology/SYNOLOGY-SERVICES-MIB
M mibs/synology/SYNOLOGY-SHA-MIB
M mibs/synology/SYNOLOGY-SMART-MIB
M mibs/synology/SYNOLOGY-SPACEIO-MIB
M mibs/synology/SYNOLOGY-STORAGEIO-MIB
M mibs/synology/SYNOLOGY-SYSTEM-MIB
M mibs/synology/SYNOLOGY-UPS-MIB
? php_errors.log
? rrdcached
This happened because you was have local changes in this file.
reset this file to svn version:
svn revert /opt/observium/html/includes/graphs/graph.inc.php
|
check other files status:
svn status /opt/observium
|
P.S. Do not use community edition files for svn (pro edition)!
Replacing the file with a "fresh" file via wget "observium-community-latest" leads to a follow up error. Possibly a svn merge issue?
PHP Version is PHP Version => 8.1.2-1ubuntu2.11
PRETTY_NAME="Ubuntu 22.04.2 LTS"
General questions and device support can be discussed in our Discord channel, click here to join.
Please make and attach additional information about the device:
- full snmp dump from device:
snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -Ih -ObentxU <hostname> .1 > myagent.snmpwalk
snmpwalk -v2c -c <community> -t 3 -Cc --hexOutputLength=0 -Ih -ObentxU <hostname> .1.3.6.1.4.1 >> myagent.snmpwalk
If device not support SNMP version 2c, replace -v2c with -v1.
- If you have problems with discovery or poller processes, please do and attach these debugs:
./discovery.php -d -h <device>
./poller.php -d -h <device>
- additionally attach device and/or vendor specific MIB files
This comment is added automatically.
I realize this is closed, but for anyone that comes looking I wanted to document the issue I had and what needed to be done.
I updated to 23.6.12860 and lost graph generation. Checking the logs resulted in no errors. After much troubleshooting I realized the issue was with the poller-wrapper.php script.
After updating observium, while running the ./discovery.php -u script I received the following:
PHP Parse error: syntax error, unexpected '=' in /opt/observium/includes/observium.inc.php on line 427
Digging into that error led me to
OBS-4531. Which led me to this mailing list announcement: https://lists.observium.org/hyperkitty/list/observium@lists.observium.org/thread/G2JDYY5TZLSQRCERTKYXORK64XBYMGTC/From there I set forth on updating our PHP 7.1 --> 8.1. That went pretty smoothly; however, after running ./discovery.php -u again I saw another notice about my MariaDB instance. I have v5.5 and Observium was recommending >= 10.3. Since I was already performing maintenance on this server, I went ahead with getting the recommended MariaDB.
This is where this issue comes into play. After updating MariaDB I noticed that I was not getting any graphs. I checked all my logs, and saw no errors. After much troubleshooting, I manually ran ./poller-wrapper.php 8 to be greeted with the following:
ERROR: missing python module: MySQLdb
On Ubuntu: apt-get install python-mysqldb
On RHEL/CentOS: yum install MySQL-python
On FreeBSD: cd /usr/ports/*/py-MySQLdb && make install clean
I installed MySQL-python and observium was happily generating graphs again.
Now that I had a fix, I wanted to know why this happened...
As it turns out, when updating MariaDB from 5.5 --> >= 10.3 I uninstalled the existing MariaDB instance:
yum remove mariadb mariadb-libs
Mariadb and mariadb-libs do not have MySQL-python marked as a dependency. But, MySQL-python has mariadb-libs marked as a dependency. By removing the previous installation of mariadb-libs, MySQL-python was also removed.
I am certain that while removing mariadb and mariadb-libs that I was informed about the removal of MySQL-python. This was entirely an oversight on my part.
The frustrating part though, for me, was that the ./poller.php script ran without issue. It took a long time before I got back around to the ./poller-wrapper.php
script for troubleshooting.
TLDR:
If you are using CentOS, and along with updating Observium you also updated MariaDB. AND as part of the MariaDB update you uninstalled the previous version. Verify that you have MySQL-python installed as it is required by the ./poller-wrapper.php script.