From f8fe6a7ebf34f8860457ecb2b6d511b80a807e9d Mon Sep 17 00:00:00 2001 From: Mohammad Rafi Date: Tue, 13 May 2025 15:26:28 -0400 Subject: [PATCH 1/5] adding Windows Certificate Store check --- .github/CODEOWNERS | 3 + .github/workflows/config/labeler.yml | 2 + windows_certificate/CHANGELOG.md | 4 + windows_certificate/README.md | 54 ++++++ .../assets/dashboards/overview.json | 169 ++++++++++++++++++ .../windows_certificate_overview.json | 127 +++++++++++++ .../windows_certificate_expiration.json | 35 ++++ .../assets/service_checks.json | 22 +++ windows_certificate/changelog.d/1.added | 1 + windows_certificate/manifest.json | 52 ++++++ windows_certificate/metadata.csv | 2 + 11 files changed, 471 insertions(+) create mode 100644 windows_certificate/CHANGELOG.md create mode 100644 windows_certificate/README.md create mode 100644 windows_certificate/assets/dashboards/overview.json create mode 100644 windows_certificate/assets/dashboards/windows_certificate_overview.json create mode 100644 windows_certificate/assets/monitors/windows_certificate_expiration.json create mode 100644 windows_certificate/assets/service_checks.json create mode 100644 windows_certificate/changelog.d/1.added create mode 100644 windows_certificate/manifest.json create mode 100644 windows_certificate/metadata.csv diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dabb5a42638d2..9d2b765cc9f98 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -193,6 +193,9 @@ datadog_checks_base/datadog_checks/base/checks/windows/ @DataDog/wi /win32_event_log/ @DataDog/windows-agent @DataDog/agent-integrations /win32_event_log/*.md @DataDog/windows-agent @DataDog/agent-integrations @DataDog/documentation /win32_event_log/manifest.json @DataDog/windows-agent @DataDog/agent-integrations @DataDog/documentation +/windows_certificate/ @DataDog/windows-agent @DataDog/agent-integrations +/windows_certificate/*.md @DataDog/windows-agent @DataDog/agent-integrations @DataDog/documentation +/windows_certificate/manifest.json @DataDog/windows-agent @DataDog/agent-integrations @DataDog/documentation /windows_performance_counters/ @DataDog/windows-agent @DataDog/agent-integrations /windows_performance_counters/*.md @DataDog/windows-agent @DataDog/agent-integrations @DataDog/documentation /windows_performance_counters/manifest.json @DataDog/windows-agent @DataDog/agent-integrations @DataDog/documentation diff --git a/.github/workflows/config/labeler.yml b/.github/workflows/config/labeler.yml index 9c86171272051..5ab652fa5fbd2 100644 --- a/.github/workflows/config/labeler.yml +++ b/.github/workflows/config/labeler.yml @@ -683,6 +683,8 @@ integration/win32_event_log: - win32_event_log/**/* integration/wincrashdetect: - wincrashdetect/**/* +integration/windows_certificate: +- windows_certificate/**/* integration/windows_performance_counters: - windows_performance_counters/**/* integration/windows_registry: diff --git a/windows_certificate/CHANGELOG.md b/windows_certificate/CHANGELOG.md new file mode 100644 index 0000000000000..37d16f35fc86c --- /dev/null +++ b/windows_certificate/CHANGELOG.md @@ -0,0 +1,4 @@ +# CHANGELOG - windows_certificate + + + diff --git a/windows_certificate/README.md b/windows_certificate/README.md new file mode 100644 index 0000000000000..16f0f9ba96cd1 --- /dev/null +++ b/windows_certificate/README.md @@ -0,0 +1,54 @@ +# Agent Check: Windows Certificate Store + +## Overview + +This check monitors the [Windows Certificate Store][1] for ceritificate expiration. + +## Setup + +Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. + +### Installation + +The windows_certificate check is included in the [Datadog Agent][2] package. No additional installation is needed. + +### Configuration + +1. Edit the `windows_certificate.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your windows_certificate performance data. See the [sample windows_certificate.d/conf.yaml][4] for all available configuration options. + +2. [Restart the Agent][5]. + +### Validation + +[Run the Agent's status subcommand][6] and look for `windows_certificate` under the Checks section. + +## Data Collected + +### Metrics + +See [metadata.csv][7] for a list of metrics provided by this integration. + +### Events + +The windows_certificate integration does not include any events. + +### Service Checks + +The windows_certificate integration does not include any service checks. + +See [service_checks.json][8] for a list of service checks provided by this integration. + +## Troubleshooting + +Need help? Contact [Datadog support][9]. + + +[1]: **LINK_TO_INTEGRATION_SITE** +[2]: https://app.datadoghq.com/account/settings/agent/latest +[3]: https://docs.datadoghq.com/agent/kubernetes/integrations/ +[4]: https://github.com/DataDog/integrations-core/blob/master/windows_certificate/datadog_checks/windows_certificate/data/conf.yaml.example +[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent +[6]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information +[7]: https://github.com/DataDog/integrations-core/blob/master/windows_certificate/metadata.csv +[8]: https://github.com/DataDog/integrations-core/blob/master/windows_certificate/assets/service_checks.json +[9]: https://docs.datadoghq.com/help/ diff --git a/windows_certificate/assets/dashboards/overview.json b/windows_certificate/assets/dashboards/overview.json new file mode 100644 index 0000000000000..e8412ea00c2e3 --- /dev/null +++ b/windows_certificate/assets/dashboards/overview.json @@ -0,0 +1,169 @@ +{ + "author_name": "Datadog", + "description": "## Windows Certificate Store Integration Dashboard\n\nThis is an example Windows Certificate Store dashboard demonstrating the information that the integration collects.", + "layout_type": "ordered", + "template_variables": [ + { + "available_values": [], + "default": "*", + "name": "certificate_store", + "prefix": "certificate_store" + }, + { + "available_values": [], + "default": "*", + "name": "subject_common_name", + "prefix": "subject_cn" + } + ], + "title": "Windows Certificate Store Overview", + "widgets": [ + { + "definition": { + "banner_img": "/static/images/logos/windows_small.svg", + "layout_type": "ordered", + "show_title": true, + "title": "Windows Certificate Store", + "type": "group", + "widgets": [] + }, + "id": 1332720998004105, + "layout": { + "height": 5, + "width": 4, + "x": 0, + "y": 0 + } + }, + { + "definition": { + "background_color": "vivid_blue", + "layout_type": "ordered", + "show_title": true, + "title": "Certificate Expiration", + "type": "group", + "widgets": [ + { + "definition": { + "check": "windows_certificate.cert_expiration", + "group_by": [], + "grouping": "cluster", + "tags": [ + "$certificate_store", + "$subject_common_name" + ], + "title": "Certificate Expiration", + "title_align": "center", + "title_size": "16", + "type": "check_status" + }, + "id": 5168903633321084, + "layout": { + "height": 2, + "width": 4, + "x": 0, + "y": 0 + } + }, + { + "definition": { + "background_color": "yellow", + "content": "Included service check:\n\n* `windows_certificate.cert_expiration` - Returns CRITICAL if the certificate has expired or expires in less than `days_critical`, returns WARNING if the certificate expires in less than `days_warning`, otherwise returns OK.", + "font_size": "14", + "has_padding": true, + "show_tick": true, + "text_align": "left", + "tick_edge": "left", + "tick_pos": "50%", + "type": "note", + "vertical_align": "center" + }, + "id": 6717423497232037, + "layout": { + "height": 2, + "width": 4, + "x": 4, + "y": 0 + } + }, + { + "definition": { + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "legend_layout": "auto", + "requests": [ + { + "display_type": "line", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:windows_certificate.days_remaining{$certificate_store, $subject_common_name} by {subject_cn}" + } + ], + "response_format": "timeseries", + "style": { + "line_type": "solid", + "line_width": "normal", + "order_by": "values", + "palette": "dog_classic" + } + } + ], + "show_legend": true, + "title": "Days Till Expiration", + "title_align": "left", + "title_size": "16", + "type": "timeseries" + }, + "id": 4514519614660249, + "layout": { + "height": 2, + "width": 4, + "x": 0, + "y": 2 + } + }, + { + "definition": { + "background_color": "yellow", + "content": "Days until certificate(s) expire", + "font_size": "14", + "has_padding": true, + "show_tick": true, + "text_align": "left", + "tick_edge": "left", + "tick_pos": "50%", + "type": "note", + "vertical_align": "center" + }, + "id": 3226539913664578, + "layout": { + "height": 1, + "width": 4, + "x": 4, + "y": 2 + } + } + ] + }, + "id": 3432759619201891, + "layout": { + "height": 5, + "width": 8, + "x": 4, + "y": 0 + } + } + ] +} \ No newline at end of file diff --git a/windows_certificate/assets/dashboards/windows_certificate_overview.json b/windows_certificate/assets/dashboards/windows_certificate_overview.json new file mode 100644 index 0000000000000..aa193f0daaf81 --- /dev/null +++ b/windows_certificate/assets/dashboards/windows_certificate_overview.json @@ -0,0 +1,127 @@ +{ + "title": "Windows Certificate Store Overview", + "description": "## Windows Certificate Store Integration Dashboard\n\nThis is an example Windows Certificate Store dashboard demonstrating the information that the integration collects.", + "widgets": [ + { + "id": 1332720998004105, + "definition": { + "title": "Windows Certificate Store", + "banner_img": "/static/images/logos/windows_small.svg", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [] + }, + "layout": { "x": 0, "y": 0, "width": 4, "height": 5 } + }, + { + "id": 3432759619201891, + "definition": { + "title": "Certificate Expiration", + "background_color": "vivid_blue", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 5168903633321084, + "definition": { + "title": "Certificate Expiration", + "title_size": "16", + "title_align": "center", + "type": "check_status", + "check": "windows_certificate.cert_expiration", + "grouping": "cluster", + "group_by": [], + "tags": ["$certificate_store", "$subject_common_name"] + }, + "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } + }, + { + "id": 6717423497232037, + "definition": { + "type": "note", + "content": "Included service check:\n\n* `windows_certificate.cert_expiration` - Returns CRITICAL if the certificate has expired or expires in less than `days_critical`, returns WARNING if the certificate expires in less than `days_warning`, otherwise returns OK.", + "background_color": "yellow", + "font_size": "14", + "text_align": "left", + "vertical_align": "center", + "show_tick": true, + "tick_pos": "50%", + "tick_edge": "left", + "has_padding": true + }, + "layout": { "x": 4, "y": 0, "width": 4, "height": 2 } + }, + { + "id": 4514519614660249, + "definition": { + "title": "Days Till Expiration", + "title_size": "16", + "title_align": "left", + "show_legend": true, + "legend_layout": "auto", + "legend_columns": ["avg", "min", "max", "value", "sum"], + "type": "timeseries", + "requests": [ + { + "formulas": [{ "formula": "query1" }], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:windows_certificate.days_remaining{$certificate_store, $subject_common_name} by {subject_cn}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "order_by": "values", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ] + }, + "layout": { "x": 0, "y": 2, "width": 4, "height": 2 } + }, + { + "id": 3226539913664578, + "definition": { + "type": "note", + "content": "Days until certificate(s) expire", + "background_color": "yellow", + "font_size": "14", + "text_align": "left", + "vertical_align": "center", + "show_tick": true, + "tick_pos": "50%", + "tick_edge": "left", + "has_padding": true + }, + "layout": { "x": 4, "y": 2, "width": 4, "height": 1 } + } + ] + }, + "layout": { "x": 4, "y": 0, "width": 8, "height": 5 } + } + ], + "template_variables": [ + { + "name": "certificate_store", + "prefix": "certificate_store", + "available_values": [], + "default": "*" + }, + { + "name": "subject_common_name", + "prefix": "subject_cn", + "available_values": [], + "default": "*" + } + ], + "layout_type": "ordered", + "notify_list": [], + "reflow_type": "fixed" +} diff --git a/windows_certificate/assets/monitors/windows_certificate_expiration.json b/windows_certificate/assets/monitors/windows_certificate_expiration.json new file mode 100644 index 0000000000000..4f8d15222f93a --- /dev/null +++ b/windows_certificate/assets/monitors/windows_certificate_expiration.json @@ -0,0 +1,35 @@ +{ + "version": 2, + "created_at": "2025-05-13", + "last_updated_at": "2025-05-13", + "title": "Windows Certificate Store: Certificate expiring/expired", + "description": "This monitor alerts when there are certificates in the Windows Certificate Store that are expired or close to expiring.", + "tags": [ + "integration:windows_certificate" + ], + "definition": { + "name": "A certificate is expired or about to expire", + "type": "service check", + "query": "\"windows_certificate.cert_expiration\".over(\"*\").by(\"certificate_store\",\"host\",\"subject_cn\").last(2).count_by_status()", + "message": "The Windows Certificate integration is reporting the following for Certificate: {{subject_cn.name}} in Store: {{certificate_store.name}}\n\n{{#is_warning}}\n\nWarning: {{check_message}}\n\n{{/is_warning}}\n\n{{#is_alert}}\n\nAlert: {{check_message}}\n\n{{/is_alert}}", + "tags": [ + "integration:windows_certificate" + ], + "options": { + "thresholds": { + "critical": 1, + "warning": 1, + "ok": 1 + }, + "notify_audit": false, + "notify_no_data": false, + "renotify_interval": 0, + "timeout_h": 0, + "threshold_windows": null, + "include_tags": true, + "new_group_delay": 60, + "avalanche_window": 10 + }, + "priority": null + } + } \ No newline at end of file diff --git a/windows_certificate/assets/service_checks.json b/windows_certificate/assets/service_checks.json new file mode 100644 index 0000000000000..f19363ebbf321 --- /dev/null +++ b/windows_certificate/assets/service_checks.json @@ -0,0 +1,22 @@ +[ + { + "agent_version": "7.67.0", + "integration": "Windows Certificate Store", + "groups": [ + "certificate_store", + "subject_cn", + "subject_ou", + "subject_c", + "subject_o", + "subject_l" + ], + "check": "windows_certificate.cert_expiration", + "statuses": [ + "ok", + "critical", + "warning" + ], + "name": "Certificate validation", + "description": "Returns `CRITICAL` if the certificate has expired or expires in less than `days_critical`, returns `WARNING` if the certificate expires in less than `days_warning`, otherwise returns `OK`." + } +] diff --git a/windows_certificate/changelog.d/1.added b/windows_certificate/changelog.d/1.added new file mode 100644 index 0000000000000..aa949b47b7b41 --- /dev/null +++ b/windows_certificate/changelog.d/1.added @@ -0,0 +1 @@ +Initial Release \ No newline at end of file diff --git a/windows_certificate/manifest.json b/windows_certificate/manifest.json new file mode 100644 index 0000000000000..3e5cd7308ae4b --- /dev/null +++ b/windows_certificate/manifest.json @@ -0,0 +1,52 @@ +{ + "manifest_version": "2.0.0", + "app_uuid": "67feed3c-1676-4d6b-9d72-3ca8c0a6e3dc", + "app_id": "windows-certificate", + "display_on_public_website": false, + "tile": { + "overview": "README.md#Overview", + "configuration": "README.md#Setup", + "support": "README.md#Support", + "changelog": "CHANGELOG.md", + "description": "Monitor your Windows hosts' certificates stores for certificate expiration.", + "title": "Windows Certificate Store", + "media": [], + "classifier_tags": [ + "Supported OS::Windows", + "Category::OS & System", + "Category::Windows", + "Offering::Integration" + ] + }, + "assets": { + "integration": { + "auto_install": true, + "source_type_id": 46050783, + "source_type_name": "Windows Certificate Store", + "configuration": {}, + "events": { + "creates_events": false + }, + "metrics": { + "prefix": "windows_certificate.", + "check": "windows_certificate.days_remaining", + "metadata_path": "metadata.csv" + }, + "service_checks": { + "metadata_path": "assets/service_checks.json" + } + }, + "dashboards": { + "windows_certificate_overview": "assets/dashboards/windows_certificate_overview.json", + "Windows Certificate Store Overview": "assets/dashboards/overview.json" + }, + "monitors": {}, + "saved_views": {} + }, + "author": { + "support_email": "help@datadoghq.com", + "name": "Datadog", + "homepage": "https://www.datadoghq.com", + "sales_email": "info@datadoghq.com" + } +} diff --git a/windows_certificate/metadata.csv b/windows_certificate/metadata.csv new file mode 100644 index 0000000000000..a80dce66292f9 --- /dev/null +++ b/windows_certificate/metadata.csv @@ -0,0 +1,2 @@ +metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags +windows_certificate.days_remaining,gauge,,day,,Days until certificate expiration,1,windows_certificate_store,Days until expiration,, From 18080e3b812e34ad99822b28f2ca79fda42131a1 Mon Sep 17 00:00:00 2001 From: Mohammad Rafi <36865458+mrafi97@users.noreply.github.com> Date: Wed, 14 May 2025 13:58:57 -0400 Subject: [PATCH 2/5] Update README.md --- windows_certificate/README.md | 44 ++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/windows_certificate/README.md b/windows_certificate/README.md index 16f0f9ba96cd1..5f1b278ec6462 100644 --- a/windows_certificate/README.md +++ b/windows_certificate/README.md @@ -2,21 +2,44 @@ ## Overview -This check monitors the [Windows Certificate Store][1] for ceritificate expiration. +This check monitors the Local Machine certificates in the [Windows Certificate Store][1] for ceritificate expiration. ## Setup -Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions. - ### Installation -The windows_certificate check is included in the [Datadog Agent][2] package. No additional installation is needed. +The Windows Certificate Store check is included in the [Datadog Agent][2] package. Please see the next section to configure the check. ### Configuration -1. Edit the `windows_certificate.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your windows_certificate performance data. See the [sample windows_certificate.d/conf.yaml][4] for all available configuration options. - -2. [Restart the Agent][5]. +Edit the `windows_certificate.d/conf.yaml` file, in the `conf.d/` folder at the root of your [Agent's configuration directory][10]. See the [sample windows_certificate.d/conf.yaml][4] for all available configuration options. When you are done editing the configuration file, [restart the Agent][5] to load the new configuration. + +The check can monitor the expiration of all certiificates in a given store or selectively monitor a few certificates by a given list of strings matching with the certificate subjects. Enter the store name as found in `HKEY_LOCAL_MACHINE\Software\Microsoft\SystemCertificates`. + +This example configuration monitors all certificates in the local machine's `ROOT` store: + +```yaml +instances: + - certificate_store: ROOT +``` +This example configuraiton monitors ceritificates in `ROOT` that have `microsoft` or `verisign` in the subject: +```yaml +instances: + - certificate_store: ROOT + certificate_subjects: + - microsoft + - verisign +``` +The parameters `days_warning` and `days_critical` are used to specify the number of days before certificate expiration from which the service check `windows_certificate.cert_expiration` begins emitting WARNING/CRITICAL. In the below example the service check will emit a WARNING when a certificate is 10 days from expiring and CRITICAL when it is 5 days away from expiring: +```yaml +instances: + - certificate_store: ROOT + certificate_subjects: + - microsoft + - verisign + days_warning: 10 + days_critical: 5 +``` ### Validation @@ -34,8 +57,6 @@ The windows_certificate integration does not include any events. ### Service Checks -The windows_certificate integration does not include any service checks. - See [service_checks.json][8] for a list of service checks provided by this integration. ## Troubleshooting @@ -43,12 +64,13 @@ See [service_checks.json][8] for a list of service checks provided by this integ Need help? Contact [Datadog support][9]. -[1]: **LINK_TO_INTEGRATION_SITE** +[1]: https://learn.microsoft.com/en-us/windows-hardware/drivers/install/certificate-stores [2]: https://app.datadoghq.com/account/settings/agent/latest [3]: https://docs.datadoghq.com/agent/kubernetes/integrations/ -[4]: https://github.com/DataDog/integrations-core/blob/master/windows_certificate/datadog_checks/windows_certificate/data/conf.yaml.example +[4]: https://github.com/DataDog/datadog-agent/blob/main/cmd/agent/dist/conf.d/windows_certificate.d/conf.yaml.example [5]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent [6]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information [7]: https://github.com/DataDog/integrations-core/blob/master/windows_certificate/metadata.csv [8]: https://github.com/DataDog/integrations-core/blob/master/windows_certificate/assets/service_checks.json [9]: https://docs.datadoghq.com/help/ +[10]: https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory From 4c2d91bdf8211f564ce4889fe37a2fc55e254d6b Mon Sep 17 00:00:00 2001 From: Mohammad Rafi Date: Tue, 20 May 2025 10:26:05 -0400 Subject: [PATCH 3/5] updating manifest, dashboard, and changelog --- windows_certificate/CHANGELOG.md | 5 +- .../assets/dashboards/overview.json | 169 ----------- .../windows_certificate_overview.json | 282 ++++++++++-------- windows_certificate/changelog.d/1.added | 1 - windows_certificate/manifest.json | 10 +- 5 files changed, 172 insertions(+), 295 deletions(-) delete mode 100644 windows_certificate/assets/dashboards/overview.json delete mode 100644 windows_certificate/changelog.d/1.added diff --git a/windows_certificate/CHANGELOG.md b/windows_certificate/CHANGELOG.md index 37d16f35fc86c..a2c796d77d647 100644 --- a/windows_certificate/CHANGELOG.md +++ b/windows_certificate/CHANGELOG.md @@ -1,4 +1,7 @@ # CHANGELOG - windows_certificate - +## 1.0.0 / 2025-05-20 +***Added***: + +* Initial Release diff --git a/windows_certificate/assets/dashboards/overview.json b/windows_certificate/assets/dashboards/overview.json deleted file mode 100644 index e8412ea00c2e3..0000000000000 --- a/windows_certificate/assets/dashboards/overview.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "author_name": "Datadog", - "description": "## Windows Certificate Store Integration Dashboard\n\nThis is an example Windows Certificate Store dashboard demonstrating the information that the integration collects.", - "layout_type": "ordered", - "template_variables": [ - { - "available_values": [], - "default": "*", - "name": "certificate_store", - "prefix": "certificate_store" - }, - { - "available_values": [], - "default": "*", - "name": "subject_common_name", - "prefix": "subject_cn" - } - ], - "title": "Windows Certificate Store Overview", - "widgets": [ - { - "definition": { - "banner_img": "/static/images/logos/windows_small.svg", - "layout_type": "ordered", - "show_title": true, - "title": "Windows Certificate Store", - "type": "group", - "widgets": [] - }, - "id": 1332720998004105, - "layout": { - "height": 5, - "width": 4, - "x": 0, - "y": 0 - } - }, - { - "definition": { - "background_color": "vivid_blue", - "layout_type": "ordered", - "show_title": true, - "title": "Certificate Expiration", - "type": "group", - "widgets": [ - { - "definition": { - "check": "windows_certificate.cert_expiration", - "group_by": [], - "grouping": "cluster", - "tags": [ - "$certificate_store", - "$subject_common_name" - ], - "title": "Certificate Expiration", - "title_align": "center", - "title_size": "16", - "type": "check_status" - }, - "id": 5168903633321084, - "layout": { - "height": 2, - "width": 4, - "x": 0, - "y": 0 - } - }, - { - "definition": { - "background_color": "yellow", - "content": "Included service check:\n\n* `windows_certificate.cert_expiration` - Returns CRITICAL if the certificate has expired or expires in less than `days_critical`, returns WARNING if the certificate expires in less than `days_warning`, otherwise returns OK.", - "font_size": "14", - "has_padding": true, - "show_tick": true, - "text_align": "left", - "tick_edge": "left", - "tick_pos": "50%", - "type": "note", - "vertical_align": "center" - }, - "id": 6717423497232037, - "layout": { - "height": 2, - "width": 4, - "x": 4, - "y": 0 - } - }, - { - "definition": { - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "legend_layout": "auto", - "requests": [ - { - "display_type": "line", - "formulas": [ - { - "formula": "query1" - } - ], - "queries": [ - { - "data_source": "metrics", - "name": "query1", - "query": "avg:windows_certificate.days_remaining{$certificate_store, $subject_common_name} by {subject_cn}" - } - ], - "response_format": "timeseries", - "style": { - "line_type": "solid", - "line_width": "normal", - "order_by": "values", - "palette": "dog_classic" - } - } - ], - "show_legend": true, - "title": "Days Till Expiration", - "title_align": "left", - "title_size": "16", - "type": "timeseries" - }, - "id": 4514519614660249, - "layout": { - "height": 2, - "width": 4, - "x": 0, - "y": 2 - } - }, - { - "definition": { - "background_color": "yellow", - "content": "Days until certificate(s) expire", - "font_size": "14", - "has_padding": true, - "show_tick": true, - "text_align": "left", - "tick_edge": "left", - "tick_pos": "50%", - "type": "note", - "vertical_align": "center" - }, - "id": 3226539913664578, - "layout": { - "height": 1, - "width": 4, - "x": 4, - "y": 2 - } - } - ] - }, - "id": 3432759619201891, - "layout": { - "height": 5, - "width": 8, - "x": 4, - "y": 0 - } - } - ] -} \ No newline at end of file diff --git a/windows_certificate/assets/dashboards/windows_certificate_overview.json b/windows_certificate/assets/dashboards/windows_certificate_overview.json index aa193f0daaf81..e8412ea00c2e3 100644 --- a/windows_certificate/assets/dashboards/windows_certificate_overview.json +++ b/windows_certificate/assets/dashboards/windows_certificate_overview.json @@ -1,127 +1,169 @@ { - "title": "Windows Certificate Store Overview", - "description": "## Windows Certificate Store Integration Dashboard\n\nThis is an example Windows Certificate Store dashboard demonstrating the information that the integration collects.", - "widgets": [ - { - "id": 1332720998004105, - "definition": { - "title": "Windows Certificate Store", - "banner_img": "/static/images/logos/windows_small.svg", - "show_title": true, - "type": "group", - "layout_type": "ordered", - "widgets": [] - }, - "layout": { "x": 0, "y": 0, "width": 4, "height": 5 } - }, - { - "id": 3432759619201891, - "definition": { - "title": "Certificate Expiration", - "background_color": "vivid_blue", - "show_title": true, - "type": "group", - "layout_type": "ordered", - "widgets": [ - { - "id": 5168903633321084, + "author_name": "Datadog", + "description": "## Windows Certificate Store Integration Dashboard\n\nThis is an example Windows Certificate Store dashboard demonstrating the information that the integration collects.", + "layout_type": "ordered", + "template_variables": [ + { + "available_values": [], + "default": "*", + "name": "certificate_store", + "prefix": "certificate_store" + }, + { + "available_values": [], + "default": "*", + "name": "subject_common_name", + "prefix": "subject_cn" + } + ], + "title": "Windows Certificate Store Overview", + "widgets": [ + { "definition": { - "title": "Certificate Expiration", - "title_size": "16", - "title_align": "center", - "type": "check_status", - "check": "windows_certificate.cert_expiration", - "grouping": "cluster", - "group_by": [], - "tags": ["$certificate_store", "$subject_common_name"] + "banner_img": "/static/images/logos/windows_small.svg", + "layout_type": "ordered", + "show_title": true, + "title": "Windows Certificate Store", + "type": "group", + "widgets": [] }, - "layout": { "x": 0, "y": 0, "width": 4, "height": 2 } - }, - { - "id": 6717423497232037, + "id": 1332720998004105, + "layout": { + "height": 5, + "width": 4, + "x": 0, + "y": 0 + } + }, + { "definition": { - "type": "note", - "content": "Included service check:\n\n* `windows_certificate.cert_expiration` - Returns CRITICAL if the certificate has expired or expires in less than `days_critical`, returns WARNING if the certificate expires in less than `days_warning`, otherwise returns OK.", - "background_color": "yellow", - "font_size": "14", - "text_align": "left", - "vertical_align": "center", - "show_tick": true, - "tick_pos": "50%", - "tick_edge": "left", - "has_padding": true - }, - "layout": { "x": 4, "y": 0, "width": 4, "height": 2 } - }, - { - "id": 4514519614660249, - "definition": { - "title": "Days Till Expiration", - "title_size": "16", - "title_align": "left", - "show_legend": true, - "legend_layout": "auto", - "legend_columns": ["avg", "min", "max", "value", "sum"], - "type": "timeseries", - "requests": [ - { - "formulas": [{ "formula": "query1" }], - "queries": [ + "background_color": "vivid_blue", + "layout_type": "ordered", + "show_title": true, + "title": "Certificate Expiration", + "type": "group", + "widgets": [ + { + "definition": { + "check": "windows_certificate.cert_expiration", + "group_by": [], + "grouping": "cluster", + "tags": [ + "$certificate_store", + "$subject_common_name" + ], + "title": "Certificate Expiration", + "title_align": "center", + "title_size": "16", + "type": "check_status" + }, + "id": 5168903633321084, + "layout": { + "height": 2, + "width": 4, + "x": 0, + "y": 0 + } + }, + { + "definition": { + "background_color": "yellow", + "content": "Included service check:\n\n* `windows_certificate.cert_expiration` - Returns CRITICAL if the certificate has expired or expires in less than `days_critical`, returns WARNING if the certificate expires in less than `days_warning`, otherwise returns OK.", + "font_size": "14", + "has_padding": true, + "show_tick": true, + "text_align": "left", + "tick_edge": "left", + "tick_pos": "50%", + "type": "note", + "vertical_align": "center" + }, + "id": 6717423497232037, + "layout": { + "height": 2, + "width": 4, + "x": 4, + "y": 0 + } + }, { - "data_source": "metrics", - "name": "query1", - "query": "avg:windows_certificate.days_remaining{$certificate_store, $subject_common_name} by {subject_cn}" + "definition": { + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "legend_layout": "auto", + "requests": [ + { + "display_type": "line", + "formulas": [ + { + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:windows_certificate.days_remaining{$certificate_store, $subject_common_name} by {subject_cn}" + } + ], + "response_format": "timeseries", + "style": { + "line_type": "solid", + "line_width": "normal", + "order_by": "values", + "palette": "dog_classic" + } + } + ], + "show_legend": true, + "title": "Days Till Expiration", + "title_align": "left", + "title_size": "16", + "type": "timeseries" + }, + "id": 4514519614660249, + "layout": { + "height": 2, + "width": 4, + "x": 0, + "y": 2 + } + }, + { + "definition": { + "background_color": "yellow", + "content": "Days until certificate(s) expire", + "font_size": "14", + "has_padding": true, + "show_tick": true, + "text_align": "left", + "tick_edge": "left", + "tick_pos": "50%", + "type": "note", + "vertical_align": "center" + }, + "id": 3226539913664578, + "layout": { + "height": 1, + "width": 4, + "x": 4, + "y": 2 + } } - ], - "response_format": "timeseries", - "style": { - "palette": "dog_classic", - "order_by": "values", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { "x": 0, "y": 2, "width": 4, "height": 2 } - }, - { - "id": 3226539913664578, - "definition": { - "type": "note", - "content": "Days until certificate(s) expire", - "background_color": "yellow", - "font_size": "14", - "text_align": "left", - "vertical_align": "center", - "show_tick": true, - "tick_pos": "50%", - "tick_edge": "left", - "has_padding": true + ] }, - "layout": { "x": 4, "y": 2, "width": 4, "height": 1 } - } - ] - }, - "layout": { "x": 4, "y": 0, "width": 8, "height": 5 } - } - ], - "template_variables": [ - { - "name": "certificate_store", - "prefix": "certificate_store", - "available_values": [], - "default": "*" - }, - { - "name": "subject_common_name", - "prefix": "subject_cn", - "available_values": [], - "default": "*" - } - ], - "layout_type": "ordered", - "notify_list": [], - "reflow_type": "fixed" -} + "id": 3432759619201891, + "layout": { + "height": 5, + "width": 8, + "x": 4, + "y": 0 + } + } + ] +} \ No newline at end of file diff --git a/windows_certificate/changelog.d/1.added b/windows_certificate/changelog.d/1.added deleted file mode 100644 index aa949b47b7b41..0000000000000 --- a/windows_certificate/changelog.d/1.added +++ /dev/null @@ -1 +0,0 @@ -Initial Release \ No newline at end of file diff --git a/windows_certificate/manifest.json b/windows_certificate/manifest.json index 3e5cd7308ae4b..56721cc7c3ded 100644 --- a/windows_certificate/manifest.json +++ b/windows_certificate/manifest.json @@ -15,7 +15,8 @@ "Supported OS::Windows", "Category::OS & System", "Category::Windows", - "Offering::Integration" + "Offering::Integration", + "Submitted Data Type::Metrics" ] }, "assets": { @@ -37,10 +38,11 @@ } }, "dashboards": { - "windows_certificate_overview": "assets/dashboards/windows_certificate_overview.json", - "Windows Certificate Store Overview": "assets/dashboards/overview.json" + "Windows Certificate Store Overview": "assets/dashboards/windows_certificate_overview.json" + }, + "monitors": { + "A certificate is expired or about to expire": "assets/monitors/windows_certificate_expiration.json" }, - "monitors": {}, "saved_views": {} }, "author": { From 0b1d0ab9f9192380538379760cf1d8ed8bf7ef1f Mon Sep 17 00:00:00 2001 From: Mohammad Rafi Date: Tue, 20 May 2025 10:53:21 -0400 Subject: [PATCH 4/5] fixing monitor and manifest --- .../assets/monitors/windows_certificate_expiration.json | 2 +- windows_certificate/manifest.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/windows_certificate/assets/monitors/windows_certificate_expiration.json b/windows_certificate/assets/monitors/windows_certificate_expiration.json index 4f8d15222f93a..ad129cee0456b 100644 --- a/windows_certificate/assets/monitors/windows_certificate_expiration.json +++ b/windows_certificate/assets/monitors/windows_certificate_expiration.json @@ -5,7 +5,7 @@ "title": "Windows Certificate Store: Certificate expiring/expired", "description": "This monitor alerts when there are certificates in the Windows Certificate Store that are expired or close to expiring.", "tags": [ - "integration:windows_certificate" + "integration:windows-certificate" ], "definition": { "name": "A certificate is expired or about to expire", diff --git a/windows_certificate/manifest.json b/windows_certificate/manifest.json index 56721cc7c3ded..033e46b3dfba5 100644 --- a/windows_certificate/manifest.json +++ b/windows_certificate/manifest.json @@ -42,8 +42,7 @@ }, "monitors": { "A certificate is expired or about to expire": "assets/monitors/windows_certificate_expiration.json" - }, - "saved_views": {} + } }, "author": { "support_email": "help@datadoghq.com", From f80a897b06d2cc4e4c397fde3130e95e3f5555e2 Mon Sep 17 00:00:00 2001 From: Mohammad Rafi <36865458+mrafi97@users.noreply.github.com> Date: Tue, 20 May 2025 12:09:53 -0400 Subject: [PATCH 5/5] Update windows_certificate_expiration.json --- .../assets/monitors/windows_certificate_expiration.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows_certificate/assets/monitors/windows_certificate_expiration.json b/windows_certificate/assets/monitors/windows_certificate_expiration.json index ad129cee0456b..babf32a305d58 100644 --- a/windows_certificate/assets/monitors/windows_certificate_expiration.json +++ b/windows_certificate/assets/monitors/windows_certificate_expiration.json @@ -2,7 +2,7 @@ "version": 2, "created_at": "2025-05-13", "last_updated_at": "2025-05-13", - "title": "Windows Certificate Store: Certificate expiring/expired", + "title": "A certificate is expired or about to expire", "description": "This monitor alerts when there are certificates in the Windows Certificate Store that are expired or close to expiring.", "tags": [ "integration:windows-certificate" @@ -32,4 +32,4 @@ }, "priority": null } - } \ No newline at end of file + }