Wanting to write a bit of code to monitor my servers - to know when then are in use, so I don’t upgrade (for example) while someone is using them. I know this info is in the dashboard, but I want a simple little utility to query several servers all at once.
The checking is simple, once I find the servers . Not seeing PMS respond to SSDP broadcasts … is there an easy way to scan for Plex Servers on my network (subnet)?
You could go the other route and listen for the servers’ SSDP multi-cast packets instead. They will be sent to 239.255.255.250:1900 UDP every 5-10 seconds from each server. It will be an M-SEARCH, with information similar to the following in the packets:
Plex Dash & Tautulli mobile apps will send notifications to your phone when someone is playing media, when the server is offline, etc. Tautulli has several other notification methods - Discord, e-mail, Facebook, etc.
Dash monitors all servers claimed by your userid. With Tautulli, you have to run an instance for each server you wish to monitor (easily accomplished with Docker).
If you’ve remote access enabled, Uptime Robot will monitor the remote access port and notify you when the server is offline (must used fixed port forwarding).
That makes sense, thanks! But one more dumb question then . Even from a single IP, there may be more than one server, right? Meaning … Plex is one one of several. How to identify PMS?
I just did a Wireshark network scan, and I see the SSDP broadcasts, now to know which ones are from PMS.
After receiving the multi-cast packet from a potential server, attempt to connect to it at TCP 32400. If it’s a Plex server, it will allow you to connect. Plex servers always listen on TCP 32400; there’s also no way to turn that off.