I needed to set up some monitoring for FileMaker Server that made moderately heavy use of the XML interface for Custom Web Publishing (CWP). The server was mostly working well, but was due for a rebuild, or at the least, an upgrade, but the client wanted to squeeze out one more season before we did this.
Unfortunately, the CWP connectivity had a tendency to hang inexplicably every couple weeks, and we never found a way to replicate the issue. The client was willing to live with the outages in the short-term, but wanted a way to quickly know when the service reached this hung state. What would be a good way to do this?
Looking through the FileMaker’s Custom Web Publishing Guide I eventually settled on the following query:
https://server.clientdomain.com/fmi/xml/fmresultset.xml?-dbnames
This had a few features that made it a good choice:
- did not require authentication (assuming you didn’t have the List only the databases each user is authorized to access option in FMS set)
- would always return some data from the system
- didn’t have any file specific parameters
- was a lightweight query
If the CWP interface is responding correctly, you should get a succesful response like this:
File_A File_B
In one case, an error result we got was this:
Since this server was running on AWS, it made sense to use this query with the availability monitoring that is part of AWS’ Route 53, which I hope to cover in a later post.
Restoring access
Tangentially, I’ll mention that the only good way we found to restore access when this issue hit was to run the following at the command prompt:
fmsadmin stop wpe fmsadmin start wpe
Toggling the Web Publishing Engine (wpe) via the admin GUI had no effect for this issue.
Simon