|
|
| Author |
Message |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Wed Jun 02, 2004 3:40 pm Post subject: Path to rrd's |
|
|
Hi,
I have two instances of netmrg running in lets say
/opt/netmrg_A
and
/opt/netmrg_B
I created netmrg_B from netmrg_A and changed path references etc in all files where necessary. Database for netmrg_B was also copied from netmrg_A so there were references in the monitors table here from instance A.
Problem is, the netmrg_B php still looks for old rrd's in the path for A
i.e. /opt/netmrg_A/var/lib/netmrg/rrd
I have setup $prefix correctly etc. Is there a convenient way to debug this and where to do it ?
Thanks, |
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Thu Jun 03, 2004 2:23 am Post subject: |
|
|
Look in the config.php file and make sure the prefix is set correctly there; it should have been done correctly by running './configure --prefix=/wherever', but if you copied the entire web dir, this could have gotten overwritten. What we're trying to make sure is that netmrg_b's config.php is pointing at netmrg_b's netmrg.xml file which has the path to the RRDs.
-Doug |
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Thu Jun 03, 2004 10:21 am Post subject: |
|
|
Hi,
Checked that already and its ok.
This is the thing. When i copied the DB to netmrg_B all the monitor ID's were copied etc so there are references to non-existing rrds. on the B installation if i create a new device and associated monitors then the new rrd's are created in the correct location i.e. under dir of netmer_B and display correctly as well. but if i try to open a monitor originally from A while in B then it does actially open the original.
Cant figure out where it is getting this path info from. Is there any path associated info in the mysql DB that needs to be updated or is it somthing to do with zero.rrd as B's copy of this is also taken from A ?
In graphing and processing.php libs i see that some of the commands are build up without referencing the $prefix dir. It seems to read mon_* from the / directory.
How do i debug this to show me the read path in all the php files ?
Thanks,
Ciaran. |
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Thu Jun 03, 2004 1:04 pm Post subject: |
|
|
Actually, the paths in lib/graphing.php concatenate the rrdroot path with the '/mon_*' to get the path where it reads the files.
You can see the command we issue to rrdtool to generate the graphs by opening one of the graph images in your browser (right click on the image, 'view image' or something similar - the url should include 'enclose_graph.php') and add an "&debug=1" to the end of the URL. The command that we issue to rrdtool will include the full paths to the rrds.
-Doug |
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Thu Jun 03, 2004 1:10 pm Post subject: |
|
|
hi,
When I add the debug to the URL the graph does not come back (just red X). This is actually what i am after. No debug is shown. have set debug to "true" in config.php. Am I missing anything else ?
Can you suggest an extra dubug line to add to enclose_graph.php that will help me see the command ?
thanks, |
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Thu Jun 03, 2004 1:17 pm Post subject: |
|
|
Actually, with debug=1 added to enclose_graph.php, you should get some text output to your browser window.
Can you copy/paste your url you're using to see that (from the 'enclose_graph.php?...' is good).
We don't have any other debug options other than those two. If you want to add more 'echo's to find where your problem is, you'll have to dig into the code.
-Doug |
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Thu Jun 03, 2004 2:13 pm Post subject: |
|
|
Sorry; try it without any quotes, like this:
| Code: |
| http://10.224.179.91:9000/netmrg/enclose_graph.php?type=mon&id=3436&debug=1 |
|
|
| Back to top |
|
 |
Ciaran Bryan Helper
Joined: 02 Apr 2004 Posts: 17
|
Posted: Thu Jun 03, 2004 2:18 pm Post subject: |
|
|
hi.
still just shows the graph from installation A.
No debug is shown. |
|
| Back to top |
|
 |
silfreed Site Admin
Joined: 19 Jan 2003 Posts: 394 Location: Shippensburg, PA, USA
|
Posted: Thu Jun 03, 2004 2:28 pm Post subject: |
|
|
Hmm; that *should* show some debug output, but anyway..
I'm pretty sure the only way this could happen is by the config.php file pointing at a netmrg.xml file that has the wrong path.
The only thing I could think of doing to help you find this is running a command like
| Code: |
| grep -ri /opt/netmrg_B 'netmrg_A' |
(with quotes this time ;)
This will look for the string 'netmrg_A' in all the files under /opt/netmrg_B, hopefully finding any paths you missed.
-Doug |
|
| Back to top |
|
 |
balleman Site Admin
Joined: 20 Jan 2003 Posts: 282
|
Posted: Fri Jun 04, 2004 9:55 pm Post subject: |
|
|
| try the get_graph.php URL with the &debug=1 instead of enclose_graph.php |
|
| Back to top |
|
 |
|