rPI monitoring

Discussion in 'Other technical not related to ADSBx Feeding' started by xJMV, Aug 20, 2018.

  1. xJMV

    xJMV Member

    Hey!

    Does anyone knows of a good client/server remote monitoring software ?

    I do run a certain number of PI and linux based computers at home. As I am about to deploy few remote PI for ADSB coverage, I like for a dashboard displaying red/green status based on last ping received by those PI and maybe a regular health report (uptime, temp, cpu load...).

    It do not have to be web based, I just want to have a visual indication if one system goes into troubles...

    So far google only points to very pricey solutions....
     
  2. MDA

    MDA Administrator Staff Member

  3. xJMV

    xJMV Member

    I seek something less related to the feeds and more to the hardware but very basic... The client ping the server every X seconds. The server show clients in green when ping are sent inside the delay and red when outside the delay... Nothing more than that... If the client send a health report every hour it will be a bonus...

    There was something like that back in the days when I bought my 2 first PI... the server GUI was CLI based so even on the go I was able to SSH into the monitor PI to check... I just can't remember the name...
     
  4. MDA

    MDA Administrator Staff Member

    If you are a bit familiar with programming:
    Install raspberry pi node exporter, modify script to get data you are interested in. Set refresh rate as you want (sleep xxx at the end of script).
    Modify MQTT dashboard to display what you want...
    Just an idea, you can play with it.
     
    Jhonny Monclair likes this.
  5. xJMV

    xJMV Member

    Yes, except that I want the PI to report itself... I will have some PI set over networks beyond my control so no way to get in directly (No open port will be exposed, I will use Remot3.it for that).

    But it seems software like that do not exist anymore... Back in the days there was LanTool for windows system... I just can't remember the one I was using for my PI... It might finish like I will design my own when time allows me...
     
  6. Jhonny Monclair

    Jhonny Monclair Active Member

    MQTT is perfect for the purpose: the Pi reports itself, no port forwarding to mess with, adjustable refresh rate, very low impact on resources.
    Ping replies don't tell you much about the health of a system.
     
  7. xJMV

    xJMV Member

    This will probably be what I will go with... just not a quick and dirty install & forget...

    Time is missing actually... many projects going on and not enough time haha
     
    Jhonny Monclair likes this.
  8. Jhonny Monclair

    Jhonny Monclair Active Member

    A simple modify to the script allows to reports temperature also:
    Code:
    TEMP=`/opt/vc/bin/vcgencmd measure_temp`
    /usr/bin/mosquitto_pub -h $MQTTHOST -t "$MQTTPREFIX/$RPINAME/$TOPIC" -m "{ \"dump\" : \"$DUMP\", \"adsbx\" : \"$ADSBX\", \"fr24\" : \"$FR24\", \"fa\" : \"$FA\", \"pf\" : \"$PF\", \"rbox\" : \"$RBOX\", \"osky\" : \"$OSKY\", \"temp\" : \"$TEMP\" }"
     
    MDA, James and xJMV like this.
  9. James

    James Guest

    I was contemplating doing this on a larger scale for the new Pi images. Having the image send out a data burst every 30 seconds with some various stats.

    What would be the best way to save it server side for viewing for everyone?
     
    Jhonny Monclair likes this.
  10. Jhonny Monclair

    Jhonny Monclair Active Member

    ThingSpeak might be a further (free) option...after registration, you get an API key and then you can send data via mqtt or http post method.
    The good is that it saves the collected data, you could get out graphs of cpu usage, temperature, ads-b msg rate, etc.

    example: https://gist.github.com/rw950431/8702588
     
    xJMV likes this.
  11. xJMV

    xJMV Member

    That is starting to look like something useful and faster than making everything from ground!

    Thanks @Jhonny Monclair
     
    Jhonny Monclair likes this.
  12. James

    James Guest

    How does this store data. It appears this is a message broker, more or less a channel to route messaging.

    Historical storage would requires some type of database? Say for instance a feeder dashboard.
     
  13. xJMV

    xJMV Member

    here is an exemple made with CPU temp, I must still figure out how to isolate pings by devices but it uses MATLAB to report:
    upload_2018-8-21_20-5-9.png
     
  14. xJMV

    xJMV Member

    From what I see, it might need a bit of coding but the data can be accessed using the API and JSON feeds... I know nothing about matlab and I don't feel like learning it...

    So using the same script @Jhonny Monclair pointed to, you can make your own PHP script that will collect and store data into mysql. Then make your own dashboard with it... It might be faster that way... and less licensing.
     
  15. Jhonny Monclair

    Jhonny Monclair Active Member

    No, it is not just a message broker, each channel includes eight fields that can hold any type of data, at moment I don't remember what is the max time span of a graph data set.

    Here the link to my channel, it stores temperature and humidity of my living room.
    Sensor's readings are sent by http post commands: https://thingspeak.com/channels/267275

    another example, how to post dump1090 data: http://blog.wenzlaff.de/?p=6970
     
    Last edited: Aug 22, 2018
  16. James

    James Guest

    Pretty cool. I'll play around with this after I get the new image updates published
     
    Jhonny Monclair likes this.