• Shopping Cart Shopping Cart
    0Shopping Cart
Databuzz
  • Home
  • Services
    • FileMaker Development
    • FileMaker Integration
    • FileMaker Web Publishing
    • FileMaker Go for the iPhone and iPad
    • FileMaker Xero Integration
    • FileMaker WooCommerce Integration Specialists
    • FileMaker Shopify Integration Specialists
    • FileMaker DocuSign Integration Specialists
    • FileMaker MYOB AccountRight Integration
    • FileMaker MYOB Essentials Integration Specialists
  • Products
    • fmSMS
    • fmMMS
    • fmAccounting Link (Xero Edition)
    • fmAccounting Link (QuickBooks Online Edition)
    • fmEcommerce Link (WooCommerce Edition)
    • fmEcommerce Link (Shopify Edition)
    • fmESignature Link (Docusign Edition)
    • fmAccounting Link (MYOB AccountRight Edition)
    • fmAccounting Link (MYOB Essentials Edition)
  • Shop
  • Contact
    • Contact Databuzz
    • Support
    • Submit Testimonial
  • About Us
    • About Databuzz
    • Our Clients
    • Testimonials
    • Support
    • Databuzz Newsletter Signup
    • Terms and Conditions
    • Privacy Policy
  • News
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
Blog - Latest News

Simple FileMaker Server Monitoring

February 23, 2016/0 Comments/in FileMaker Server, General, News/by Andrew Duncan

If you’re deploying mission critical FileMaker solutions hosted by FileMaker Server then monitoring the state of your databases and servers is an important part of ensuring everything is running smoothly. Server monitoring is something that’s normally managed by the IT department using dedicated monitoring tools and services to keep an eye on everything, however if you don’t have a dedicated IT department but still need to monitor the uptime of your FileMaker Server databases you will need to implement your own custom monitoring solution.

FileMaker Server has the ability to send email notifications to a nominated email address when errors are logged or when either warnings or errors are logged. However if you’re using web publishing it’s important to note that FileMaker Server sends no email notifications for web publishing errors or warnings. If you need to monitor your web publishing service or would like to do some custom monitoring to check that a particular database is currently hosted then you will need to implement your own monitoring solution.

There’s a number of commercial monitoring services – I’ve used Pingdom and Monitis – which will check for a response from a particular URL and notify you via email/SMS when it encounters an error. You can also tell it what content to expect for a successful result, rather than just relying on a generic HTTP 200 server response. With a bit of PHP code and FileMaker’s PHP API you can quickly setup a custom PHP page to check that the web publishing service is running or that a particular database is currently being hosted, and output a success or error message. You will need to deploy and enable Custom Web Publishing with PHP on your FileMaker Server first, and know where to find the web server root folder on your FileMaker Server machine:

  • on Mac OS X you can find this at /Library/FileMaker Server/HTTPServer/htdocs (or /Library/FileMaker Server/HTTPServer/htdocs/httpsRoot  if you have enabled HTTPS/SSL)
  • on Windows you can find this at [drive]:\Program Files\FileMaker\FileMaker Server\HTTPServer\Conf where [drive] is the drive on which the Web Publishing Engine component of your FileMaker server deployment resides.

Creating the PHP Page:

Using your favourite text editor create a file with the .php extension as follows:

<?php

// Include FileMaker API
require_once ('FileMaker.php');

$fm = new FileMaker();

$fm->setProperty('hostspec', '127.0.0.1'); 

$listDatabases = $fm->listDatabases();

if(FileMaker::isError($listDatabases)) {
 $connectionError = 'Server Error: '. $listDatabases->getMessage(). ' (' . $listDatabases->code . ')';
 echo $connectionError;
} else {
 $connectionError = '';
 echo 'Server Connection Successful';
}

?>

This simply makes a connection to the FileMaker Server (you can change the 127.0.0.1 hostspec address if required) and calls the PHP API listDatabases method – this returns an array of databases that are available with the current server settings and the current user name and password credentials. You will notice that I have not included a FileMaker database Account Name and Password – this will only work when the setting in the FileMaker Server Admin Console List only the databases each user is authorized to access is NOT selected (found under Database Server > Security > File Display Filter).

File Display Filter

We would generally recommend that this is enabled – however this will break our PHP code which will now return an error (401 Unauthorized). We now need to include some account credentials for the database you wish to monitor – I would recommend creating a new Privilege Set/Account in your FileMaker Database just for this purpose with very limited privileges as we won’t be using it to view or create records, but simply to check that the file is being hosted (don’t forget to enable the PHP extended privileges for this Privilege Set).

The PHP code would then look like this (using an Account Name of PHPWeb and Password W3bOnly):

<?php

// Include FileMaker API
require_once ('FileMaker.php');

$fm = new FileMaker();

$fm->setProperty('hostspec', '127.0.0.1'); 
$fm->setProperty('username', 'PHPWeb'); 
$fm->setProperty('password', 'W3bOnly');

$listDatabases = $fm->listDatabases();

if(FileMaker::isError($listDatabases)) {
 $connectionError = 'Server Error: '. $listDatabases->getMessage(). ' (' . $listDatabases->code . ')';
 echo $connectionError;
} else {
 $connectionError = '';
 echo 'Server Connection Successful';
}

