LATEST VERSION: 1.9 - CHANGELOG
Push Notification Services v1.9

DevOps

Monitoring

Healthcheck

Push provides a healthcheck endpoint which can be polled for monitoring the health of both Push and its connection to dependencies. Access the endpoint at http://push-api.pcf-top-level-domain/healthcheck

See the following sample output of the healthcheck endpoint:

{
  "database": {
          "healthy": true,
          "message": "MySQL"
  },
  "rabbitmq": {
          "healthy": true,
          "message": "All rabbit nodes (ingest, dispatch, push, audit) are running"
   },
   "scheduler-backend": {
          "healthy": true,
          "message": "Scheduler is up"
   }
}

Heartbeat Monitoring

At installation time, a pre-configured heartbeat monitor mobile app is created. This app sends a regular push notification through the system to a mobile device. See Configuring Heartbeat Monitor for iOS and Configuring Heartbeat Monitor for Android for more information.

Uninstalling

IMPORTANT

Push is a stateful service!

It is advised that you do NOT UNINSTALL the Push tile in order to solve problems with binding or communicating with other services. The Push team will provide instructions on how to manually restore these connections.

Deleting the tile will cause all of the Push user data stored in the MySQL, Redis, and RabbitMQ services to be DELETED as well.

If you need to delete the Push tile or delete any of its connections to the above services then you will need to BACKUP and RESTORE all of the Push user data in these services.

Instructions for backing up and restore the user data is provided below.

Troubleshooting Common Problems

For solutions to common problems, please see our troubleshooting guide.

Configurable Environment Variables

Push Api

push_security_trustAllCerts (Boolean, default: inherited from cf runtime)

When the push_security_trustAllCerts environment variable is set to true the Push API will skip SSL validation on calls to RabbitMQ and the Push Scheduler. This variable is necessary in environments that use self-signed certificates. The default value is false unless the CF Runtime is configured to trust self-signed certificates.

Certificates generated in Elastic Runtime are signed by the Operations Manager Certificate Authority. They are not technically self-signed, but they are referred to as ‘Self-Signed Certificates’ in the Ops Manager GUI and throughout this documentation.

push_scheduler_sendImmediatelyWithin (Integer, default: 60)

The push_scheduler_sendImmediatelyWithin environment variable pertains to scheduled push notifications. It is a threshold (in seconds) within which the push server will skip scheduling a push and simply send it right away. The default value is 60 seconds. If a push is scheduled within 60 seconds of the current time it will not be scheduled but simply be sent right away. You can modify that threshold by modifying this environment variable.

push_apns_sendReceipt (Boolean, default: true)

The push_apns_sendReceipt environment variable is a flag that enables passing a receipt to the device as part of the push payload. The receipt is a unique id for each message that can be used for analytics. This flag enables sending receipts for iOS/APNS.

push_apns_logDeviceTokens (Boolean, default: true)

The push_apns_logDeviceTokens environment variable controls the log verbosity of the APNS push handler. When set to true the device token for every recipient of a push will be logged as the push is sent. Note that this extra logging will reduce push throughput.

push_gcm_sendReceipt (Boolean, default: true)

The push_gcm_sendReceipt environment variable is a flag that enables passing a receipt to the device as part of the push payload. The receipt is a unique id for each message that can be used for analytics. This enables sending receipts for Android/GCM.

push_gcm_logDeviceTokens (Boolean, default: true)

The push_gcm_logDeviceTokens environment variable controls the log verbosity of the Android push handler. When set to true the device token for every recipient of a push will be logged as the push is sent. Note that this extra logging will reduce push throughput.

Installing the push server behind a proxy

You can route communication with push providers (APNS, Google Cloud Messaging, Firebase Cloud Messaging, Baidu Cloud Push) through a proxy server.

It is strongly suggested to change this setting in the Push Notification tile through Ops Manager.

GCM Pushes through Proxy

GCM pushes can use either a HTTP or socks proxy. Use the following environment variables to specify proxies.

push_gcm_httpProxyHost (String, default: [empty])
push_gcm_httpProxyPort (Integer, default: [empty])

The push_gcm_httpProxyHost and push_gcm_httpProxyPort environment variables allow you to specify an HTTP proxy server through which to route Google API requests (for Android pushes).

push_gcm_socksProxyHost (String, default: [empty])
push_gcm_socksProxyPort (String, default: [empty])

The push_gcm_socksProxyHost and push_gcm_socksProxyPort environment variables allow you to specify a SOCKS proxy through which to route Google API requests.

FCM Pushes through Proxy

FCM pushes can use either a HTTP or socks proxy. Use the following environment variables to specify proxies.

push_fcm_httpProxyHost (String, default: [empty])
push_fcm_httpProxyPort (Integer, default: [empty])

