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

Blank graph with mtr and fping #136

Open
penguin02007 opened this issue Sep 24, 2021 · 5 comments
Open

Blank graph with mtr and fping #136

penguin02007 opened this issue Sep 24, 2021 · 5 comments
Labels

Comments

@penguin02007
Copy link

I am trying to setup a dashboard with both mtr and fping probes but I am seeing blank graphs. Looks like graphsrv is not rendering it correctly. (Having this example would be great.)

Any thoughts?

2021-09-24 09:56:49,295 - vaping.plugins.fping_mtr - DEBUG: popen traceroute -n -w1 -q1 5.11.175.212
vaping.plugins.fping_mtr popen traceroute -n -w1 -q1 35.211.175.212 __init__.py:128
 * Serving Flask app 'vaping' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
werkzeug  * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment. _internal.py:225
werkzeug  * Running on http://10.85.147.204:8080/ (Press CTRL+C to quit) _internal.py:225
root b' 1  10.142.128.86  31.449 ms\n' fping_mtr.py:43
root b' 2  10.142.128.1  24.804 ms\n' fping_mtr.py:43
root b' 3  10.69.128.128  30.841 ms\n' fping_mtr.py:43
root b' 4  10.69.129.118  31.518 ms\n' fping_mtr.py:43

probes:
  - name: latency
    type: std_fping
    output:
      - vodka
    groups:
      - name: public_dns
        hosts:
          - host: 8.8.8.8
            name: Google
            color: red
          - host: 4.2.2.1
            name: Level(3)
            color: blue
          - host: 208.67.222.222
            name: OpenDNS
            color: orange
      - name: gcp
        hosts:
          - host: 5.11.175.212
            name: github
            color: yellow

  - name: mtr
    type: fping_mtr
    default_graph: mtr
    group: mtr.gcp
    host: 35.211.175.212
    name: github
    output:
      - vodka

plugins:
  - name: std_fping
    type: fping
    count: 10
    interval: 3s
    period: 100
    output:
      - vodka

  - name: fping_mtr
    type: fping_mtr
    interval: 3s
  - name: vodka
    type: vodka
    data:
      # We have to add a new data type to handle mtr data
      - type: fping_mtr
        handlers:
          - type: index
            index: host
          - type: store
            container: list
            limit: 100

  - name: vodka
    type: vodka
    data:
      - type: fping
        handlers:
          - type: index
            index: host
          - type: store
            container: list
            limit: 500

    apps:
      graphsrv:
        enabled: true
        graphs:
          multitarget:
            id_field: host
            type: multitarget
            plot_y: avg
            format_y: ms

          smokestack:
            id_field: host
            type: smokestack
            plot_y: avg

          mtr:
            id_field: host
            type: mtr

    plugins:

      - name: http
        type: flask
        bind: 0.0.0.0:8080
        debug: true
        static_url_path: /static
        server: self
        async: thread
        routes:
          /targets : graphsrv->targets
          /graph_data :
            methods:
              - POST
              - GET
            target: graphsrv->graph_data
          /graph : graphsrv->graph_view
          /overview_read_file : graphsrv->overview_read_file
          /: graphsrv->overview_view



logging:
  version: 1
  formatters:
    simple:
      format: '%(asctime)s - %(name)s - %(levelname)s: %(message)s'
  handlers:
    console:
      class: logging.StreamHandler
      level: DEBUG
      formatter: simple
      stream: ext://sys.stdout

    #file:
    #  class: logging.FileHandler
    #  level: DEBUG
    #  formatter: simple
    #  filename: /home/dev/sandbox/vaping/vaping.log

  loggers:
    vaping:
      level: DEBUG
      handlers:
        - console
        #- file
    vodka:
      level: DEBUG
      handlers:
        - console
        #- file

@vegu
Copy link
Contributor

vegu commented Oct 5, 2021

Does this issue occur if you take the mtr graph out of the setup?

If you open the javascript console in your browser does it log any errors?

At first glance i don't see anything obviously wrong with your config.

