Monitoring home
- Monitor your Salesforce org with sfdx-hardis
- How does it work ?
- All Monitoring Commands
- Dreamforce 24 presentation
Monitor your Salesforce org with sfdx-hardis
This feature worked yesterday in production, but today it crashes, what happened ?
Salesforce provide Audit Trail to trace configuration updates in production or sandbox orgs.
You can know who updated what, but not with details (before / after).
Sfdx-hardis monitoring provides a simple way to Backup your orgs metadatas everyday, or even several times a day, and provides an exact and detailed comparison with the previous metadata configuration (using git commits comparison)
Extra indicators are also available out of the box, like:
- Run apex tests (and soon flow tests)
- Analyze the quality and the security of your metadatas with MegaLinter
- Checking org limits
- Be warned of release updates
- Check if you have deprecated api versions called
- Custom command lines that you can define in
.sfdx-hardis.yml
You don't need to work in CI/CD to use Monitoring, it is compliant with any API enabled org :)
Installation and usage are admin-friendly, and notifications can be routed independently to:
- Messaging channels -- Slack and Microsoft Teams
- Email -- any recipient list, with per-notification-type overrides
- API / Grafana / Prometheus -- external endpoints for dashboards (e.g. Grafana Loki, Prometheus)
Each notification type (audit trail, org limits, apex tests, ...) can be configured per channel with its own severity threshold, so you can stream everything to Grafana while keeping Slack/Teams reserved for warnings and errors only. The configuration is fully editable from the VS Code SFDX Hardis extension or directly in .sfdx-hardis.yml.
Example of visualization in Grafana
Example notifications with Slack
Example of a monitoring git repository
How does it work ?
Every night (or even more frequently, according to your schedule), a CI job will be triggered.
It will extract all the metadatas of your org, then push a new commit in the monitoring repository in case there are updates since the latest metadata backup.
Example workflow with GitHub actions
Example diff visualization with GitLens
The list of updated metadatas will be sent via notification to a Slack and/or Microsoft Teams channel.
After the metadata backup, other jobs will be triggered (Apex tests, Code Quality, Legacy API checks + your own commands), and their results will be stored in job artifacts and sent via notifications.
Are you ready ? Configure the monitoring on your orgs !
All Monitoring Commands
The following checks are active out of the box.
In order to avoid to overflow channels of notifications, some commands are run everyday whereas less critical ones are run weekly (on saturday by default).
Each command's cadence is fully customizable per entry in .sfdx-hardis.yml via the monitoringCommands property. Supported frequencies are daily, weekly, biweekly, monthly, and off. For weekly and biweekly you can pick the day with frequencyDay (monday..sunday, default saturday). For monthly you can pick the day of month with frequencyDayOfMonth (1..31, clamped to the last day of shorter months). Pass --force-all to hardis:org:monitor:all (or set env var MONITORING_IGNORE_FREQUENCY=true) to run every command regardless of its configured frequency. See Monitoring configuration for full examples.
Dreamforce 24 presentation
Watch the presentation at Dreamforce 24 conference in San Francisco !
or if you like reading, here are the slides !