The push_fcm_httpProxyHost and push_fcm_httpProxyPort environment variables allow you to specify an HTTP proxy server through which to route Google API requests (for Android pushes).

push_fcm_socksProxyHost (String, default: [empty])
push_fcm_socksProxyPort (String, default: [empty])

The push_fcm_socksProxyHost and push_fcm_socksProxyPort environment variables allow you to specify a SOCKS proxy through which to route Google API requests.

Baidu Pushes through Proxy

Baidu pushes can use either a HTTP or socks proxy. Use the following environment variables to specify proxies.

push_baidu_httpProxyHost (String, default: [empty])
push_baidu_httpProxyPort (Integer, default: [empty])

The push_baidu_httpProxyHost and push_baidu_httpProxyPort environment variables allow you to specify an HTTP proxy server through which to route Baidu API requests (for Android pushes).

push_baidu_socksProxyHost (String, default: [empty])
push_baidu_socksProxyPort (String, default: [empty])

The push_gcm_socksProxyHost and push_baidu_socksProxyPort environment variables allow you to specify a SOCKS proxy through which to route Google API requests.

APNS Pushes Through Proxy

APNS pushes can only use a socks proxy.

push_apns_socksProxyHost (String, default: [empty])
push_apns_socksProxyPort (String, default: [empty])

The push_apns_socksProxyHost and push_apns_socksProxyPort environment variables allow you to specify a SOCKS proxy through which to route APNS push requests.

For All Pushes Through Proxy

If both HTTP and SOCKS proxies are defined for a particular Push service provider (GCM, FCM, and Baidu), SOCKS will be used.

Push Dashboard

CREATE_PLATFORM_DIALOG_WHITELIST (String, default: "ios,android,android-fcm,android-baidu")

The CREATE_PLATFORM_DIALOG_WHITELIST environment variable specifies which new push platform are available for creation when using the Push Notification dashboard.

If this variable is empty, the Push Dashboard will fail to start.

NOTE: It is strongly suggested to change this setting in the Push Notification tile through Ops Manager.

Backup And Restore

Backup MySQL data

It is highly recommended that you enable automatic backups with your MySQL Tile (Requires an Amazon s3 Bucket). Additionally, you should always backup your MySQL tile if you are planning on removing Push Notification Service or MySQL. You can perform a manual backup by following the directions found here: MySQL Manual Backup

Follow these instructions to backup solely the Push Notification database.

  • In the Apps Manager console in the “system” org go to the “push-notifications” space and the “push-analytics” app.
  • Go to the “Services” tab.
  • Click “▸ Show credentials” for the MySQL service.
  • Get “username”, “password” and “database name”.
  • SSH into the proxy for your Pivotal CF environment.
  • From the proxy run (using the credentials above):

    mysqldump -h hostname -p -u username database_name > push_db.sql
    

Backup encryption key

  • In the Apps Manager console go to the “push-api” app and go to the “Env Variables” tab.
  • Get and record the value for crypto_applicationKey. You will need this key during the installation.
    • The crypto_applicationKey environment variable contains the key which will be used to encrypt sensitive information used by the push server (i.e.: iOS push certificates, Google API keys). This value is set at install time and should not be modified. You will however need to record this value in order save and restore the push notification service database.

Restore MySQL data

  • From the Apps Manager console in the “push notifications” space through the “system” org, stop the “push” and “push-api” applications.
  • Go to “Services”.
  • Click “▸ Show credentials” for MySQL.
  • Get “username”, “password” and “database name”.
  • SSH into the proxy for your Pivotal CF environment.
  • Delete data from Push installation (this should just be empty data) by running the following command from the proxy (using the above credentials):

    mysql -h hostname -p -u username name -e "drop database database_name; create database database_name;"
    
  • Import data from old install by running the following command from the proxy (using the above credentials):

    mysql -h hostname -p -u username database_name < push_db.sql
    
  • Enable migrations:

    • In the Apps Manager console, find the “push-api” application and go to the “Env Variables” tab.
    • Edit liquibase_runMitgations and set it to true.
  • Start the “push-api” and “push” applications.

  • Disable migrations:

    • In the Apps Manager console, find the “push-api” application and go to the “Env Variables” tab.
    • Edit liquibase_runMigrations and set it to 'false’.
  • Restart the “push-api” and “push” applications.

Backup Redis Data

Removing Log Redis Instance

Starting with v1.9.0, log redis service instance is no longer required for Push. As such, push-analytics is no longer bound to the service.

The log redis service instance, under the system org and push-notifications space, can be safely removed:

  • If using the PCF Redis tile, the service name is push-notifications-logs-redis

  • If using an external Redis, the service name is push-notifications-user-defined-logs-redis

Create a pull request or raise an issue on the source for this page in GitHub