?>

If you would like to extend this to check whether a particular database is currently being hosted you can search the array of database names that is returned by the listDatabases method for the presence of a particular file. You can see what the listDatabases array looks like by adding the following line:

echo '<p><pre>'.print_r ($listDatabases).'</pre></p>';

We use the PHP in_array function which checks if a value exists in an array like this:

if (in_array('Contacts', $listDatabases)) {
 echo 'Contacts Database is Live';
} else {
 echo 'Contacts Database is NOT Live';
}

Here I am checking for a database named Contacts – if it is part of the array of databases it will return the string Contacts Database is Live, otherwise it will return Contacts Database is NOT Live.

Here’s the complete PHP code which checks for the individual database name:

<?php

// Include FileMaker API
require_once ('FileMaker.php');

$fm = new FileMaker();

$fm->setProperty('hostspec', '127.0.0.1'); 
$fm->setProperty('username', 'PHPWeb'); 
$fm->setProperty('password', 'W3bOnly');

$listDatabases = $fm->listDatabases();

if(FileMaker::isError($listDatabases)) {
 $connectionError = 'Server Error: '. $listDatabases->getMessage(). ' (' . $listDatabases->code . ')';
 echo $connectionError;
} else {
 $connectionError = '';
 //echo '<p><pre>'.print_r ($listDatabases).'</pre></p>';
 //echo 'Server Connection Successful';
 
 if (in_array('Contacts', $listDatabases)) {
 echo 'Contacts Database is Live';
 } else {
 echo 'Contacts Database is NOT Live';
 }
 
}

?>

N.F. If the Web Publishing Engine is not running on your FileMaker Server deployment you will get a 503 Service Unavailable error.

You can get more information about Custom Web Publishing with PHP from the FileMaker Server 14 Custom Web Publishing Guide.

Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
https://www.databuzz.com.au/wp-content/uploads/2014/07/databuzz-logo-small-300x88.png 0 0 Andrew Duncan https://www.databuzz.com.au/wp-content/uploads/2014/07/databuzz-logo-small-300x88.png Andrew Duncan2016-02-23 09:13:272016-02-23 09:13:27Simple FileMaker Server Monitoring
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest News

  • Changes to Xero Accounting API ScopesJuly 1, 2026 - 9:20 am

    Earlier this year Xero introduced a change to the authentication scopes for new Xero OAuth Apps that were created on or after March 2, 2026. They are replacing the previous broad scopes with more  granular scopes to give you more control and security. Xero OAuth Apps created on or after March 2, 2026 have been […]

  • fmSMS Now Supports Notifyre SMS GatewayJune 29, 2026 - 4:33 pm

    fmSMS, our FileMaker solution for sending and receiving SMS messages from the Claris FileMaker Platform, has been updated to support the Notifyre SMS Gateway based in Australia. The Notifyre SMS Gateway is trusted by 20,000 Australian organisations and was named Australia’s Most Reliable SMS Provider for 2025. You can download a trial version of fmSMS to […]

  • Databuzz releases fmESignature Link (Docusign Edition) v2 – Integrate the Claris FileMaker Platform with DocusignJune 9, 2026 - 6:00 am

    Databuzz today announced fmESignature Link (Docusign Edition) v2, a major update to their FileMaker solution that integrates with the Docusign eSignature platform. fmESignature Link (Docusign Edition) is a FileMaker solution that integrates between the Claris FileMaker Platform and Docusign. Docusign is one of the most popular electronic signature platforms and helps organisations connect and automate […]

  • Changes to the Xero Developer PricingMarch 24, 2026 - 8:24 pm

    In December 2025 Xero announced that they were making changes to their pricing and policies for the  Xero Developer Platform, including moving to a new usage-based pricing effective March 2, 2026. New apps created in the Xero Developer portal will default to the free Starter tier and existing apps will be migrated starting mid March, […]

  • Tickets for Reconnect.Christchurch 2026 Now AvailableMarch 16, 2026 - 8:20 am

    The Reconnect Claris FileMaker Developer conference is back again in 2026 and this year we’re heading outside of Australia to Christchurch, New Zealand. The conference will be held in the Christchurch Town Hall, located on the banks of the Avon River in central Christchurch on 15-16 October, 2026. Tickets for the conference are on sale […]

Newsletter Signup

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

X Logo X Logo Followon X RSS Feed Logo RSS Feed Logo Subscribeto RSS Feed

Latest News

  • Changes to Xero Accounting API ScopesJuly 1, 2026 - 9:20 am

Newsletter Signup

© Copyright Splash IT Consulting Pty Ltd T/A Databuzz | ABN 31 116 889 028
  • Link to X
  • Link to Facebook
  • Link to Rss this site
  • Home
  • Services
  • Products
  • Shop
  • Contact
  • About Us
  • News
Link to: FileMaker Commercial Hosting Changes Link to: FileMaker Commercial Hosting Changes FileMaker Commercial Hosting Changes Link to: A Beginner’s Guide to Working with Lists in FileMaker Pro Link to: A Beginner’s Guide to Working with Lists in FileMaker Pro A Beginner’s Guide to Working with Lists in FileMaker Pro
Scroll to top Scroll to top Scroll to top