Monitoring home
Monitor your Salesforce org with sfdx-hardis
This feature worked yesterday in production, but today it crashes, what happened ?
Instead of reading, watch the presentation at Dreamforce 24 conference in San Francisco !
or if you like reading, here are the slides !
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 know the exact state of 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 sent via Slack or Microsoft Teams.
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).
You can force the daily run of all commands by defining env var MONITORING_IGNORE_FREQUENCY=true
.
Check | Frequency |
---|---|
Metadata Backup | Daily |
Detect suspect setup actions in major org | Daily |
Apex tests | Daily |
Quality Checks with MegaLinter | Daily |
Detect limits issues | Daily |
Detect calls to deprecated API versions | Daily |
Check Release Updates | Weekly |
Detect inactive users | Weekly |
Detect not used Apex Classes (Batch,Schedulable,Queueable) | Weekly |
Detect not used Connected Apps | Weekly |
Detect unused licenses | Weekly |
Detect custom elements with no access rights defined in permission sets | Weekly |
Detect custom labels and custom permissions that are not in use | Weekly |
Detect inactive metadata | Weekly |
Detect missing attributes | Weekly |