Monitoring
GRAX infrastructure in your own environment isn't accessible to the GRAX team, so you monitor it yourself. Automated monitoring policies help you notice issues quickly and keep downtime low.
What can be monitored?
The exact observability/monitoring tools and configurations vary based on cloud provider or environment utilized for installing GRAX, but at a high-level we want to monitor major components:
Load Balancer (if applicable)
Instance Usage
GRAX Service
Postgres Database
Overall Health and Replacement
Cost-based alerts for budgeting thresholds and forecasts can be configured separately from the GRAX infrastructure if required. See the documentation for your cloud provider of choice for more information. Automatic restriction of resources based on cost thresholds or budgets may cause interruption to your GRAX service.
Global services (like AWS' S3 or IAM) can be monitored at a per-service level but don't require further custom monitoring individual to your account.
Load Balancer
If your infrastructure deployment contains a load balancer for stable connectivity, it must be reachable on a given domain name with a valid certificate and have healthy targets behind it. Thus, monitoring criteria are:
Application domain is registered
Application domain is non-expired
Domain certificate is non-expired
Domain certificate is assigned to ALB
Certificate is installed on instance (if applicable)
Certificate installed on instance is non-expired (if applicable)
Load Balancer is reachable from intended network segment
Targets are healthy (see below for health checks)
Instance Usage
The GRAX Application workload varies with Salesforce usage, so occasional heavy-load periods and periods with almost no usage are normal. We recommend the following monitoring criteria:
CPU usage
Below 80% on average (4-8hr roll up)
RAM usage
Below 80% on average (4-8hr roll up)
Temp directory total size
At least 500GB
Temp directory free space
At least 15% of total size
Network usage
Below 80% on average (4-8hr roll up)
For more information about the required specifications of GRAX hardware, please review the technical requirements document. If utilizing AWS, more documentation on instance and auto-scaling metrics is available here.
GRAX Service
Keeping the GRAX Application running on the instance is foundational. It's highly recommended to run GRAX as a service with an auto-restart configuration so that the app boots again in case of a fatal error.
External Health Endpoint
The GRAX service offers an endpoint for an external health check like those by AWS ALB Target Groups. Make a request like the following to check if the app is available:
If the GRAX service is running, the GET request above returns a status of 200. This endpoint is designed for load balancer registration and de-registration, not for instance replacement.
Postgres Database
A valid connection to the app database is required for boot and operation of GRAX. Monitoring the GRAX database isn't unlike monitoring any other app database. Monitoring should cover the following:
CPU usage
Below 80% on average (4-8hr roll up)
RAM usage
Below 80% on average (4-8hr roll up)
Total disk usage
Below 80% (if applicable)
GRAX owns the schema of this database and changes it while the app is running, so schema activity isn't a useful monitoring signal. Tables, indexes, and other objects are created, altered, and dropped at any time as part of normal operation. Alerts on DDL events, such as a table being dropped or an index being rebuilt, fire during routine GRAX activity and don't indicate a problem.
More options for monitoring Postgres are available based on platform/vendor including queue depth, IOPs statistics, and network throughput. For more information on how you can monitor these metrics on AWS's RDS, check out:
For similar information pertaining to Azure Postgres, check out:
What Not to Alert On
Monitoring GRAX effectively means alerting on availability and on sustained resource pressure, not on GRAX functionality. The following are normal and can generate alerting noise:
Schema changes. Tables and indexes are created, altered, and dropped at any time during normal operation. DDL alerts and audit rules on the GRAX database fire routinely.
Instantaneous CPU, RAM, or network spikes. The workload is bursty by design, and backup runs, compaction, and restores drive utilization to its ceiling for stretches at a time. Use the rolled-up averages described above rather than a single high sample.
Long-running queries and transactions. Bulk operations legitimately run long against both Salesforce and the database.
Database size relative to your backup dataset. Record data lives in your storage bucket, so database growth reflects application metadata only.
Service restarts during automatic updates or database migrations. These are expected, and the app resumes where it left off.
Transient Salesforce API errors. A Salesforce service outage returns 500s until the platform recovers, and GRAX retries on its own.
Reserve alerts for conditions an operator must act on: the health endpoint failing, load balancer targets going unhealthy, disks approaching exhaustion, the service failing to restart, or resource utilization staying high across a full roll-up window.
Overall Health and Replacement
The monitoring of the major components above, in combination with other standard cloud provider or environment monitors, may indicate a problem that requires action to recover from.
Traditional cloud operations best practices apply, and most problems require that an operator review metrics, logs and configuration to understand and resolve the issue.
Some perceived issues require no action but waiting. Examples of this include:
The instance restarted and is performing automatic security updates and service configuration
The GRAX service restarted and is performing an automatic database migration
The Salesforce API is returning 500s indicating a service outage
Other issues require manual review and action. Examples of this include:
The instance CPU, memory or network are at 100%+ utilization, which indicates it should be reconfigured with a larger instance
The instance disk periodically fills up and GRAX crashes, which indicates it should be reconfigured with a disk location and size that meets minimum requirements
GRAX crashes when connecting to the database, which indicates database configuration needs to be updated
Some issues can be fully automated. Examples of this include:
A failed AWS instance status check indicates a hardware failure; an AWS autoscaling group can detect it and automatically replace the instance.
In all cases GRAX is designed to be simple and resilient to problems. After any amount of downtime, it picks up where it left off when it resumes normal operations.
Last updated
Was this helpful?

