2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/fr24/fr24
2018-03-28 04:33:45 +02:00

50 lines
837 B
Bash
Executable File

#!/bin/bash
#
: <<=cut
=head1 NAME
fr24 - Plugin to monitor your flightradar24.com feeder.
=head1 APPLICABLE SYSTEMS
All Linux systems.
=head1 CONFIGURATION
The following is default configuration:
[fr24]
env.MONITOR http://192.168.1.1:8754/monitor.json
Set the right URL according to your FR24 Feeder.
=head1 VERSION
1
=head1 AUTHOR
Benoît.S « Benpro » <benpro@benpro.fr>
=head1 LICENSE
WTFPL
=cut
MONITOR=${MONITOR:-http://192.168.1.1:8754/monitor.json}
case $1 in
config)
echo "graph_title Number of planes in sight
graph_info Number of planes in sight with DVB-T receiver.
graph_category tv
graph_vlabel Number of planes
planes.label planes"
exit 0;;
esac
planes=$(curl -qs "$MONITOR" | grep -Eo '"d11_map_size":"[0-9]+"' | grep -Eo '[0-9]+' | tail -1)
echo "planes.value $planes"