FlightAware Discussions

Graphs for dump1090 -- my version with install script

image

If anyone is wondering about that zig-zag: On my RPi it’s from timelapse1090 :wink:

Hi everyone,

for my the graphs worked fine, until suddenly I only get outputs within the system graphs and the ADS-B Signal Level graph. I have no idea what happened…

I tried everything. I reinstalled everything. I restarted dump1090. Of course every package is updated. I am not sure if there is a problem in generating the graphs or if there is a problem in creating the stats…

Do you have any ideas how to fix that issue or where I should look for the problem?

Thx for your help!

Show the output of the following commands:

sudo journalctl --no-pager -u collectd | tail -n20
grep http /etc/collectd/collectd.conf
sudo /usr/share/graphs1090/graphs1090.sh 24h

sudo journalctl --no-pager -u collectd | tail -n20

Jul 15 02:57:30 raspberrypi collectd[13455]: File “/usr/share/graphs1090/dump1090.py”, line 460, in read_aircraft_978
collectd.warning(sys.exc_info()[0])
Jul 15 02:57:30 raspberrypi collectd[13455]: NameError: global name ‘sys’ is not defined
Jul 15 02:57:30 raspberrypi collectd[13455]: read-function of plugin python.dump1090.localhost' failed. Will suspend it for 3840.000 seconds. Jul 15 04:01:30 raspberrypi collectd[13455]: Unhandled python exception in read callback: NameError: global name 'sys' is not defined Jul 15 04:01:30 raspberrypi collectd[13455]: Traceback (most recent call last): Jul 15 04:01:30 raspberrypi collectd[13455]: File "/usr/share/graphs1090/dump1090.py", line 61, in handle_read read_aircraft_978(instance_name, host, url_978) Jul 15 04:01:30 raspberrypi collectd[13455]: File "/usr/share/graphs1090/dump1090.py", line 460, in read_aircraft_978 collectd.warning(sys.exc_info()[0]) Jul 15 04:01:30 raspberrypi collectd[13455]: NameError: global name 'sys' is not defined Jul 15 04:01:30 raspberrypi collectd[13455]: read-function of pluginpython.dump1090.localhost’ failed. Will suspend it for 7680.000 seconds.
Jul 15 06:09:30 raspberrypi collectd[13455]: Unhandled python exception in read callback: NameError: global name ‘sys’ is not defined
Jul 15 06:09:30 raspberrypi collectd[13455]: Traceback (most recent call last):
Jul 15 06:09:30 raspberrypi collectd[13455]: File “/usr/share/graphs1090/dump1090.py”, line 61, in handle_read
read_aircraft_978(instance_name, host, url_978)
Jul 15 06:09:30 raspberrypi collectd[13455]: File “/usr/share/graphs1090/dump1090.py”, line 460, in read_aircraft_978
collectd.warning(sys.exc_info()[0])
Jul 15 06:09:30 raspberrypi collectd[13455]: NameError: global name ‘sys’ is not defined
Jul 15 06:09:30 raspberrypi collectd[13455]: read-function of plugin `python.dump1090.localhost’ failed. Will suspend it for 15360.000 seconds.

grep http /etc/collectd/collectd.conf

'# statistics will be loaded from http://localhost/dump1090/data/stats.json #
URL “http://localhost/dump1090-fa
URL_978 “http://localhost/skyview978

sudo /usr/share/graphs1090/graphs1090.sh 24h

25133 (process ID) old priority 0, new priority 19
619x324
619x324
619x324
619x324
619x324
1258x330
619x324
619x324
1258x330
619x324
619x324
619x324
619x324
619x324
619x324

That’s my bad.
Not testing if my error paths are working properly :wink:

I’ve fixed the problem, do a reinstall and hopefully it will work!

After the reinstall i’d be curious about another output of:

sudo journalctl --no-pager -u collectd | tail -n20
grep PRETTY /etc/os-release

:smile: and I thought I’m just doing something wrong and I don’t realise what :smiley:

Okay, now the first couple of minutes look quite well. But there are still some errors in the jornalctl output:

sudo journalctl --no-pager -u collectd | tail -n20

Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-strong_signals.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-strong_signals.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-remote_accepted.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-remote_accepted.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-remote_accepted_0.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-remote_accepted_0.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-positions.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_messages-positions.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_tracks-all.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_tracks-all.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_tracks-single_message.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_tracks-single_message.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-background.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-background.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-demod.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-demod.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-reader.rrd) failed: /var/lib/collectd/rrd/localhost/dump1090-localhost/dump1090_cpu-reader.rrd: illegal attempt to update using time 1563179446 when last update time is 1563179446 (minimum one second step)
Jul 15 10:31:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:32:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:33:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:34:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:35:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:36:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:37:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:38:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:39:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:40:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>
Jul 15 10:41:22 raspberrypi collectd[3104]: <type ‘exceptions.ValueError’>

grep PRETTY /etc/os-release

PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”

Ok that’s not very useful error information.
I’ve improved it, do yet another reinstall and check the log again :slight_smile:

This is harmless though and only happens when collectd is restarted.

The graphs are still doing their job, but the log shows:

Jul 15 11:09:37 raspberrypi collectd[14063]: No JSON object could be decoded
Jul 15 11:10:37 raspberrypi collectd[14063]: No JSON object could be decoded
Jul 15 11:11:37 raspberrypi collectd[14063]: No JSON object could be decoded
Jul 15 11:12:37 raspberrypi collectd[14063]: No JSON object could be decoded
Jul 15 11:13:37 raspberrypi collectd[14063]: No JSON object could be decoded

Good to know :slight_smile:

Interesting, i don’t suppose you have skyview978 running?

wget http://localhost/skyview978/data/receiver.json
wget http://localhost/skyview978/data/aircraft.json

I would normally expect this error:

Jul 15 09:24:27 pi collectd[25603]: HTTP Error 404: Not Found

As most people don’t receive 978 MHz / UAT, by default i just suppress that error.

But other errors are shown, even when it doesn’t matter that the subroutine trying to get UAT stats doesn’t work.
Which is probably the case for you, so the error isn’t a problem, just wondering why it’s showing.

No, I don’t have skyview978 running.
hmm… pihole is blocking that link :thinking:

I guess that explains, why there is no json, that could be decoded. Because there is no .json input but the html blocking code

And that’s the problem, it’s not giving 404 but just giving an empty reply or something.

Anyway it doesn’t matter.
You can do this:

sudo sed '/URL_978/d' /etc/collectd/collectd.conf -i
sudo systemctl restart collectd

It will remove the 978 url and the python script won’t even try to retrieve it.
That’s if the 1 line every minute in the syslog bothers you :wink:

Well… actually i doesn’t bother me but I tried your code and now collectd doesn’t start again:

systemctl status collectd.service

● collectd.service - Statistics collection and monitoring daemon
Loaded: loaded (/lib/systemd/system/collectd.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2019-07-15 11:33:24 CEST; 5s ago
Docs: man:collectd(1)
man:collectd.conf(5)
https://collectd.org
Process: 22356 ExecStart=/usr/sbin/collectd (code=exited, status=1/FAILURE)
Process: 22353 ExecStartPre=/usr/sbin/collectd -t (code=exited, status=0/SUCCESS)
Main PID: 22356 (code=exited, status=1/FAILURE)

Jul 15 11:33:24 raspberrypi systemd[1]: collectd.service: Main process exited, code=exited, status=1/FAILURE
Jul 15 11:33:24 raspberrypi systemd[1]: Failed to start Statistics collection and monitoring daemon.
Jul 15 11:33:24 raspberrypi systemd[1]: collectd.service: Unit entered failed state.
Jul 15 11:33:24 raspberrypi systemd[1]: collectd.service: Failed with result ‘exit-code’.

It is working again (undoing that step) and since this 1 line output doesn’t bother me, I don’t care.

Thank you so much for your help!

Yeah i’ll improve that.
Anyway glad that it’s working.

Nice work, thanks! Small things, but after set range to metric, graphs still show “nautical miles” in left side of the graph.

Fixed!

Thank you!

Glad you like it, did you just install them or did you update them?
When it’s run a day, would you mind sharing your range graphs and the signal graph?

Just changed them and want to know how they look with different data.

Here is mine

I’ll share mine as well :wink:

External receiver (Airspy), new graph

Internal receiver (Pro Stick Plus), old graph showing that same big range peak

External receiver (Airspy), new graph

Internal receiver (Pro Stick Plus), old graph

Best I get around to updating the graphs on the internal feeder.

Must be some atmospheric ducting going on there. Occasionally see it with AIS reception where you see a ship pop up 200nm away.