Grafana get no data

Discussion in 'Other technical not related to ADSBx Feeding' started by REACH363, Apr 26, 2020.

  1. REACH363

    REACH363 New Member

    Good day, gentlemen!

    I'm new this board, but a long time feeder to ADSBx, yesterday i have decided to use the newest ADSBx image!
    So far it works and i'm happy with it.
    The only problem is, Grafana get no data (feeder stats), system data from the Pi are ok!

    I'm a Linux N00b but i will do my best to describe the situation.
    I'm using an Pi3B+, when i have a look at the services with the command "top"...
    readsb
    adsbxfeeder
    json-status
    prometheus
    grafana-server
    dump1090exporter

    are running (i think that are all necessary services!?)

    Feed and MLAT to ADSBx are connected (i can see my feed and status, both are ok when)!

    In the Grafana settings, the data source is Prometheus... is this ok?

    When i use sudo "systemctl status grafana-server", i found some "default" commands in the config... not sure if this is right!?

    Grafana_status.jpg

    Help would be highly appreciated!
     
  2. MDA

    MDA Administrator Staff Member

    You should check//edit /etc/prometheus/prometheus.yml It should contain something like that:
    Code:
    global:
      scrape_interval: 15s
      evaluation_interval: 15s
    
    alerting:
      alertmanagers:
        - static_configs:
            - targets:
            # - alertmanager:9093
    
    rule_files:
    # - "first_rules.yml"
    # - "second_rules.yml"
    
    scrape_configs:
      - job_name: 'localhost'
        scrape_interval: 30s
        scrape_timeout: 15s
        static_configs:
          - targets: ['127.0.0.1:9100']
          - targets: ['127.0.0.1:9105']
     
  3. REACH363

    REACH363 New Member

    Thank you for your help!

    unfortunately i can't post my results, because the board told me, my content is "spam like" and i have no permision to post!
    So please have a look at the result files, i have attached, for the prometheus.yml and in the meanwhile i found some errors by dump1090exporter!
     

    Attached Files:

  4. MDA

    MDA Administrator Staff Member

    You are using adsbx image so .yml is default (you can increase scrape_timeout to 15s)
    dump1090exporter is looking for http://localhost:8080 (odd, port 8080 is used by dump1090-fa and image uses readsb - port 80).
    Please check if prometheus is running and has connection to targets (connect to IP_of_Pi:9090/targets)

    Edit:
    you started --debug with already running exporter, (address already in use errors), dont do it, just connect to IP_of_Pi:9105 to see Dump1090 metrics
     
  5. REACH363

    REACH363 New Member

    ok, i unterstand!
    So here are the results, looks good to me, so far!?

    Prometheus_status.jpg
     
  6. REACH363

    REACH363 New Member

    One addition..... i don't use dump1090-fa or mutability, i'm only using readsb like on the image!

    Here are the metrics of port 9105:

    Code:
    # HELP dump1090_messages_total Number of Mode-S messages processed since start up
    # TYPE dump1090_messages_total gauge
    # HELP dump1090_recent_aircraft_max_range Maximum range of recently observed aircraft
    # TYPE dump1090_recent_aircraft_max_range gauge
    # HELP dump1090_recent_aircraft_observed Number of aircraft recently observed
    # TYPE dump1090_recent_aircraft_observed gauge
    # HELP dump1090_recent_aircraft_with_multilateration Number of aircraft recently observed with multilateration
    # TYPE dump1090_recent_aircraft_with_multilateration gauge
    # HELP dump1090_recent_aircraft_with_position Number of aircraft recently observed with position
    # TYPE dump1090_recent_aircraft_with_position gauge
    # HELP dump1090_stats_cpr_airborne Number of airborne CPR messages received
    # TYPE dump1090_stats_cpr_airborne gauge
    # HELP dump1090_stats_cpr_filtered Number of CPR messages ignored
    # TYPE dump1090_stats_cpr_filtered gauge
    # HELP dump1090_stats_cpr_global_bad Global positions that were rejected
    # TYPE dump1090_stats_cpr_global_bad gauge
    # HELP dump1090_stats_cpr_global_ok Global positions successfully derived
    # TYPE dump1090_stats_cpr_global_ok gauge
    # HELP dump1090_stats_cpr_global_range Global positions rejected due to receiver max range check
    # TYPE dump1090_stats_cpr_global_range gauge
    # HELP dump1090_stats_cpr_global_skipped Global position attempts skipped due to missing data
    # TYPE dump1090_stats_cpr_global_skipped gauge
    # HELP dump1090_stats_cpr_global_speed Global positions rejected due to speed check
    # TYPE dump1090_stats_cpr_global_speed gauge
    # HELP dump1090_stats_cpr_local_aircraft_relative Local positions found relative to a previous aircraft position
    # TYPE dump1090_stats_cpr_local_aircraft_relative gauge
    # HELP dump1090_stats_cpr_local_ok Local (relative) positions successfully found
    # TYPE dump1090_stats_cpr_local_ok gauge
    # HELP dump1090_stats_cpr_local_range Local positions rejected due to receiver max range check
    # TYPE dump1090_stats_cpr_local_range gauge
    # HELP dump1090_stats_cpr_local_receiver_relative Local positions found relative to the receiver position
    # TYPE dump1090_stats_cpr_local_receiver_relative gauge
    # HELP dump1090_stats_cpr_local_skipped Local (relative) positions skipped due to missing data
    # TYPE dump1090_stats_cpr_local_skipped gauge
    # HELP dump1090_stats_cpr_local_speed Local positions rejected due to speed check
    # TYPE dump1090_stats_cpr_local_speed gauge
    # HELP dump1090_stats_cpr_surface Number of surface CPR messages received
    # TYPE dump1090_stats_cpr_surface gauge
    # HELP dump1090_stats_cpu_background_milliseconds Time spent in network I/O, processing and periodic tasks
    # TYPE dump1090_stats_cpu_background_milliseconds gauge
    # HELP dump1090_stats_cpu_demod_milliseconds Time spent demodulation and decoding data from SDR dongle
    # TYPE dump1090_stats_cpu_demod_milliseconds gauge
    # HELP dump1090_stats_cpu_reader_milliseconds Time spent reading sample data from SDR dongle
    # TYPE dump1090_stats_cpu_reader_milliseconds gauge
    # HELP dump1090_stats_local_accepted Number of valid Mode S messages accepted with N-bit errors corrected
    # TYPE dump1090_stats_local_accepted gauge
    # HELP dump1090_stats_local_bad Number of Mode S preambles that didn't result in a valid message
    # TYPE dump1090_stats_local_bad gauge
    # HELP dump1090_stats_local_modeac Number of Mode A/C preambles decoded
    # TYPE dump1090_stats_local_modeac gauge
    # HELP dump1090_stats_local_modes Number of Mode S preambles received
    # TYPE dump1090_stats_local_modes gauge
    # HELP dump1090_stats_local_noise_level_dbFS Noise level dbFS
    # TYPE dump1090_stats_local_noise_level_dbFS gauge
    # HELP dump1090_stats_local_peak_signal_strength_dbFS Peak signal strength dbFS
    # TYPE dump1090_stats_local_peak_signal_strength_dbFS gauge
    # HELP dump1090_stats_local_samples_dropped Number of samples dropped
    # TYPE dump1090_stats_local_samples_dropped gauge
    # HELP dump1090_stats_local_samples_processed Number of samples processed
    # TYPE dump1090_stats_local_samples_processed gauge
    # HELP dump1090_stats_local_signal_strength_dbFS Signal strength dbFS
    # TYPE dump1090_stats_local_signal_strength_dbFS gauge
    # HELP dump1090_stats_local_strong_signals Number of messages that had a signal power above -3dBFS
    # TYPE dump1090_stats_local_strong_signals gauge
    # HELP dump1090_stats_local_unknown_icao Number of Mode S preambles containing unrecognized ICAO
    # TYPE dump1090_stats_local_unknown_icao gauge
    # HELP dump1090_stats_messages_total Number of Mode-S messages processed
    # TYPE dump1090_stats_messages_total gauge
    # HELP dump1090_stats_remote_accepted Number of valid Mode S messages accepted with N-bit errors corrected
    # TYPE dump1090_stats_remote_accepted gauge
    # HELP dump1090_stats_remote_bad Number of Mode S preambles that didn't result in a valid message
    # TYPE dump1090_stats_remote_bad gauge
    # HELP dump1090_stats_remote_modeac Number of Mode A/C preambles decoded
    # TYPE dump1090_stats_remote_modeac gauge
    # HELP dump1090_stats_remote_modes Number of Mode S preambles received
    # TYPE dump1090_stats_remote_modes gauge
    # HELP dump1090_stats_remote_unknown_icao Number of Mode S preambles containing unrecognized ICAO
    # TYPE dump1090_stats_remote_unknown_icao gauge
    # HELP dump1090_stats_tracks_all Number of tracks created
    # TYPE dump1090_stats_tracks_all gauge
    # HELP dump1090_stats_tracks_single_message Number of tracks consisting of only a single message
    # TYPE dump1090_stats_tracks_single_message gauge
     
  7. MDA

    MDA Administrator Staff Member

    pgrep -a readsb
    Do you use 978?
     
  8. REACH363

    REACH363 New Member

    Good morning,

    Code:
    [email protected]:~ $ pgrep -a readsb
    479 /usr/bin/readsb --device-type rtlsdr --ppm 0 --max-range 360 --gain 37.2 --lat 48.133559 --lon 016.475773 --net --net-heartbeat 60 --net-ro-interval 0.5 --net-ri-port 30001 --net-ro-port 30002 --net-sbs-port 30003 --net-bi-port 30004,30104 --net-bo-port 30005 --json-location-accuracy 2 --write-json /run/readsb --quiet
    
    ....and negative on 978!
     
  9. MDA

    MDA Administrator Staff Member

    No data in metrics, should be:
    Code:
    # HELP dump1090_messages_total Number of Mode-S messages processed since start up
    # TYPE dump1090_messages_total gauge
    dump1090_messages_total{time_period="latest"} 8100884
    # HELP dump1090_recent_aircraft_max_range Maximum range of recently observed aircraft
    # TYPE dump1090_recent_aircraft_max_range gauge
    dump1090_recent_aircraft_max_range{time_period="latest"} 59368.8315888531
    # HELP dump1090_recent_aircraft_observed Number of aircraft recently observed
    # TYPE dump1090_recent_aircraft_observed gauge
    dump1090_recent_aircraft_observed{time_period="latest"} 3
    # HELP dump1090_recent_aircraft_with_multilateration Number of aircraft recently observed with multilateration
    # TYPE dump1090_recent_aircraft_with_multilateration gauge
    dump1090_recent_aircraft_with_multilateration{time_period="latest"} 0
    # HELP dump1090_recent_aircraft_with_position Number of aircraft recently observed with position
    # TYPE dump1090_recent_aircraft_with_position gauge
    dump1090_recent_aircraft_with_position{time_period="latest"} 1
    # HELP dump1090_stats_cpr_airborne Number of airborne CPR messages received
    # TYPE dump1090_stats_cpr_airborne gauge
    dump1090_stats_cpr_airborne{time_period="last1min"} 60
    # HELP dump1090_stats_cpr_filtered Number of CPR messages ignored
    # TYPE dump1090_stats_cpr_filtered gauge
    dump1090_stats_cpr_filtered{time_period="last1min"} 0
    I'm really curious what is wrong, can you check dump1090exporter parameters?
     
  10. MDA

    MDA Administrator Staff Member

    --lon 016.475773 looks suspicious, remove leading 0
     
  11. REACH363

    REACH363 New Member

    The leading 0 is now deleted from --lon and i did a reboot.

    Could you guide me in the right direction, please?
    I used pgrep -a dump1090exporter but this don't work.
     
  12. REACH363

    REACH363 New Member

    I think dump1090exporter don't run as a service, therfore i'cant use the commands like systemctl and pgrep, right?
     
  13. MDA

    MDA Administrator Staff Member

    use htop
     
  14. REACH363

    REACH363 New Member

    htop is great!

    1090ex_1.jpg 1090ex_2.jpg

    ... but i found a log.level=error in prometheus
    and a log.level=fatal prometheus-node-exporter!?
     
  15. MDA

    MDA Administrator Staff Member

  16. REACH363

    REACH363 New Member

    Hey MDA,
    thank you for your time and help, today i have decided to go for a new and clean install and write a backup image with my settings!
    So far, it works very well!
    There will be some reboots and one or two shutdowns, but i think after midnight i will be full operational to support ADSBx with a 100% feed and MLAT, as usual!

    Again.... thank you for your time!!!!