Path to rrd's
I have two instances of netmrg running in lets say
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 have setup $prefix correctly etc. Is there a convenient way to debug this and where to do it ?
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.
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 ?
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.
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 ?
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.
Still shows nothing.
shows no graph at all
shows a monitor graph from the other installation (A)
Sorry; try it without any quotes, like this
still just shows the graph from installation A.
No debug is shown.
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.
try the get_graph.php URL with the &debug=1 instead of enclose_graph.php