Path to rrd's

Ciaran Bryan

02-06-2004 11:40:29

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,

silfreed

02-06-2004 22:23:39

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

Ciaran Bryan

03-06-2004 06:21:26

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.

silfreed

03-06-2004 09:04:51

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

Ciaran Bryan

03-06-2004 09:10:18

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,

silfreed

03-06-2004 09:17:06

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

Ciaran Bryan

03-06-2004 09:23:55

HI,

http//10.224.179.919000/netmrg/enclose_graph.php?type=mon&id=3436'&debug=1'

or

http//10.224.179.919000/netmrg/enclose_graph.php?type=mon&id=3436"&debug=1"

Still shows nothing.

Ciaran Bryan

03-06-2004 09:25:43

also,

http//10.224.179.919000/netmrg/enclose_graph.php?type=mon&id=3436'&debug=1'


shows no graph at all

and

http//10.224.179.919000/netmrg/enclose_graph.php?type=mon&id=3436"&debug=1"

shows a monitor graph from the other installation (A)

silfreed

03-06-2004 10:13:57

Sorry; try it without any quotes, like this

[code162b4839f77]http://10.224.179.91:9000/netmrg/enclose_graph.php?type=mon&id=3436&debug=1 [/code162b4839f77]

Ciaran Bryan

03-06-2004 10:18:05

hi.

still just shows the graph from installation A.

No debug is shown.

silfreed

03-06-2004 10:28:16

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
[code135048fc571]grep -ri /opt/netmrg_B 'netmrg_A'[/code135048fc571] (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

balleman

04-06-2004 17:55:54

try the get_graph.php URL with the &debug=1 instead of enclose_graph.php