Grafana: Internal Server Error
Grafana: Internal Server Error
Hello,
I followed the guide listed in this KB article https://support.nagios.com/kb/article/n ... a-805.html and everything was going well until I tried to create a dashboard + graph. It lets me select the host and service but when I select the label, the graph displays a red corner exclamation mark with the popup text "Internal Server Error". I can access the pnp4nagios page directly without issues.
Query inspector returns the following message:
PNP4Nagios Version 0.6.26
Please check the documentation for information about the following error.
Trying to get property of non-object
file [line]:
application/controllers/api.php [239]:
back
Actions
pnp4nagios-0.6.26 [ 08-21-2017 ]
" message:"Internal Server Error
I followed the guide listed in this KB article https://support.nagios.com/kb/article/n ... a-805.html and everything was going well until I tried to create a dashboard + graph. It lets me select the host and service but when I select the label, the graph displays a red corner exclamation mark with the popup text "Internal Server Error". I can access the pnp4nagios page directly without issues.
Query inspector returns the following message:
PNP4Nagios Version 0.6.26
Please check the documentation for information about the following error.
Trying to get property of non-object
file [line]:
application/controllers/api.php [239]:
back
Actions
pnp4nagios-0.6.26 [ 08-21-2017 ]
" message:"Internal Server Error
Re: Grafana: Internal Server Error
Can you post the following information?
Apache pnp4nagios.conf file
Apache error log
And the output of ls -lh /usr/local/pnp4nagios/share/application/controllers/
Apache pnp4nagios.conf file
Apache error log
And the output of ls -lh /usr/local/pnp4nagios/share/application/controllers/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Grafana: Internal Server Error
File: pnp4nagios.conf
Apache error log (sanitized):
Apache was restarted and I tried working with grafana after the restart. No errors were logged in the apache log.
Output of ls -lh /usr/local/pnp4nagios/share/application/controllers/
I tried changing ownership of api.php to nagios and changing permissions to 655 but no changes.
The query inspector in grafana looks like this when it fails:
Thanks for your help mbellerue!
Code: Select all
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
Alias /pnp4nagios "/usr/local/pnp4nagios/share"
<Directory "/usr/local/pnp4nagios/share">
AllowOverride None
Order allow,deny
#Allow from all
Allow from 127.0.0.1 ::1
#
# Use the same value as defined in nagios.conf
#
AuthName "Nagios Access"
#AuthType Basic
#AuthUserFile /usr/local/nagios/etc/htpasswd.users
#Require valid-user
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
Options symLinksIfOwnerMatch
# Installation directory
RewriteBase /pnp4nagios/
# Protect application and system files from being viewed
RewriteRule "^(?:application|modules|system)/" - [F]
# Allow any files or directories that exist to be displayed directly
RewriteCond "%{REQUEST_FILENAME}" !-f
RewriteCond "%{REQUEST_FILENAME}" !-d
# Rewrite all other URLs to index.php/URL
RewriteRule "^.*$" "index.php/$0" [PT]
</IfModule>
</Directory>Apache was restarted and I tried working with grafana after the restart. No errors were logged in the apache log.
Code: Select all
[Tue Oct 22 07:01:15 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:15 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:15 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:16 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:17 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:17 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:17 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:18 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:18 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:18 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:20 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 07:01:20 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 07:01:20 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 07:01:20 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:20 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:20 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:21 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=CM10-radio&service=Radio+Voltage&dest=auto
[Tue Oct 22 07:01:21 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:21 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=CM10-radio&service=Radio+Voltage&dest=auto
[Tue Oct 22 07:01:21 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:21 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:21 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:22 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:22 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:22 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:23 2019] [error] [client ::1] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue Oct 22 07:01:23 2019] [error] [client ::1] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
[Tue Oct 22 07:01:23 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:23 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:23 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:24 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:24 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:24 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:26 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=CM10-radio&service=Radio+Voltage&dest=auto
[Tue Oct 22 07:01:26 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=servicedetail&host=CM10-radio&service=Radio+Voltage&dest=auto
[Tue Oct 22 07:01:27 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:27 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:27 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:28 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:28 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:29 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:29 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:29 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:29 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:30 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:30 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:30 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:31 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:31 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:31 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/index.php?
[Tue Oct 22 07:01:32 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:32 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:32 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:34 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:34 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:34 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:34 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:35 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:35 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:35 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 07:01:35 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 07:01:35 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 07:01:37 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:37 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:37 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:38 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:38 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:38 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:39 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:39 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 07:01:39 2019] [error] [client {GATEWAY IP}] PHP Warning: mysql_pconnect(): Too many connections in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=VNDA-CiscoRtr-Pri
[Tue Oct 22 11:11:37 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined offset: 1000 in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 252, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 11:11:37 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined offset: 1000 in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 252, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 11:12:02 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined offset: 1000 in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 252, referer: http://{SERVER IP}/nagiosxi/includes/components/opscreen/opscreen.php
[Tue Oct 22 11:12:21 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined offset: 1000 in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 252, referer: http://{SERVER IP}/nagiosxi/
[Tue Oct 22 11:12:33 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined offset: 1000 in /usr/local/nagiosxi/html/includes/components/helpsystem/helpsystem.inc.php on line 252, referer: http://{SERVER IP}/nagiosxi/includes/components/opscreen/opscreen.php
[Tue Oct 22 11:12:39 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined variable: service in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2817, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=CM06-radio&service=Radio+RSSI&dest=auto
[Tue Oct 22 11:12:39 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined variable: service in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2817, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=CM06-radio&service=Radio+RSSI&dest=auto
[Tue Oct 22 11:12:39 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined variable: service in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2817, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=CM06-radio&service=Radio+RSSI&dest=auto
[Tue Oct 22 11:12:40 2019] [error] [client {GATEWAY IP}] PHP Notice: Undefined variable: service in /usr/local/nagiosxi/html/includes/components/xicore/status-object-detail.inc.php on line 2817, referer: http://{SERVER IP}/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=CM06-radio&service=Radio+RSSI&dest=auto
[Tue Oct 22 12:00:01 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:08 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:11 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:17 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:21 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:26 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:29 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:32 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:36 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:44 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:45 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:47 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:00:48 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/robots.txt
[Tue Oct 22 12:21:42 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/favicon.ico
[Tue Oct 22 15:44:23 2019] [error] [client {GATEWAY IP}] File does not exist: /var/www/html/favicon.ico
[Tue Oct 22 16:34:05 2019] [notice] caught SIGTERM, shutting down
[Tue Oct 22 16:34:05 2019] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 22 16:34:05 2019] [notice] Digest: generating secret for digest authentication ...
[Tue Oct 22 16:34:05 2019] [notice] Digest: done
[Tue Oct 22 16:34:05 2019] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operation
I tried changing ownership of api.php to nagios and changing permissions to 655 but no changes.
Code: Select all
total 100
-rw-r--r-- 1 nagios nagios 5497 Oct 18 14:43 ajax.php
-rw-r--r-- 1 root root 11418 Oct 18 14:47 api.php
-rw-r--r-- 1 nagios nagios 661 Oct 18 14:43 color.php
-rw-r--r-- 1 nagios nagios 2491 Oct 18 14:43 debug.php
-rw-r--r-- 1 nagios nagios 3117 Oct 18 14:43 docs.php
-rw-r--r-- 1 nagios nagios 7083 Oct 18 14:43 graph.php
-rw-r--r-- 1 nagios nagios 2332 Oct 18 14:43 image.php
-rw-r--r-- 1 nagios nagios 3074 Oct 18 14:43 json.php
-rw-r--r-- 1 nagios nagios 3119 Oct 18 14:43 mobile.php
-rw-r--r-- 1 nagios nagios 3827 Oct 18 14:43 page.php
-rw-r--r-- 1 nagios nagios 11529 Oct 18 14:43 pdf.php
-rw-r--r-- 1 nagios nagios 1289 Oct 18 14:43 popup.php
-rw-r--r-- 1 nagios nagios 2594 Oct 18 14:43 special.php
-rw-r--r-- 1 nagios nagios 384 Oct 18 14:43 start.php
-rw-r--r-- 1 nagios nagios 7927 Oct 18 14:43 system.php
-rw-r--r-- 1 nagios nagios 1624 Oct 18 14:43 xml.php
-rw-r--r-- 1 nagios nagios 2780 Oct 18 14:43 xport.php
-rw-r--r-- 1 nagios nagios 2968 Oct 18 14:43 zoom.php
Code: Select all
{
"xhrStatus": "complete",
"request": {
"method": "POST",
"url": "api/datasources/proxy/3/index.php/api/metrics",
"data": {
"requestId": "Q105",
"timezone": "",
"panelId": 2,
"dashboardId": null,
"range": {
"from": "2019-10-22T10:47:37.224Z",
"to": "2019-10-22T16:47:37.225Z",
"raw": {
"from": "now-6h",
"to": "now"
}
},
"interval": "20s",
"intervalMs": 20000,
"targets": [
{
"host": "ABK01-dig",
"service": "Intrusion Alarm I0",
"perflabel": "I0",
"type": "AVERAGE",
"fill": "fill",
"factor": "",
"refId": "A"
}
],
"maxDataPoints": 960,
"scopedVars": {
"__interval": {
"text": "20s",
"value": "20s"
},
"__interval_ms": {
"text": "20000",
"value": 20000
}
},
"startTime": 1571762857227,
"rangeRaw": {
"from": "now-6h",
"to": "now"
},
"start": "1571741257",
"end": "1571762857"
}
},
"response": {
"error": "Internal Server Error",
"response": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n \n<meta http-equiv=\"refresh\" content=\"60\">\n<title>Runtime Message</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/pnp4nagios/media/css/common.css\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/pnp4nagios/media/css/ui-smoothness/jquery-ui.css\" />\n<link rel=\"icon\" type=\"image/ico\" href=\"/pnp4nagios/media/images/favicon.ico\" />\n<script type=\"text/javascript\" src=\"/pnp4nagios/media/js/jquery-min.js\"></script>\n<script type=\"text/javascript\" src=\"/pnp4nagios/media/js/jquery-ui.min.js\"></script>\n<style type=\"text/css\">\n</style>\n</head>\n<body>\n<div class=\"pagebody\">\n<table class=\"body\">\n<tr valign=\"top\"><td>\n<div class=\"left ui-widget\">\n<div class=\"p2 ui-widget-header ui-corner-top\">\nPNP4Nagios Version 0.6.26</div>\n<div class=\"p4 ui-widget-content ui-corner-bottom\" style=\"width: 640px\">\n<div style=\"padding: 0pt 0.7em;\" class=\"ui-state-error ui-corner-all\">\n\n<h3>Please check the documentation for information about the following error.</h3>\n<p>Trying to get property of non-object</p>\n<h3>file [line]:</h3>\n<p><tt>application/controllers/api.php <strong>[239]:</strong></tt></p>\n<p>\n<a href=\"javascript:history.back()\">back</a>\n\n</div>\n</div>\n</td><td>\n<div class=\"right\">\n\n<div class=\"ui-widget\">\n\n<div class=\"p2 ui-widget-header ui-corner-top\">\nActions</div>\n\n<div class=\"p4 ui-widget-content ui-corner-bottom\" >\n<a title=\"back\" href=\"javascript:history.back()\"><img class=\"icon\" src=\"/pnp4nagios/media/images/back.png\"></a>\n<a title=\"View Graphs\" href=\"/pnp4nagios/graph\"><img class=\"icon\" src=\"/pnp4nagios/media/images/home.png\"></a>\n<a title=\"View Documentation\" href=\"/pnp4nagios/docs\"><img class=\"icon\" src=\"/pnp4nagios/media/images/docs.png\"></a>\n</div>\n\n</div>\n\n</div>\n</td></tr>\n<tr valign=\"top\"><td colspan=\"2\">\n<div class=\"left\">\n<div class=\"cb p4 ui-widget-content ui-corner-all\">\npnp4nagios-0.6.26 [ 08-21-2017 ]</div>\n</div>\n</div>\n</td></tr></table>\n</div>\n\n</body>\n</html>\n",
"message": "Internal Server Error"
}
}Re: Grafana: Internal Server Error
In your pnp4nagios.conf file, let's remove these lines,
Then run,
Code: Select all
<IfModule mod_rewrite.c>
</IfModule>Code: Select all
apachectl configtestAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Grafana: Internal Server Error
Did as you suggested and still no change. The error of Internal Server Error persists.
Also, rebooted server and still the same.
Also, rebooted server and still the same.
Re: Grafana: Internal Server Error
Okay, let's go ahead and re-add the two IfModule lines back to pnp4nagios.conf
Then you can run this to restart Apache.
Let's also change ownership of that api.php file. It should be okay the way that it is, but I don't like that it's owned by root:root when everything else is nagios:nagios.
Code: Select all
<IfModule mod_rewrite.c>
</IfModule>Code: Select all
systemctl restart httpdCode: Select all
chown /usr/local/pnp4nagios/share/application/controllers/api.php nagios:nagiosAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Grafana: Internal Server Error
Done. No change in behaviour.
Is there a way I can replicate the Grafana query from the browser window directly into pnp4nagios to see what that returns?
Is there a way I can replicate the Grafana query from the browser window directly into pnp4nagios to see what that returns?
Re: Grafana: Internal Server Error
I'm not sure of a way to get the query from Grafana.
One thing we should definitely do is fix your MySQL errors.
And increase max_connections.
https://support.nagios.com/kb/article/n ... s-513.html
It could be that Grafana or PNP4Nagios is trying to grab data, and either running into a max connections issue, or corrupted data issue.
We can also enable Grafana logging. Edit /etc/grafana/grafana.ini and uncomment,
logs = /var/log/grafana
Then restart grafana with service grafana-server restart. Then access the page where you're getting the internal server errors, and see if anything gets logged in /var/log/grafana.
One thing we should definitely do is fix your MySQL errors.
Code: Select all
mysqlcheck -f -r -u root -pnagiosxi --all-databases --use-frmhttps://support.nagios.com/kb/article/n ... s-513.html
It could be that Grafana or PNP4Nagios is trying to grab data, and either running into a max connections issue, or corrupted data issue.
We can also enable Grafana logging. Edit /etc/grafana/grafana.ini and uncomment,
logs = /var/log/grafana
Then restart grafana with service grafana-server restart. Then access the page where you're getting the internal server errors, and see if anything gets logged in /var/log/grafana.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Grafana: Internal Server Error
I executed the mysqlcheck command and it completed successfully.
Checked the number of connections and the max allowed was still at 151 but the max used reported 152 for some reason so I went through the process and increased the number to 1000. I have not setup the monitoring service yet but I will be doing that today.
Enabled grafana logging and restarted the server. The only error message that appears when the internal error happens is below.
I am not sure how to interpret that. I will keep looking for anything else that may provide any clues.
Checked the number of connections and the max allowed was still at 151 but the max used reported 152 for some reason so I went through the process and increased the number to 1000. I have not setup the monitoring service yet but I will be doing that today.
Enabled grafana logging and restarted the server. The only error message that appears when the internal error happens is below.
Code: Select all
t=2019-11-05T20:55:55+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=POST path=/api/datasources/proxy/5/index.php/api/metrics status=500 remote_addr=[::1] time_ms=108 size=2158 referer="http://localhost:3000/dashboard/new?tab=queries&panelId=2&edit&fullscreen&orgId=1"Re: Grafana: Internal Server Error
I wonder if that's a bug in Grafana.
The message is logged as an error, but whatever the operation is it completed. I've seen a couple of different pieces of software over the years that had issues like this.
Code: Select all
lvl=eror msg="Request Completed"As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!