Skip to content

Commit a1b038c

Browse files
narendranandaniya-crestashah-crestakaila-crestnubtron
authored
[AI-4814] DDSaaS: Silverstripe CMS: Integration v1.0.0 (#19364)
* silverstripe-cms-assets * added changes to resolve check failure * resolved ci checks * resolved linting checks * resolved service_checks issue * validate ci configuration * updated spec name * Updated CHANGELOG.md * resolving ci errors * updated test cases * updated e2e test * updated display name * resolving ci errors * Addressed review comments * Update silverstripe_cms_overview.json * added silverstripe docker setup and e2e test * removed service checks * added license headers in test files * Update instance.py * use psycopg2-binary and PyMySQL instead of sqlalchemy * updated import * addressed review comments * Set agent-integrations as codeowner for Silverstripe --------- Co-authored-by: Abhi Shah <abhi.shah@crestdata.ai> Co-authored-by: akaila-crest <abhi.kaila@crestdata.ai> Co-authored-by: Enrico Donnici <enrico.donnici@datadoghq.com>
1 parent 023d963 commit a1b038c

40 files changed

+3036
-0
lines changed

.codecov.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,10 @@ coverage:
566566
target: 75
567567
flags:
568568
- silk
569+
Silverstripe_CMS:
570+
target: 75
571+
flags:
572+
- silverstripe_cms
569573
SingleStore:
570574
target: 75
571575
flags:
@@ -1471,6 +1475,11 @@ flags:
14711475
paths:
14721476
- silk/datadog_checks/silk
14731477
- silk/tests
1478+
silverstripe_cms:
1479+
carryforward: true
1480+
paths:
1481+
- silverstripe_cms/datadog_checks/silverstripe_cms
1482+
- silverstripe_cms/tests
14741483
singlestore:
14751484
carryforward: true
14761485
paths:

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,11 @@ plaid/assets/logs/ @DataDog/saa
459459
/streamnative/manifest.json @DataDog/saas-integrations @DataDog/documentation
460460
/streamnative/assets/logs/ @DataDog/saas-integrations @DataDog/documentation @DataDog/logs-backend
461461

462+
/silverstripe_cms/ @DataDog/agent-integrations
463+
/silverstripe_cms/*.md @DataDog/agent-integrations @DataDog/documentation
464+
/silverstripe_cms/manifest.json @DataDog/agent-integrations @DataDog/documentation
465+
/silverstripe_cms/assets/logs/ @DataDog/agent-integrations @DataDog/documentation @DataDog/logs-backend
466+
462467
/avast/ @DataDog/saas-integrations
463468
/avast/*.md @DataDog/saas-integrations @DataDog/documentation
464469
/avast/manifest.json @DataDog/saas-integrations @DataDog/documentation

.github/workflows/config/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,8 @@ integration/sidekiq:
517517
- sidekiq/**/*
518518
integration/silk:
519519
- silk/**/*
520+
integration/silverstripe_cms:
521+
- silverstripe_cms/**/*
520522
integration/singlestore:
521523
- singlestore/**/*
522524
integration/slurm:

.github/workflows/test-all.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3274,6 +3274,26 @@ jobs:
32743274
minimum-base-package: ${{ inputs.minimum-base-package }}
32753275
pytest-args: ${{ inputs.pytest-args }}
32763276
secrets: inherit
3277+
jdeebd5c:
3278+
uses: ./.github/workflows/test-target.yml
3279+
with:
3280+
job-name: Silverstripe CMS
3281+
target: silverstripe_cms
3282+
platform: linux
3283+
runner: '["ubuntu-22.04"]'
3284+
repo: "${{ inputs.repo }}"
3285+
python-version: "${{ inputs.python-version }}"
3286+
standard: ${{ inputs.standard }}
3287+
latest: ${{ inputs.latest }}
3288+
agent-image: "${{ inputs.agent-image }}"
3289+
agent-image-py2: "${{ inputs.agent-image-py2 }}"
3290+
agent-image-windows: "${{ inputs.agent-image-windows }}"
3291+
agent-image-windows-py2: "${{ inputs.agent-image-windows-py2 }}"
3292+
test-py2: ${{ inputs.test-py2 }}
3293+
test-py3: ${{ inputs.test-py3 }}
3294+
minimum-base-package: ${{ inputs.minimum-base-package }}
3295+
pytest-args: ${{ inputs.pytest-args }}
3296+
secrets: inherit
32773297
j02f6aa9:
32783298
uses: ./.github/workflows/test-target.yml
32793299
with:

silverstripe_cms/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CHANGELOG - Silverstripe CMS
2+
3+
<!-- towncrier release notes start -->

silverstripe_cms/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Silverstripe CMS Datadog Integration
2+
3+
## Overview
4+
5+
Silverstripe CMS is an open-source platform for creating and managing websites and web applications. It offers an intuitive admin panel for easy content editing and customization without coding. Its flexible framework makes it ideal for both simple sites and complex projects.
6+
7+
The SilverStripe CMS integration collects metrics for files, pages, and failed login attempts, and sends them to Datadog for analysis and monitoring.
8+
9+
## Setup
10+
11+
### Installation
12+
13+
The Silverstripe CMS integration is included in the [Datadog Agent package][1]. No additional installation is necessary.
14+
15+
### Get Database credentials from Silverstripe CMS
16+
| **Parameter** | **Description** |
17+
|----------------------|------------------------------------------------------------|
18+
| Database Type | The type of database server, either MySQL or PostgreSQL. |
19+
| Database Name | The name of the configured database. |
20+
| Database Username | The username used to connect to the database. |
21+
| Database Password | The password associated with the database user. |
22+
| Database Server IP | The IP address of the database server. |
23+
| Database Port | The Port Number of the database server. |
24+
25+
### Connect your Silverstripe CMS account to agent
26+
27+
1. Copy the `conf.yaml.example` file.
28+
```sh
29+
cp /etc/datadog-agent/conf.d/silverstripe_cms.d/conf.yaml.example /etc/datadog-agent/conf.d/silverstripe_cms.d/conf.yaml
30+
```
31+
32+
2. Add this configuration block to your `silverstripe_cms.d/conf.yaml` file to start collecting your metrics.
33+
- See the sample [silverstripe_cms.d/conf.yaml][2] for available configuration options.
34+
- If you need to configure multiple instances of Silverstripe CMS in the `conf.yaml` file, reference the following example:
35+
```yaml
36+
init_config:
37+
instances:
38+
- SILVERSTRIPE_DATABASE_TYPE: PostgreSQL
39+
SILVERSTRIPE_DATABASE_NAME: <DATABASE_NAME_1>
40+
SILVERSTRIPE_DATABASE_SERVER_IP: <IPV4>
41+
SILVERSTRIPE_DATABASE_PORT: <PORT_NUMBER>
42+
SILVERSTRIPE_DATABASE_USERNAME: <USERNAME_1>
43+
SILVERSTRIPE_DATABASE_PASSWORD: <PASSWORD_1>
44+
min_collection_interval: 300
45+
- SILVERSTRIPE_DATABASE_TYPE: MySQL
46+
SILVERSTRIPE_DATABASE_NAME: <DATABASE_NAME_2>
47+
SILVERSTRIPE_DATABASE_SERVER_IP: <IPV4>
48+
SILVERSTRIPE_DATABASE_PORT: <PORT_NUMBER>
49+
SILVERSTRIPE_DATABASE_USERNAME: <USERNAME_2>
50+
SILVERSTRIPE_DATABASE_PASSWORD: <PASSWORD_2>
51+
min_collection_interval: 300
52+
```
53+
54+
3. [Restart the Agent][3].
55+
56+
### Validation
57+
58+
- [Run the Agent's status subcommand][4] and look for `silverstripe_cms` under the **Checks** section.
59+
60+
- Alternatively, use the following command to obtain detailed information about the integration:
61+
```sh
62+
sudo datadog-agent check silverstripe_cms
63+
```
64+
65+
The check returns OK if all the configurations are correct and the Agent is able to communicate with Silverstripe CMS.
66+
67+
## Data Collected
68+
69+
### Log
70+
71+
The Silverstripe CMS integration does not include any logs.
72+
73+
### Metrics
74+
75+
The Silverstripe CMS integration collects and forwards the following metrics to Datadog.
76+
77+
{{< get-metrics-from-git "silverstripe_cms" >}}
78+
79+
### Service Checks
80+
81+
The Silverstripe CMS includes service checks that are listed in the [service_checks.json][5] file.
82+
83+
### Events
84+
85+
- `Silverstripe.CMS.silverstripe_cms_authentication` triggered for authentication of the provided parameters.
86+
87+
## Uninstallation
88+
89+
For integrations running on the Agent:
90+
91+
- Fully remove the integration using the `datadog-agent integration remove` command. For more information, see [Integration management][6].
92+
93+
## Support
94+
95+
For further assistance, contact [Datadog support][7].
96+
97+
[1]: https://app.datadoghq.com/account/settings/agent/latest
98+
[2]: https://github.com/DataDog/integrations-core/blob/master/silverstripe_cms/datadog_checks/silverstripe_cms/data/conf.yaml.example
99+
[3]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent
100+
[4]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information
101+
[5]: https://github.com/DataDog/integrations-core/blob/master/silverstripe_cms/assets/service_checks.json
102+
[6]: https://docs.datadoghq.com/agent/guide/integration-management/?tab=linux#remove
103+
[7]: https://docs.datadoghq.com/help
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Silverstripe CMS
2+
files:
3+
- name: silverstripe_cms.yaml
4+
options:
5+
- template: instances
6+
options:
7+
- name: SILVERSTRIPE_DATABASE_TYPE
8+
required: true
9+
description: "Silverstripe Database Type (MySQL or PostgreSQL)."
10+
value:
11+
type: string
12+
example: "<DATABASE_TYPE>"
13+
- name: SILVERSTRIPE_DATABASE_NAME
14+
required: true
15+
description: "Silverstripe Database Name."
16+
value:
17+
type: string
18+
example: "<DATABASE_NAME>"
19+
- name: SILVERSTRIPE_DATABASE_SERVER_IP
20+
required: true
21+
description: "Silverstripe Database Server IP."
22+
value:
23+
type: string
24+
example: "<IP_ADDRESS>"
25+
- name: SILVERSTRIPE_DATABASE_PORT
26+
required: true
27+
description: "Silverstripe Database Port."
28+
value:
29+
type: integer
30+
minimum: 0
31+
maximum: 65535
32+
example: 5432
33+
- name: SILVERSTRIPE_DATABASE_USERNAME
34+
required: true
35+
description: "Silverstripe Database Username."
36+
value:
37+
type: string
38+
example: "<USERNAME>"
39+
- name: SILVERSTRIPE_DATABASE_PASSWORD
40+
required: true
41+
description: "Silverstripe Database Password."
42+
value:
43+
type: string
44+
example: "<PASSWORD>"
45+
- template: instances/default
46+
overrides:
47+
min_collection_interval.required: true
48+
min_collection_interval.value.example: 15
49+
min_collection_interval.value.minimum: 1
50+
min_collection_interval.value.maximum: 14400
51+
service.hidden: true
52+
empty_default_hostname.hidden: true
53+
metric_patterns.hidden: true

0 commit comments

Comments
 (0)