|
|
| Author |
Message |
todd.seidenberg
Joined: 17 Jun 2008 Posts: 9
|
Posted: Tue Jun 17, 2008 9:06 am Post subject: /var/www/html/graph_image.php' not found or unable to stat, |
|
|
Folks,
I'm sure this is a simple issue, but I'm not sure where to look, so I'm asking for some help.
I've got Cacti running nicely. I've got Nagios running nicely. I even have NPC running nicely. However, when I try to click on a graph from within NPC, I get the following error in my /var/log/httpd/error.log:
| Code: | | /var/www/html/graph_image.php' not found or unable to stat |
Now, I know that the graph_image.php file is in the cacti directory - and I have a /var/www/html/cacti/graph_image.php file in place. But for some reason, my NPC setup is looking for everything in /var/www/html, instead of /var/www/html/cacti.
Any thoughts on this? What setting to I need to change to make NPC look in the correct directory?
- Thanks,
Todd |
|
| Back to top |
|
 |
Linegod Developer
Joined: 20 Feb 2003 Posts: 502 Location: Canada
|
Posted: Tue Jun 17, 2008 10:34 am Post subject: |
|
|
By the looks of it, it has hard coded '/graph_image.php' in quite a few files. Changing that should solve your problem:
js/src/monitoring/services/serviceDetail.js
js/src/monitoring/services/services.js
js/src/monitoring/hosts/hosts.js
js/src/monitoring/hosts/hostDetail.js
js/src/npc.js
js/npc-all-min.js
Long term fix would have to be done by the plugin developer.... |
|
| Back to top |
|
 |
todd.seidenberg
Joined: 17 Jun 2008 Posts: 9
|
Posted: Tue Jun 17, 2008 10:53 am Post subject: |
|
|
I went ahead, and changed the reference in all of those files from '/graph_image.php' to 'cacti/graph_image.php'
but I still get the following in my error log:
| Code: | script '/var/www/html/graph_image.php' not found or unable to stat, referer: http://skeeter/cacti/plugins/npc/npc.php?module=layoutDev&action=drawLayout
|
Is there somewhere else that I need to make the change?
| Linegod wrote: | By the looks of it, it has hard coded '/graph_image.php' in quite a few files. Changing that should solve your problem:
js/src/monitoring/services/serviceDetail.js
js/src/monitoring/services/services.js
js/src/monitoring/hosts/hosts.js
js/src/monitoring/hosts/hostDetail.js
js/src/npc.js
js/npc-all-min.js
Long term fix would have to be done by the plugin developer.... |
|
|
| Back to top |
|
 |
Linegod Developer
Joined: 20 Feb 2003 Posts: 502 Location: Canada
|
Posted: Tue Jun 17, 2008 11:15 am Post subject: |
|
|
| Not that I can see. Try grep'ing for 'graph_image' within the npc directory.... |
|
| Back to top |
|
 |
todd.seidenberg
Joined: 17 Jun 2008 Posts: 9
|
Posted: Tue Jun 17, 2008 11:47 am Post subject: |
|
|
Yeah...you're right. Those are the only places that the graph_image.php shows up. So what could be the problem?
I can see all of my graphs when i click on the graphs tab, but when I try and click on the little graphs button in my host listing from within NPC, I get the error.
weird. My cacti/include/global.php file has the following line:
$config['url_path'] = "/cacti/";
And that appears to work just fine for everything else. Could it be something outside of the NPC plugin?
| Linegod wrote: | | Not that I can see. Try grep'ing for 'graph_image' within the npc directory.... |
|
|
| Back to top |
|
 |
Linegod Developer
Joined: 20 Feb 2003 Posts: 502 Location: Canada
|
Posted: Tue Jun 17, 2008 12:34 pm Post subject: |
|
|
| IIRC, NPC does some caching, so clearing the cache/restarting the browser may be the trick... |
|
| Back to top |
|
 |
todd.seidenberg
Joined: 17 Jun 2008 Posts: 9
|
Posted: Tue Jun 17, 2008 12:37 pm Post subject: |
|
|
The weird thing is the changes I made had no affect on the results. Nothing I've done has made a difference.
Do the *.js files need to be re-read somehow? Is there a way to force that? or are they read in on the fly?
Or, again, is there somewhere else that I need to make a change?
- Todd
| todd.seidenberg wrote: | Yeah...you're right. Those are the only places that the graph_image.php shows up. So what could be the problem?
I can see all of my graphs when i click on the graphs tab, but when I try and click on the little graphs button in my host listing from within NPC, I get the error.
weird. My cacti/include/global.php file has the following line:
$config['url_path'] = "/cacti/";
And that appears to work just fine for everything else. Could it be something outside of the NPC plugin?
| Linegod wrote: | | Not that I can see. Try grep'ing for 'graph_image' within the npc directory.... |
|
|
|
| Back to top |
|
 |
Linegod Developer
Joined: 20 Feb 2003 Posts: 502 Location: Canada
|
Posted: Tue Jun 17, 2008 1:31 pm Post subject: |
|
|
| Linegod wrote: | | IIRC, NPC does some caching, so clearing the cache/restarting the browser may be the trick... |
Did you try this? (I noticed the reply times where close, so you may not have seen it...) |
|
| Back to top |
|
 |
todd.seidenberg
Joined: 17 Jun 2008 Posts: 9
|
Posted: Tue Jun 17, 2008 2:12 pm Post subject: |
|
|
Yep, I tried this. And yes, that was it. It now works.
So here's what I did.
In the files within the cacti/plugins/npc directory that have the graph_image.php reference, I changed it to say /cacti/graph_image.php......
Once I did that, and _cleared_ the cache, I was able to see the graphs connected to NPC without a problem.
- Thanks to everyone for your help.
Todd
| Linegod wrote: | | Linegod wrote: | | IIRC, NPC does some caching, so clearing the cache/restarting the browser may be the trick... |
Did you try this? (I noticed the reply times where close, so you may not have seen it...) | [/code] |
|
| Back to top |
|
 |
|