@CTV-2023
Copy link

CTV-2023 commented Oct 6, 2021

Just in case this helps. I was using version 1.3 previously when I tested both mtr and fping graphs. That worked.
I updated today on 1.43, I have the issue too with mtr graphs.
On my browser console :

graphsrv.mtr.js:136 Uncaught TypeError: Cannot read properties of undefined (reading 'bandwidth')
at mtr.render_data (graphsrv.mtr.js:136)
at mtr.render_dynamic (graphsrv.js:1356)
at mtr. (graphsrv.js:869)
at dispatch (jquery.js?v=2.1.0:4)
at r.handle (jquery.js?v=2.1.0:4)

If I create a config.yaml file with mtr only, mtr graphs is displayed
I still have errors in my console

Uncaught TypeError: Cannot read properties of undefined (reading 'get_recent')
at $gs.formatters.mtr_x (graphsrv.mtr.js:4)
at graphsrv.js:608
at mtr. (graphsrv.js:1230)
at SVGTextElement. (d3.v5.min.js:2)
at ut.each (d3.v5.min.js:2)
at ut.text (d3.v5.min.js:2)
at e (d3.v5.min.js:2)
at ut.call (d3.v5.min.js:2)
at mtr.render_axes (graphsrv.js:1403)
at mtr.render_dynamic (graphsrv.js:1359)

@vegu
Copy link
Contributor

vegu commented Oct 13, 2021

Thanks @CTV-ByImmo - will look into this as soon as i can, sounds like 1.43 could have broken something there.

@vegu vegu added the bug label Oct 13, 2021
@penguin02007
Copy link
Author

Sorry I missed the notification.

Does this issue occur if you take the mtr graph out of the setup?

No it doesn't.

If you open the javascript console in your browser does it log any errors?

Yes. See below. I can re-procedure this error on two different computer.

Failed to load resource: the server responded with a status of 404 (NOT FOUND)
graphsrv.js:1465 Uncaught TypeError: this.d3.data.selectAll(...).data(...).enter is not a function
    at multitarget.render_data (graphsrv.js:1465)
    at multitarget.render_dynamic (graphsrv.js:1356)
    at multitarget.<anonymous> (graphsrv.js:869)
    at dispatch (jquery.js?v=2.1.0:4)
    at r.handle (jquery.js?v=2.1.0:4)
DevTools failed to load source map: Could not load content for chrome-extension://cjdnfmjmdligcpfcekfmenlhiopehjkd/node_modules/axios/dist/axios.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load source map: Could not load content for chrome-extension://cjdnfmjmdligcpfcekfmenlhiopehjkd/node_modules/moment/min/moment.min.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load source map: Could not load content for http://127.0.0.1:8080/static/graphsrv/js/bootstrap.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:8080/static/graphsrv/js/popper.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:8080/static/graphsrv/js/bootstrap.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://127.0.0.1:8080/static/graphsrv/media/bootstrap.min.css/bootstrap.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
4graphsrv.js:1465 Uncaught TypeError: this.d3.data.selectAll(...).data(...).enter is not a function
    at multitarget.render_data (graphsrv.js:1465)
    at multitarget.render_dynamic (graphsrv.js:1356)
    at multitarget.<anonymous> (graphsrv.js:869)
    at dispatch (jquery.js?v=2.1.0:4)
    ```

@vegu
Copy link
Contributor

vegu commented Nov 8, 2021

@penguin02007

Testing with your config file i ran into several issues

One was #135 - which is now fixed on master and will go out with the next release.

The other was that this section in your config trips up vaping because of the duplicate name definition, after pulling the #135 fix and removing the second name definition the overview rendered for me. Still a bunch of js errors going into the console, but that looks like a separate issue.

  - name: mtr
    type: fping_mtr
    default_graph: mtr
    group: mtr.gcp
    host: 35.211.175.212
    name: github # this line causes issue
    output:
      - vodka

Note: if you change the name to github you will also need to change the group to github.gcp

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

No branches or pull requests

3 participants