System Monitoring

Adding the signal graphs for your receivers is a little more involved i’m not sure i’ll be able to do it with sed but i’ll see what i can do.

The danger is that i get something wrong and you need to reinstall the portal :stuck_out_tongue:

Also i said “you could hack it” and that time kinda meant it that way.
You would need to change /etc/collectd/collectd.conf to add the lines marked with add (without the add)

<Plugin python>
        ModulePath "/home/pi/adsb-receiver/build/portal/graphs"                                                                        
        LogTraces true
        Import "dump1090"
        <Module dump1090>
                <Instance localhost>
                        URL "http://localhost/dump1090"
                </Instance>
add                <Instance receiver1>
add                  URL "http://192.158.2.11/dump1090"
add               </Instance>
        </Module>
</Plugin>

Then you should take a look at the shellscript making the graphs.
You will have to kinda understand that file to really make those changes.
To add one signal graph will be easiest, find this portion of code:

signal_graph() {
  rrdtool graph \                                                                                                                      
  "$1" \
  --start end-$4 \
  --width 480 \
  --height 186 \
  --step "$5" \
  --title "$3 Signal Level" \
  --vertical-label "dBFS" \
  --upper-limit 1    \
  --lower-limit -45 \
  --rigid \
  --units-exponent 0 \
  "TEXTALIGN:center" \
  "DEF:signal=$2/dump1090_dbfs-signal.rrd:value:AVERAGE" \
  "DEF:peak=$2/dump1090_dbfs-peak_signal.rrd:value:AVERAGE" \
  "DEF:noise=$2/dump1090_dbfs-noise.rrd:value:AVERAGE" \

You will have to replace $2 with /var/lib/collectd/rrd/localhost/dump1090-receiver1

Now to create a second signal graph you will have to create another signal graph function, make sure it is executed and make up additional filenames and also change the filenames in the display part.
You could probably just hollow out the cpu chart and put another signal chart in there.

Good luck and remember if you shoot down your system you’ll have to reinsall :slight_smile:

@dimdra You can’t use dump1090-mutability with newer versions of dump1090-fa

The data format has changed and is incompatible.

Which gui are you using? Just use the version it belongs with. Or is that version incapable of --net-only?

Thank you again for all the handholding. This is way beyond my capability :smiley: , I am a technical noob!

I have copied over the GUI from dump1090-fa 3.6.3 to dump1090-mutability 1.15 dev (and renamed the index.html file to gmap.html).

I unsuccessfully tried --net-only on dump1090-fa (actually from what I recall, the --net-only option is on piaware now which I did not need to use)

Just use dump1090-fa and make it work.

Can’t you select dump1090-fa in the adsb portal installation?

dump1090-fa has the net-only option so this should not be a problem.
Haven’t tried it though.

This will result in blank columns for Altitude and Speed. This is due to change in data format. If you use html folder of dump1090-fa ver 3.5.3, then this problem will not be there, Please see this post which shows how to do it:

The only negative with that solution is that you don’t get the extra info introduced with the current dump1090-fa version in case you want that info.

The dump1090-fa installation through the script forces the installation on piaware, which is not ideal. I like the new gui on 3.6.3 with the additional information and will be looking towards making it work with muta.I also noticed that most of the dump1090 related graphs have stopped updating- not sure if it was because of the GUI overlay. I have for the moment reverted to the muta GUI and will monitor if the graphs start populating again, though the time they stopped populating looks suspiciously close to the time when I executed

sed -i '/strong_sig/d' make-collectd-graphs.sh
sed -i '/y2strong/d' make-collectd-graphs.sh

Run the script manually and post if there are any errors please.

Then let it install piaware and just disable it afterwards.
systemctl disable piaware
Should not be a problem.

You can always restore the shell script with the git checkout command i gave somehwere above in case the changes screwed something up.

The scripts assume the webinterface is reachable via http://local-ip-address/dump1090

If you changed that somehow the graphs will stop updating.

The following commands will remove dump1090-mutability, and install dump1090-fa 3.6.3, and NO piaware:

#First purge dump1090-mutability
sudo dpkg --purge dump1090-mutability

sudo rm -rf /usr/share/dump1090-mutability

#Now install dump1090-fa ver 3.6.3
wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.6.3_all.deb 

sudo dpkg -i piaware-repository_3.6.3_all.deb

sudo apt-get update sudo apt-get install dump1090-fa

As you have already installed graphs, changing from dump1090-mutability to dump1090-fa will break the graphs.

The only practical option is a fresh install. Write Raspbian image to microSD card, then install dump1090-fa 3.6.3 by above method, then run J Prochazka’s script and install only Web Portal / Graphs.

Well you can also change where the graphs get their data.

So install dump1090 in the way described above and either make sure it’s served in /dump1090 or changed collectd.conf to reflect the changed address.

Just check if the webinterface is now found at /dump1090-fa
If it is run this:

sudo sed -i -e 's/"http:\/\/localhost\/dump1090"/"http:\/\/localhost\/dump1090-fa"/g' /etc/collectd/collectd.conf

This will make the graphs get their data again.

Infact as I reverted to the old GUI, I also reverted and re-ran the script. It ran without a problem but the updated nothing. I was expecting some graphs to disappear to take the page back to the “original state” and as that did not happen I rebooted and re-ran the script again. This time:

So while all files have been gone back to original state, something is still amiss. Maybe I should rebuild the portal from scratch.

@abcd567

The downside with this is that I can’t configure dump1090-fa anymore:

root@myradar:~/adsb-receiver# dpkg-reconfigure dump1090-fa
The user `dump1090' is already a member of `plugdev'.
Restarting lighttpd..
root@myradar:~/adsb-receiver#

I need to reconfigure it so that it runs in --net-only mode. I think the config for --net-only is now held in piaware config.

you used the wrong command for the script.

It needs 24h as an argument:
./make-collectd-graphs.sh 24h

Just edit /etc/default/dump1090-fa Not that hard :slight_smile:

add the --net-only somewhere in there where other options are.

Anyway is this image based on raspbian or a piaware image?

Thanks - You clearly see how basic my knowledge is :slight_smile:

I finally reinstalled muta and the portal. I did initially run the graphs script with the required parameter and the “new” graphs were still there. Mistakenly ran it without the parameter the 2nd time!After the reinstall i see the new graphs and some of the new graphs populated. I will rerun your tweaks above to see where I get to.

For dump1090-fa - I did a package install. Here is what now I intend to (re)do:

  1. Run the tweaks above to populate graphs that are showing up but without data
  2. Replace dump1090-mutability with dump1090-fa
  3. Run part 2 of the tweaks to rebuild graphs on dump1090-fa…

Thank you for your patience on this @wiedehopf @abcd567 and @obj

This is true ONLY IF you use Piaware image.

If you use Raspbian image, and install dump1090-fa by JP script, or the method I have posted above, then dump1090-fa configuration is NOT controlled by Piaware.

In case of package install by JP script or the method I posted above, the only parameter which Piaware (if installed) will over-ride in settings in files/etc/default/dump1090-fa and /usr/share/dump1090-fa/html/config.js is latitude and longitude. If Piaware is not installed, then latitude and longitude in dump1090-fa’s above noted config file will be valid and used.

The script now mandates installation of piaware too even for package installation. I have tried both ways: - having dump1090-fa installed before running the script and also running the script without having the dump-1090 installed. In both instances, the script insists that that installing piaware is mandatory.

No explicit way of configuring dump1090-fa is now available. I am now going to try the via way - install dump1090-fa with piaware and then disable piaware.

This is a DUMMY warning. Just ignore it

I have installed dump1090-fa by commands in my post above.

I had this BEFORE running JP’s script for Web Portal:

image

WHEN I STARTED JP’s SCRIPT:

I said <NO> to dump1090-fa

image

Wrong display showing Piaware will also be installed. I simply ignored it and pressed <YES>

image

After Web Portal Installatio: No Piaware installed

image