hardis:org:monitor:all
Description
Monitor org, generate reports and sends notifications
You can disable some commands defining either a monitoringDisable property in .sfdx-hardis.yml
, or a comma separated list in env variable MONITORING_DISABLE
Example in .sfdx-hardis.yml:
monitoringDisable:
- METADATA_STATUS
- MISSING_ATTRIBUTES
- UNUSED_METADATAS
Example in env var:
MONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS
A default list of monitoring commands is used, if you want to override it you can define property monitoringCommands in your .sfdx-hardis.yml file
Example:
monitoringCommands:
- title: My Custom command
command: sf my:custom:command
- title: My Custom command 2
command: sf my:other:custom:command
You can force the daily run of all commands by defining env var MONITORING_IGNORE_FREQUENCY=true
The default list of commands is the following:
Key | Description | Command | Frequency |
---|---|---|---|
AUDIT_TRAIL | Detect suspect setup actions in major org | sf hardis:org:diagnose:audittrail | daily |
LEGACY_API | Detect calls to deprecated API versions | sf hardis:org:diagnose:legacyapi | daily |
ORG_LIMITS | Detect if org limits are close to be reached | sf hardis:org:monitor:limits | daily |
LICENSES | Extract licenses information | sf hardis:org:diagnose:licenses | weekly |
LINT_ACCESS | Detect custom elements with no access rights defined in permission sets | sf hardis:lint:access | weekly |
UNUSED_LICENSES | Detect permission set licenses that are assigned to users that do not need them | sf hardis:org:diagnose:unusedlicenses | weekly |
UNUSED_USERS | Detect active users without recent logins | sf hardis:org:diagnose:unusedusers | weekly |
ACTIVE_USERS | Detect active users with recent logins | sf hardis:org:diagnose:unusedusers --returnactiveusers | weekly |
ORG_INFO | Get org info + SF instance info + next major upgrade date | sf hardis:org:diagnose:instanceupgrade | weekly |
RELEASE_UPDATES | Gather warnings about incoming and overdue Release Updates | sf hardis:org:diagnose:releaseupdates | weekly |
UNUSED_METADATAS | Detect custom labels and custom permissions that are not in use | sf hardis:lint:unusedmetadatas | weekly |
UNUSED_APEX_CLASSES | Detect unused Apex classes in an org | sf hardis:org:diagnose:unused-apex-classes | weekly |
CONNECTED_APPS | Detect unused Connected Apps in an org | sf hardis:org:diagnose:unused-connected-apps | weekly |
METADATA_STATUS | Detect inactive metadata | sf hardis:lint:metadatastatus | weekly |
MISSING_ATTRIBUTES | Detect missing description on custom field | sf hardis:lint:missingattributes | weekly |
Parameters
Name | Type | Description | Default | Required | Options |
---|---|---|---|---|---|
debug -d |
boolean | Activate debug mode (more logs) | |||
flags-dir | option | undefined | |||
json | boolean | Format output as json. | |||
skipauth | boolean | Skip authentication check when a default username is required | |||
target-org -o |
option | undefined | |||
websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration |
Examples
$ sf hardis:org:monitor:all