Thanks to @mikkyo for sharing the link and instructions for RPIMonitor! I have it up & running using his “Avionics” config, and it will simplify my browser tab situation a great deal.
I do have a question though. Been fighting this one config thing all afternoon…
I have VRS running on a separate Debian VM, and pulling data from my Pi, which is where my antenna/filter/SDR is attached, and where RPIMonitor is installed. Since it’s not local, RPIMonitor can’t verify its Online/Offline state using the “netstat -nlt” test in the config file.
I changed the test to one using nmap to verify that something was listening on port 8080 on that server, figuring that was better than nothing. I tested with the interactive command line tool (very slick, btw), and came up with this:
dynamic.5.name=vrs
dynamic.5.source=nmap 192.168.0.9 -p 8080
dynamic.5.regexp=(open)
This works correctly as far as the interactive tool is concerned, returning “open” if the server is running.
I changed the test on the web.status line to test whether or not data.vrs contains “open”, but I am getting “inactive” no matter what I do. Unless I invert the logic (which doesn’t really help).
Label(data.vrs,"==open","active","success") + Label(data.vrs,"!=open","inactive","danger")
I tried taking all of that out and just using data.vrs, and it definitely is returning “open”, so I am thinking that the problem lies in using == for the comparison operator…but I am at a loss for what to replace it with.
It’s a little thing, but it feels incomplete.
Any tips? Ideas? Suggestions for a better solution? Thanks!
Edit: Ok, I feel dumb… it’s a string - it needs to be in quotes…
This is what worked:
Label(data.vrs,"=='open'","active","success") + Label(data.vrs,"!='open'","inactive","danger")
I just needed to enclose the string that I wanted to compare in single quotes: ‘open’