Server Dashboard

Monitor the status of one or more ExpeDat or SyncDat servers by installing a single PHP file along with the mtping and/or movedat utilities on any web server.  The status.php page shows an operational summary of each server, including load, latency, idle time, and counts of errors, warnings, and failures.  Servers configured with the AdminReport privilege may also show a list of active transactions.  The dashboard requires the following:

The mtping utility runs on the web server to retrieve status and transaction reports from ExpeDat and SyncDat servers.  Alternatively, the movedat ExpeDat client may be used instead for transaction reports in situations where features such as a password cache are needed.  These utilities must be executable by the web server, but do not need any special privileges.  Installation can be made on any web server which has network connectivity to the servers being monitored.

Server Status Dashboard

Status
Server status dashboard with default branding.

The screenshot above shows an example monitoring the status of three ExpeDat servers.  Various elements of the page can be customized.  The logo at the top can be replaced with your own graphic.  The page title, header, and message can be replaced with your own text.  The "Home" and "Support" links in the menu bar can be directed to your own pages.  You can insert your contact email address and phone number at the bottom.

As the page loads, the web server will run mtping or movedat for each server being monitored, then display the results in a table.  This may take considerable time if one or more servers is down or experiencing connectivity problems.  After loading is complete, you may click the "Refresh" link in the menu bar to reload the page.

The first line for each server contains the same status information as would be returned by an mtping servedat status request.  Note that "Time" measures the time required for the full response, including any transaction listing, which may be significantly longer than the network round-trip time.

For servers which include AdminReport credentials, a table of active transactions (if any) will be displayed underneath the server status line.  Only individual transactions active at the time of the request are shown.  Report transactions are normally hidden.  A detailed description of the fields can be found in the servedat Monitoring section.

Installation

The status.php file can be found in the "Web" folder of the ExpeDat and SyncDat distribution packages.  Copy this file to a web server and place it in a linkable location.  You can rename status.php however you want.

It is strongly recommended that you configure your web server to restrict access to this page.

The mtping executable can be found in the "Server Files" folder of the ExpeDat and SyncDat distribution packages.  The movedat executable can be found in the "Client Files" folder of the ExpeDat distribution package.  Choose the package appropriate for your web server.  As the administrator, install mtping on the web-server and enter its license code.  Note its path and verify that the web server processes can access that path.  You can copy or move mtping if necessary.  Do the same for movedat if it is needed.

If your web server runs as a restricted user, such as "www" on most unix-like systems, you should also register its license code as that user.  For example, "sudo -u www mtping -R".

Open the copy of status.php in a text editor.  All of the settings needed to customize the page are at the top of the file.  By default, it will look for an ExpeDat or SyncDat server running at the same domain as the web server.

Set the full path to the mtping executable and the list of servers to monitor.  Use the PHP array syntax for the list of servers, even if you are only monitoring one server.  For example:

$MTP_Servers = array( "exp01.example.com:8080", "rpadmin:rppass@exp02.example.com:8080" ); $mtping_Path = "/usr/local/bin/mtping";

Servers with user credentials included will be queried to list all active transactions.  The server must be version 1.18.0 or later and the given user must have the AdminReport privilege.  It is recommended that you create a separate user record just for this purpose and limit its access with AdminOnly.  If you define $movedat_Path, then movedat will be used instead of mtping for transaction queries.  For either mtping or movedat, a transaction report does count toward server capacity.  See Monitoring Server Health for a detailed explanation of the server summary values.

To quickly enable transaction monitoring, create an AuthFile record similar to the one below by following the instructions in the Adding Users chapter.

rpadmin:rppass::::AdminOnly,AdminReport

You may then add those credentials into the $MTP_Servers list, as shown above.

Servers without user credentials will be queried with mtping and will display only server status information.  Ping queries do not count toward server capacity and consume negligible server resources.  See Monitoring Transactions for a detailed explanation of the transaction records.

There is no particular limit to the number of servers which can be listed.  The page may take considerable time to load when there are many servers, particularly if one or more servers is down or experiencing connectivity problems.

Customization

The settings at the top of the status.php file allow you to change the appearance and functionality of the page.  Values should be given for $MTP_Servers and $mtping_Path.  All other values can be left as-is, and defaults will be provided.

If the page appears to be blank after changing the settings, it is likely due to a mistyped value.  Check for missing commas, quotes, or semi-colons.  Check the web server's error log for details of the problem.

$MTP_Servers array("address[+port][#label]"[,...])
A PHP array of server names.  Each name is formatted as "[user[:password]@]address+port#label" where address is either a DNS name or IP address, port may be an alternate port number, and label is an optional name display instead of address.  When user is given, a full transaction report is retrieved instead of just a summary.  If no server values are given, the name of the local webserver will be used.  For formatting purposes, an empty string will generate a blank line in the output table and a string beginning with the character # will generate a line with only a label.
Example: array("ex1.example.com#New York","ex2.example.com:8100#Tokyo");
$mtping_Path The full path of the mtping executable on the web server.  On unix systems, the default is "/usr/local/bin/mtping".
 
$Page_Title This text will be inserted as the HTML <TITLE></TITLE> tag of the page and the headline beneath the menu bar.
Default: "My Server Status"
$Page_Message This text will be inserted below the headline and above the file browser.
Default: "This page monitors the status of your ExpeDat and SyncDat servers."
$Your_Logo This image URL will be placed at the top left of the page.
Default: The "Data Expedition, Inc." logo.
 
$Your_Home The URL to be followed when "Home" is clicked in the menu.
Default: https://www.DataExpedition.com/expedat/
$Your_Support The URL to be followed when "Support" is clicked in the menu.
Default: https://www.DataExpedition.com/expedat/Docs/
$Your_Email An email address (or any other text) to be displayed in the lower left of the page.
Optional
$Your_Phone A phone number (or any other text) to be displayed in the lower right of the page.
Optional
 
$movedat_Path If you wish to use movedat instead of mtping, provide the full path of the movedat executable on the web server.  On unix systems, the default is "/usr/local/bin/movedat".
$Max_Wait The number of seconds to wait for a server to respond before declaring it offline.  The default is 2 seconds, which means that display of the dashboard page may be delayed by up to 2 seconds for each offline server queried.
$Hide_RT_Requests Transaction reports themselves count as transactions for the purposes of capacity and security, but do not affect idle time.  The default is TRUE, meaning the dashboard will not show transactions with a "*rt" action code.

You may perform additional customization by editing the remaining status.php source code, however such alterations are not subject to technical support.

Browser Requirements

This page requires a web browser compliant with HTML4 and CSS3 standards.  If you are using Internet Explorer, IE 10 or later is recommended