lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

Path to rrd's

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
Ciaran Bryan
Helper


Joined: 02 Apr 2004
Posts: 17

PostPosted: Wed Jun 02, 2004 3:40 pm    Post subject: Path to rrd's Reply with quote

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

PostPosted: Thu Jun 03, 2004 2:23 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 10:21 am    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 1:04 pm    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 1:10 pm    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 1:17 pm    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 1:23 pm    Post subject: Reply with quote

HI,

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

or

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

Still shows nothing.
Back to top
Ciaran Bryan
Helper


Joined: 02 Apr 2004
Posts: 17

PostPosted: Thu Jun 03, 2004 1:25 pm    Post subject: Reply with quote

also,

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


shows no graph at all

and

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

shows a monitor graph from the other installation (A)
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Thu Jun 03, 2004 2:13 pm    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 2:18 pm    Post subject: Reply with quote

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

PostPosted: Thu Jun 03, 2004 2:28 pm    Post subject: Reply with quote

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

PostPosted: Fri Jun 04, 2004 9:55 pm    Post subject: Reply with quote

try the get_graph.php URL with the &debug=1 instead of enclose_graph.php
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group