We are using nginx as a reverse proxy in our cloud infrastructure, and it's pretty handy. I'd like to use it for something else though. On some of our VMs, there is a process that I need to be able to confirm is running. Ideally, I'd like to have nginx running, serving out a single location. When visiting that location, nginx should check to see if the process is running (by greping the output from ps or something), and return 200 if it is and something else if it isn't. Unfortunately I find nginx's documentation unusually difficult to read, so I haven't been able to figure out how to do that (or something like it).
Note that these VMs have no other webserver processes running, and aren't open to external networks, so I'm not concerned if it's a bit flaky