Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2P Graphs were not displayed #82

Closed
bcix opened this issue Oct 3, 2013 · 16 comments
Closed

P2P Graphs were not displayed #82

bcix opened this issue Oct 3, 2013 · 16 comments

Comments

@bcix
Copy link
Contributor

bcix commented Oct 3, 2013

As already discussed on the mailing list
( https://www.inex.ie/pipermail/ixpmanager/2013-September/000168.html )
there seems to be the need for some necessary changes to the existing p2p code
to render the graphs from the generated rrd files by $app/tools/runtime/sflow/sflow-to-rrd-handler.

@rowanthorpe
Copy link
Contributor

I don't know if it is exactly related, but I had a hell of a time getting p2p graphs to display a while ago, but succeeded in the end. Obviously I didn't get the peering matrix working though because as @nickhilliard has mentioned, some vital code for that isn't even released yet (for me it just displays every square as red, but at least without errors). For the p2p graphs though, I remember the biggest forehead-slap moment (possible documentation-bug?) was when I realised I also needed to copy tools/www/sflow-graph.php into a web-viewable location and to match it with what is set in the DB under ixp.mrtg_p2p_path (and I spent many painful hours diagnosing that the controller of another web-framework - running on the server for frontend site stuff - was aliasing its URL away behind the scenes too - big gotcha there...). I also had to tweak the hard-coded locations in that file based on my installation, as is done in this part of my auto-installer. Hopefully that helps?

@bcix
Copy link
Contributor Author

bcix commented Oct 4, 2013

Hm, mysql> UPDATE ixpSETmrtg_p2p_path = '/var/www/ixp/public/sflow-graph.php '; and a cp tools/www/sflow-graph.php public/ seems not to help. Any tips on debugging this?

@barryo
Copy link
Member

barryo commented Oct 4, 2013

On 04/10/13 13:34, bcix wrote:

Hm, |mysql> UPDATE ixp SET mrtg_p2p_path =
'/var/www/ixp/public/sflow-graph.php ';| and a |cp
tools/www/sflow-graph.php public/| seems not to help. Any tips on
debugging this?

Disclaimer: I wasn't following this thread - but the above needs to be
served - i.e. http://localhost/ixp/public/sflow-graph.php

Also, you may have missed the instruction about not putting IXP Manager
in /var/www and that only public/ should be accessible on the web server...

  • Barry

@rowanthorpe
Copy link
Contributor

I found I couldn't get it working with a direct filesystem location - it had to be a web-accessible URL for me. For example now I have:

mrtg_path => /var/lib/mrtg
mrtg_p2p_path => https://[domain]/sflow/sflow-graph.php
smokeping => https://[domain]/smokeping/smokeping.cgi

While tracing things I noticed one time that at least one controller uses the sflow-graph.php as a backend, feeding it parameters and expecting PNGs as output. BTW: I found that to get this to work I had to change srcvli to srcvid and dstvli to dstvid at one place too. You can see it at this point in my autoinstaller. I'm not yet sure those are "exactly correct patches" or "ugly kludges", so haven't made a pull request for them yet... @barryo or @nickhilliard should I push that fix, or is it a case of "sort of works in my case but is actually ... wrong"? (from what little I know on the subject a VID is only a subset of a VLI, isn't it?).

@rowanthorpe
Copy link
Contributor

:-) wow, Barry and my comments were about 0.5 seconds apart...

@nickhilliard
Copy link
Member

Hm, mysql> UPDATE ixp SET mrtg_p2p_path = '/var/www/ixp/public/sflow-graph.php '; and a cp tools/www/sflow-graph.php public/ seems not to help. Any tips on debugging this?

There's a small amount of code missing for this.

At the moment, sflow-graph.php and the rest of the sflow data collection system indexes data on the ''vlaninterface'' field (which is correct), but the GUI statistics controller indexes the sflow data on the ''virtualinterface'' field (which is legacy). We need to commit some code in the GUI statistics controller to use ''vlaninterface'' field. Without this code, the sflow stuff will collect the data but will not display it correctly. I'll talk to Barry about bumping this up on his priority list because he does that end of things.

@rowanthorpe
Copy link
Contributor

Hmm, so now I'm confused - how did I get my graphs displaying if the code isn't even there yet? Maybe I short-circuited something with the {src,dst}{vli,vid} hack...

@barryo
Copy link
Member

barryo commented Oct 4, 2013

On 04/10/13 13:57, Nick Hilliard wrote:

We need to commit some code in the GUI statistics controller to use
''vlaninterface'' field.

Translation, I need to:

bump this up on [my] priority list

Duly noted :D

@nickhilliard
Copy link
Member

@rowanthorpe:

I'm not yet sure those are "exactly correct patches" or "ugly kludges", so haven't made a pull request for them yet... @barryo or @nickhilliard should I push that fix, or is it a case of "sort of works in my case but is actually ... wrong"?

categorically wrong, sorry. This would break stuff really badly.

@nickhilliard
Copy link
Member

@barryo

Duly noted :D

yeah, have been trying to drop massive hints about this recently, but looks like the megaphone diplomacy approach has finally worked :-D

@rowanthorpe
Copy link
Contributor

@nickhilliard OK, good to know (but at least it generates the pretty pictures even if they are completely wrong - that has to count for something) ...just kidding...
:-D

@barryo
Copy link
Member

barryo commented Oct 4, 2013

@bcix - you wrote:

UPDATE ixp SET mrtg_p2p_path = '/var/www/ixp/public/sflow-graph.php '; 

Just FYI - there is no need to edit the database directly. To edit this in the UI:

  1. Select Infrastructures from the menu on the left;
  2. See the link in the highlighted area under the list of infrastructures.

@bcix
Copy link
Contributor Author

bcix commented Oct 4, 2013

@barryo : /var/www/ is not the document root for my web server its /var/www/ixp/public/ so it's secure. Thanks for the advice!

@ALL: So I've to wait for the "small amount of code missing for this", correct ?

@barryo
Copy link
Member

barryo commented Oct 12, 2013

These fixes / updates are now committed as of v3.5.4.

Sorry this took so long. My first pass on this (some time ago now), was rushed and hacky. Trying to update the existing code for the new backend API was just compounding that original mess so I wanted to take the time to rewrite it properly.

@barryo barryo closed this as completed Oct 12, 2013
@bcix
Copy link
Contributor Author

bcix commented Oct 12, 2013

Hey, just updated to v3.5.4 but graphs are still not displayed. Is still the hack necessary to copy and edit tools/www/sflow-graph.php and set the URL in the DB?

@barryo
Copy link
Member

barryo commented Oct 14, 2013

Not sure what hack you're referring to? But there should be no hack required.

Best bet is to take this to the mailing list now, with a full summary of your set-up, settings and what isn't working exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants