cannot add graph in weathermap was working fine
Moderators: Developers, Moderators
cannot add graph in weathermap was working fine
Hi Howie,
The savior... need help.. all of the sudden I can't add map .. and getting following error:
/var/log/httpd/error_log
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php
Weathermap version 0.98
PHP Version 5.3.3
PHP OS Linux
Cacti Version 0.8.8h
Cacti OS unix
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.3.x
I had all graphs working don't want to recreate them again.. not sure what happened that caused above error.
The savior... need help.. all of the sudden I can't add map .. and getting following error:
/var/log/httpd/error_log
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php
Weathermap version 0.98
PHP Version 5.3.3
PHP OS Linux
Cacti Version 0.8.8h
Cacti OS unix
SNMP Version NET-SNMP version: 5.5
RRDTool Version RRDTool 1.3.x
I had all graphs working don't want to recreate them again.. not sure what happened that caused above error.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: cannot add graph in weathermap was working fine
It thinks the file doesn't exist (or at least it couldn't open it).
What are the permissions for the file? Is it readable by the web server user?
What are the permissions for the file? Is it readable by the web server user?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: cannot add graph in weathermap was working fine
Code should be checking for a false, but a false does normally mean that either the path is invalid or you have no access to that resource.
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
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: cannot add graph in weathermap was working fine
Yep - the error checking could definitely be better (I thought it used is_readable() in the calling function actually), and so could the error message, but the cause seems to be either permissions (or possibly selinux).
If it's just for this one map, most likely permissions.
If it's just for this one map, most likely permissions.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: cannot add graph in weathermap was working fine
Thanks guys for response...
I have cacti cacti owning there directory
with chmod 777 ( i know it's not preferred) but that's the only way i can get my cacti to work...
Also I have added apache user to cacti group...
uid=48(apache) gid=48(apache) groups=48(apache),1000(cacti)
so that i don't need to change ownership...
It was working fine.. and current maps are update and working fine.. it's just when I try to add that's where it run into the issue...
I have cacti cacti owning there directory
with chmod 777 ( i know it's not preferred) but that's the only way i can get my cacti to work...
Also I have added apache user to cacti group...
uid=48(apache) gid=48(apache) groups=48(apache),1000(cacti)
so that i don't need to change ownership...
It was working fine.. and current maps are update and working fine.. it's just when I try to add that's where it run into the issue...
Re: cannot add graph in weathermap was working fine
JUst to clarify... when I click or ADD that's where I get hour glass it doesn't take me to list of maps at all...
and when I do tail -f error.log it crazy filling logs that eventually cacti died ..
then I need to remove error.log and restart httpd service to bring service back on...
Please check attached file...
and when I do tail -f error.log it crazy filling logs that eventually cacti died ..
then I need to remove error.log and restart httpd service to bring service back on...
Please check attached file...
Howie wrote:Yep - the error checking could definitely be better (I thought it used is_readable() in the calling function actually), and so could the error message, but the cause seems to be either permissions (or possibly selinux).
If it's just for this one map, most likely permissions.
- Attachments
-
- weathermap-add-map-issue-log-file.png (266.86 KiB) Viewed 4236 times
-
- weathermap-add-map-issue-screenshoot.png (99.33 KiB) Viewed 4236 times
Re: cannot add graph in weathermap was working fine
Issue resolved...
Thanks Guys...
I found ownership were changed for files in /configs folder... Not sure the reason...
I am running into another issue with weathermap ,, when other user (other than admin) access weathermap they can see map without any issue,,, but when they mouse over to see graph it doesn't load...
what I am missing now,,
THanks.
Thanks Guys...
I found ownership were changed for files in /configs folder... Not sure the reason...
I am running into another issue with weathermap ,, when other user (other than admin) access weathermap they can see map without any issue,,, but when they mouse over to see graph it doesn't load...
what I am missing now,,
THanks.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: cannot add graph in weathermap was working fine
They need to have permission in Cacti to see the graphs too. Do they?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: cannot add graph in weathermap was working fine
Are you saying you have a 300MB error log of just this message over and over?
Code: Select all
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: cannot add graph in weathermap was working fine
Also, it seems like you have found a bug if non-admin users can see the maps in the list above, since they are all accessible by admin only!
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: cannot add graph in weathermap was working fine
Unless he was the admin?
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
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: cannot add graph in weathermap was working fine
That got resolve after I fixed owndership on file under /configs .
Howie wrote:Are you saying you have a 300MB error log of just this message over and over?
Code: Select all
[error] [client XXX.XXX.XXX.XXX] PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/cacti/plugins/weathermap/weathermap-cacti-plugin-mgmt.php on line 861, referer: http://XXX.XXX.XXX.XXX/cacti/plugins/we ... n-mgmt.php
Re: cannot add graph in weathermap was working fine
Hi Howie,,,
I have allowed user to view map..
they can see map.. but mouse over to see graph doesn't load..
Not sure what I am missing,, Please check attached file
I have allowed user to view map..
they can see map.. but mouse over to see graph doesn't load..
Not sure what I am missing,, Please check attached file
- Attachments
-
- Weathermap-forotheruser-load.png (537.42 KiB) Viewed 4219 times
-
- Weathermap-forotheruser-permission.png (10.07 KiB) Viewed 4219 times
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: cannot add graph in weathermap was working fine
Does the user have permission in Cacti to view those graphs?
That is, if they clicked on the Graphs tab, can they see the same graphs?
All weathermap does is put an <IMG> tag in a box, with the Cacti graph URL in it.
That is, if they clicked on the Graphs tab, can they see the same graphs?
All weathermap does is put an <IMG> tag in a box, with the Cacti graph URL in it.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Re: cannot add graph in weathermap was working fine
Thanks Howie you the man,,
I deleted and recreate user.. and issue got fixed.. I made sure that user has graph access...
I have one graph that is 187% and I am getting following in my logs also warning sign on that map:
WEATHERMAP: Poller[0] WARNING: [Map 10] DMVPN110.conf: NewColourFromPercent: Clipped 182.798538264% to 100% for item DMVPN110-rrr3-4 [WMWARN33]
I have right bandwidth but would I need to add color for 101 - 999KEYPOS DEFAULT 1 1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 102 102 102
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0
SCALE DEFAULT 101 999 240 255 192
I did that but still same warning and logs
I deleted and recreate user.. and issue got fixed.. I made sure that user has graph access...
I have one graph that is 187% and I am getting following in my logs also warning sign on that map:
WEATHERMAP: Poller[0] WARNING: [Map 10] DMVPN110.conf: NewColourFromPercent: Clipped 182.798538264% to 100% for item DMVPN110-rrr3-4 [WMWARN33]
I have right bandwidth but would I need to add color for 101 - 999KEYPOS DEFAULT 1 1 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0 0 192 192 192
SCALE DEFAULT 0 1 102 102 102
SCALE DEFAULT 1 10 140 0 255
SCALE DEFAULT 10 25 32 32 255
SCALE DEFAULT 25 40 0 192 255
SCALE DEFAULT 40 55 0 240 0
SCALE DEFAULT 55 70 240 240 0
SCALE DEFAULT 70 85 255 192 0
SCALE DEFAULT 85 100 255 0 0
SCALE DEFAULT 101 999 240 255 192
I did that but still same warning and logs
Who is online
Users browsing this forum: No registered users and 4 guests