Checking media availability?

Hello, I am interested in checking the availability of media (whether or not the media directory is properly mounted). This shows up in the web UI with a warning label that the backing media is not available, however, I haven’t been able to find the same when poking at the REST API.

I plan to tie this together with a script to flag VMware vCenter Application-Level HA to reboot the Plex VM if there are file mount issues.

Thanks!

Check the sourcecode for Plex2CSV, since that export it.
Check my signature

/T

@dane22 said:
Check the sourcecode for Plex2CSV, since that export it.
Check my signature

/T

I looked through your Plex2CSV this morning and was able to find the checkFiles=1 argument for the metadata query, however, I am not able to see any differences with or without the flag in the resulting XML. I have tried curl’ing the address with and without the flags (with the NFS mounted and unmounted) and diffing the files - they seem to be identical.

Any specific usage help or examples on it?

I tried with and without checkFiles and includeExtras (just in case this triggered something)
http://:32400/library/metadata/3255?checkFiles=1&includeExtras=1

The above returns a with 1 child.

Thanks!!

Part accessible="1" exists="1"

^^ is what to look for

/T

Thanks again for the quick reply!!

It turns out I was testing against a URL for a TV Show instead of a Movie and TV Shows don’t support the Part XML child elements.

Once I switched the ID to a movie - everything showed up exactly as expected.

The script worked great and can be had by anyone interested (on my github) - https://github.com/wesparish/PlexVMwareHAWatcher

root@plexserver:~# ./vmwareHAWatcher.sh
Wed Apr 27 15:31:01 CDT 2016 Checking Plex status
Wed Apr 27 15:31:02 CDT 2016 Plex status shows UP for movie ID: 4744
Wed Apr 27 15:31:02 CDT 2016 Sending up status
Wed Apr 27 15:31:17 CDT 2016 Checking Plex status
Wed Apr 27 15:31:17 CDT 2016 Plex status shows UP for movie ID: 4744
Wed Apr 27 15:31:17 CDT 2016 Sending up status
Wed Apr 27 15:31:32 CDT 2016 Checking Plex status
Wed Apr 27 15:31:32 CDT 2016 Plex status shows DOWN for movie ID: 4744
Wed Apr 27 15:31:37 CDT 2016 Checking Plex status
Wed Apr 27 15:31:37 CDT 2016 Plex status shows DOWN for movie ID: 4744
Wed Apr 27 15:31:42 CDT 2016 Checking Plex status
Wed Apr 27 15:31:42 CDT 2016 Plex status shows DOWN for movie ID: 4744
Wed Apr 27 15:31:47 CDT 2016 Checking Plex status
Wed Apr 27 15:31:47 CDT 2016 Plex status shows UP for movie ID: 4744
Wed Apr 27 15:31:47 CDT 2016 Sending up status

Thanks again for all of the help!