Skip to content

Commit

Permalink
Update monitoring commands documentation (#665)
Browse files Browse the repository at this point in the history
* Update monitoring commands documentation

* [Mega-Linter] Apply linters fixes :)

---------

Co-authored-by: nvuillam <[email protected]>
  • Loading branch information
nvuillam and nvuillam authored Aug 6, 2024
1 parent 319b7de commit 333cf2d
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 17 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta`

- Update monitoring commands documentation

## [4.52.0] 2024-08-02

- **Minimum Node version is now 20**
Expand Down
4 changes: 2 additions & 2 deletions docs/salesforce-deployment-assistant-error-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ You probably also need to add CRM Analytics Admin Permission Set assignment to t
---
## Error parsing file
- `Error (.*) Error parsing file: (.*) `
- `Error (.*) Error parsing file: (.*)`
**Resolution tip**
Expand Down Expand Up @@ -1012,7 +1012,7 @@ Please check https://developer.salesforce.com/forums/?id=9060G0000005kVLQAY
---
## Test classes with 0% coverage
- ` 0%`
- `0%`
**Resolution tip**
Expand Down
5 changes: 4 additions & 1 deletion src/commands/hardis/lint/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const messages = Messages.loadMessages("sfdx-hardis", "org");
export default class Access extends SfdxCommand {
public static title = "check permission access";

public static description = "Check if elements(apex class and field) are at least in one permission set";
public static description = `Check if elements(apex class and field) are at least in one permission set
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-missing-access/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = [
"$ sfdx hardis:lint:access",
Expand Down
5 changes: 4 additions & 1 deletion src/commands/hardis/lint/metadatastatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const messages = Messages.loadMessages("sfdx-hardis", "org");
/* jscpd:ignore-end */
export default class metadatastatus extends SfdxCommand {
public static title = "check inactive metadatas";
public static description = "Check if elements(flows) are inactive in the project";
public static description = `Check if elements (flows and validation rules) are inactive in the project
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-metadata/) and can output Grafana, Slack and MsTeams Notifications.
`;
public static examples = ["$ sfdx hardis:lint:metadatastatus"];
/* jscpd:ignore-start */
protected static flagsConfig = {
Expand Down
5 changes: 4 additions & 1 deletion src/commands/hardis/lint/unusedmetadatas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ const messages = Messages.loadMessages("sfdx-hardis", "org");
/* jscpd:ignore-end */
export default class UnusedMetadatas extends SfdxCommand {
public static title = "check unused labels and custom permissions";
public static description = "Check if elements (custom labels and custom permissions) are used in the project";
public static description = `Check if elements (custom labels and custom permissions) are used in the project
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-metadata/) and can output Grafana, Slack and MsTeams Notifications.
`;
public static examples = ["$ sfdx hardis:lint:unusedmetadatas"];
/* jscpd:ignore-start */
protected static flagsConfig = {
Expand Down
4 changes: 3 additions & 1 deletion src/commands/hardis/org/diagnose/audittrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ monitoringAllowedSectionsActions:
"Some section": [] // Will ignore all actions from such section
"Some other section": ["actionType1","actionType2","actionType3"] // Will ignore only those 3 actions from section "Some other section". Other actions in the same section will be considered as suspect.
\`\`\`
`;
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = [
"$ sfdx hardis:org:diagnose:audittrail",
Expand Down
1 change: 1 addition & 0 deletions src/commands/hardis/org/diagnose/legacyapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ See article below
[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = [
Expand Down
14 changes: 8 additions & 6 deletions src/commands/hardis/org/diagnose/unusedlicenses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@ Messages.importMessagesDirectory(__dirname);
const messages = Messages.loadMessages("sfdx-hardis", "org");

export default class DiagnoseUnusedLicenses extends SfdxCommand {
public static title = "Detect unused Permission Set Licenses";
public static title = "Detect unused Permission Set Licenses (beta)";

public static description = `When you assign a Permission Set to a user, and that this Permission Set is related to a Permission Set License, a Permission Set License Assignment is automatically created for the user.
But when you unassign this Permission Set from the user, **the Permission Set License Assignment is not deleted**.
But when you unassign this Permission Set from the user, **the Permission Set License Assignment is not deleted**.
This leads that you can be **charged for Permission Set Licenses that are not used** !
This leads that you can be **charged for Permission Set Licenses that are not used** !
This command detects such useless Permission Set Licenses Assignments and suggests to delete them.
This command detects such useless Permission Set Licenses Assignments and suggests to delete them.
Many thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)
`;
Many thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = ["$ sfdx hardis:org:diagnose:unusedlicenses", "$ sfdx hardis:org:diagnose:unusedlicenses --fix"];

Expand Down
2 changes: 2 additions & 0 deletions src/commands/hardis/org/diagnose/unusedusers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ licensetypes values are the following:
Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm)
Use --returnactiveusers to revert the command and retrieve active users that has logged in during the period.
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = [
Expand Down
6 changes: 5 additions & 1 deletion src/commands/hardis/org/monitor/backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ export default class MonitorBackup extends SfdxCommand {
public static title = "Backup DX sources";

public static description = `Retrieve sfdx sources in the context of a monitoring backup
Automatically skips metadatas from installed packages with namespace.
You can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:
- Manual update of \`manifest/package-skip-items.xml\` config file (then commit & push in the same branch)
- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: \`MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation\`): that will be applied to all monitoring branches.
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = ["$ sfdx hardis:org:monitor:backup"];
Expand Down
5 changes: 2 additions & 3 deletions src/commands/hardis/org/monitor/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ const messages = Messages.loadMessages("sfdx-hardis", "org");
export default class MonitorBackup extends SfdxCommand {
public static title = "Check org limits";

public static description = `Check limits of a SF org and send related notifications
Used in [sfdx-hardis monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-limits/) to send messages to Slack, Teams, Email and Grafana.
public static description = `Check limits of a SF org and send notifications about limits are superior to 50%, 75% or 100%.
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-limits/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = ["$ sfdx hardis:org:monitor:limits"];
Expand Down
4 changes: 3 additions & 1 deletion src/commands/hardis/org/test/apex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ If following configuration is defined, it will fail if apex coverage target is n
- Env \`APEX_TESTS_MIN_COVERAGE_ORG_WIDE\` or \`.sfdx-hardis\` property \`apexTestsMinCoverageOrgWide\`
- Env \`APEX_TESTS_MIN_COVERAGE_ORG_WIDE\` or \`.sfdx-hardis\` property \`apexTestsMinCoverageOrgWide\`
You can override env var SFDX_TEST_WAIT_MINUTES to wait more than 60 minutes
You can override env var SFDX_TEST_WAIT_MINUTES to wait more than 60 minutes.
This command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.
`;

public static examples = ["$ sfdx hardis:org:test:apex"];
Expand Down

0 comments on commit 333cf2d

Please sign in to comment.