Skip to content

Monitoring home

Salesforce Org Monitoring

Keep a daily, version-tracked backup of every metadata in your Salesforce orgs, with before/after diffs, quality and security checks, and notifications routed where your team actually reads them.

Monitoring configuration preview

"This feature worked yesterday in production, but today it crashes. What happened?" Sfdx-hardis Monitoring answers that question in seconds.


Why monitor your orgs?

  • See exactly what changed: Salesforce Audit Trail tells you who updated what, but not the before/after. A git-based metadata backup gives you the full picture.
  • Catch problems early: failing Apex tests, security issues, deprecated API calls, org limits, overdue Release Updates are all surfaced automatically.
  • Stay admin-friendly: works on any API-enabled org. No CI/CD project required.
  • Route the right signal to the right channel: stream everything to Grafana while keeping Slack and Teams reserved for warnings and errors only.

What gets monitored

Configuration changes

  • Daily metadata backup with full git history
  • Detection of suspect setup actions in Audit Trail
  • Visual diff of every change between two backups

Quality and security

  • Apex tests (and soon Flow tests)
  • Code quality and security analysis with MegaLinter
  • Salesforce Security Health Check
  • Unsecured Connected Apps

Org health

  • Org limits and Apex flex queue backlog
  • Apex and Flow runtime errors
  • Calls to deprecated API versions
  • Metadata deployments and validations
  • Next major Salesforce upgrade date and incoming Release Updates

Users and licenses

  • License usage and unused permission set licenses
  • Active users without recent logins
  • Underused or minimal permission sets

Unused metadata

  • Custom labels, custom permissions, Apex classes, Connected Apps, inactive metadata
  • Missing descriptions on custom fields
  • Custom elements with no access rights in any permission set

Custom checks


A look inside

Browse the monitoring git repository to see every metadata change, commit by commit.

Monitoring git repository

Inspect diffs with GitLens to see exactly what was added, removed, or modified.

Diff visualization with GitLens

Build dashboards in Grafana to track trends across all your orgs.

Grafana monitoring dashboard

Grafana monitoring dashboard, second view

Grafana monitoring dashboard, third view

Get Slack or Teams notifications when something needs attention.

Slack notification example


How it works

Every night (or on your own schedule), a CI job extracts all metadata from the org and pushes a new commit to the monitoring repository whenever something changed.

Monitoring architecture

Additional jobs then run on top of the backup: Apex tests, code quality, legacy API checks, plus any custom command you define. Results are stored as job artifacts and forwarded to your notification channels.

Example workflow on GitHub Actions


Route notifications anywhere

Each notification type (audit trail, org limits, Apex tests, ...) can be configured per channel with its own severity threshold. Configure it from the VS Code SFDX Hardis extension or directly in .sfdx-hardis.yml.


Customize the cadence

Most checks run daily; less critical ones run weekly (Saturday by default) to avoid overflowing your channels.

Every command is configurable in .sfdx-hardis.yml via the monitoringCommands property. Supported frequencies: daily, weekly, biweekly, monthly, off. Pick the day with frequencyDay (monday..sunday) or frequencyDayOfMonth (1..31). Pass --force-all to hardis:org:monitor:all (or set MONITORING_IGNORE_FREQUENCY=true) to run everything regardless of cadence.

See Monitoring configuration for full examples.


All monitoring commands

Check Frequency
Metadata Backup Daily
Detect suspect setup actions in major org Daily
Apex tests Daily
Quality Checks with MegaLinter Daily
Detect calls to deprecated API versions Daily
Detect limits issues Daily
Detect Apex flex queue backlog Daily
Detect Apex and Flow errors Daily
Detect unsecured Connected Apps in an org Daily
Analyze metadata deployments and validations Daily
Extract licenses information Weekly
Detect custom elements with no access rights defined in permission sets Weekly
Detect permission set licenses that are assigned to users that do not need them Weekly
Detect active users without recent logins (All licenses, 6 months) Weekly
Detect active users without recent logins (CRM, 6 months) Weekly
Detect active users without recent logins (Experience, 6 months) Weekly
Detect active users with recent logins (CRM, 1 week) Weekly
Detect active users with recent logins (Experience, 1 month) Weekly
Get org info + SF instance info + next major upgrade date Weekly
Gather warnings about incoming and overdue Release Updates Weekly
Run Salesforce Security Health Check Weekly
Detect custom labels and custom permissions that are not in use Weekly
Detect unused Apex classes in an org Weekly
Detect unused Connected Apps in an org Weekly
Detect inactive metadata Weekly
Detect missing description on custom field Weekly
Detect underused permission sets Weekly
Detect Apex classes and triggers with deprecated API version Weekly
Detect permission sets with minimal permissions Weekly

Next steps


Dreamforce 24 presentation

Prefer reading? Here are the slides: