Configuring a Web Server for Notifications - AWS Elemental Delta

This is version 2.3 of the AWS Elemental Delta documentation. This is the latest version. For prior versions, see the Previous Versions section of AWS Elemental Delta Documentation.

Configuring a Web Server for Notifications

To receive web callback notifications, you must have a web server that supports Hypertext Pre-processor (PHP) scripting. You can configure this server to receive alert notifications from AWS Elemental systems as follows.

To configure a web server

  1. Use a text editor such as Notepad on a Windows system or Nano on Linux to create a .php file containing the following text.

    <?php function get_raw_post(){ $data = @file_get_contents('php://input'); if ($data){ return $data; } return "nothing passed"; } $file = "../webcallback/notify"; $fh = fopen($file, "a"); $data = get_raw_post(); fwrite($fh, $data); fclose($fh); ?>
  2. Save the file in a directory on your web server. In this example, the file is called notification.php and is saved in the directory /webcallback.

  3. Subscribe to global or individual alerts as described Setting up for Email or Web Server Alert Notification. In the Web Callback URL field, enter the URL to your web server, e.g.

  4. Test your setup by typing the following (in a single line) at the command line of your AWS Elemental Delta system:

    curl -X POST -d "param1=value1&param2=value2"
  5. Open your notification.php file to check that it was updated. The text of your file should contain something like this:

    <?xml version="1.0" encoding="UTF-8"?> <job href="/jobs/3401"> <node>earhart</node> <user_data></user_data> <submitted>2014-11-14 01:27:05 -0800</submitted> <priority>50</priority> <status>preprocessing</status> <pct_complete>0</pct_complete> <average_fps>0.0</average_fps> <elapsed>0</elapsed> <start_time>2014-11-14 01:27:06 -0800</start_time> <elapsed_time_in_words>00:00:00</elapsed_time_in_words> </job> param1=value1&param2=value2
  6. Enter your web callback URL (e.g. into a web browser to see the HTTP POST.