Skip to content

Add the Teleport Integration #16877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 60 commits into from
Apr 26, 2024
Merged

Conversation

NouemanKHAL
Copy link
Member

@NouemanKHAL NouemanKHAL commented Feb 14, 2024

What does this PR do?

Motivation

PLINT-282

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Changelog entries must be created for modifications to shipped code
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@NouemanKHAL NouemanKHAL force-pushed the noueman/add-teleport-integration branch from 7c8ad20 to a69ac09 Compare February 27, 2024 14:24
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

github-actions bot commented Feb 27, 2024

Test Results

 2 files   2 suites   17s ⏱️
19 tests 19 ✅ 0 💤 0 ❌
20 runs  19 ✅ 1 💤 0 ❌

Results for commit 892dafc.

♻️ This comment has been updated with latest results.

Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

github-actions bot commented Apr 9, 2024

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

github-actions bot commented Apr 9, 2024

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

github-actions bot commented Apr 9, 2024

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

github-actions bot commented Apr 9, 2024

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

Copy link

github-actions bot commented Apr 9, 2024

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

* update description 'cluster' -> 'instance'

* change teleport.auth.audit_log.* prefix to teleport.audit_log.* to ease filtering audit log metrics

* standardize metric names in the tests

* update implementation

* update metadata.csv

* remove extra space in metadata.csv

* audit_log -> auth.audit_log
* update description 'cluster' -> 'instance'

* send count metric instead of service check

* raise on exception

* format

* fix integration tests

* remove obsolete field version in docker-compose.yml

* fix msg arg to self.count and add teleport_status tag to health.up metric

* fix integration tests typo

* fix e2e tests

* log error message on exception

* lint

* add teleport.health.up to metadata.csv

* add assertion for unreachable health state metric tag

* apply suggestion
* regenerate metadata.csv

* add all missing descriptions

* add some units

* add bucket,sum, and count metrics for histogram metrics

* update units and sort
@cswatt
Copy link
Contributor

cswatt commented Apr 25, 2024

Tracking documentation review with DOCS-7816

@cswatt cswatt added the editorial review Waiting on a more in-depth review from a docs team editor label Apr 25, 2024
Copy link
Contributor

@iliakur iliakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to change the initial version and changelog, otherwise lgtm

Co-authored-by: Ilia Kurenkov <ilia.kurenkov@datadoghq.com>
@NouemanKHAL NouemanKHAL merged commit 8aed42a into master Apr 26, 2024
36 checks passed
@NouemanKHAL NouemanKHAL deleted the noueman/add-teleport-integration branch April 26, 2024 07:44
github-actions bot pushed a commit that referenced this pull request Apr 26, 2024
* initial integration scaffolding

* add initial setup for integration tests using docker-compose

* add first integration test

* critical test pass

* add test_connect_ok

* fix test_connect_exception and passing test_connect_ok

* add test to check common metrics collection

* add metadata.csv

* ddev test teleport -fs

* delete some comments

* wip: use openmetrics base class

* catch main super.check exception, passing -> first two tests

* move exception to test to unit tests

* add unit tests, setup mocks, fix integration tests

* assert common metrics in unit tests

* add metrics fixture

* add teleport_cache_stale_events mocks

* reporting common metrics

* rename 'version' tag to 'teleport_version'

* format

* remove docker-compose down nothing behavior

* update metadata.csv metric names format

* update unit and integration tests to match the new metric names

* fix implementation to pass the tests

* [PLINT-302] Report Teleport Proxy metrics (#17018)

* add unit tests for proxy metrics

* passing metrics that don't require mocks

* tests passing for grpc_client_* metrics

* separate unit tests by teleport metrics groups

* update teleport proxy metrics test to check all metrics

* update fixtures with missing proxy metrics

* update proxy metric names in the test

* collect proxy metrics in the check

* format

* ignore linting on a long line

* separate metrics maps into metrics.py per suggestion

* ddev validate ci --sync

* ddev validate config teleport -s

* ddev validate models teleport -s

* ddev validate labeler --sync

* remove arch suffix from docker-compose teleport image

* add E2E test

* fix linting

* [PLINT-303] Report Teleport Auth Service and Backends metrics (#17050)

* add test_auth_teleport_metrics test
collect auth service metrics
update fixtures with missing auth service metrics
format
add 'cluster_name_not_found' metric
fix wrong metrics, grpc_server metrics belong to Auth service
replace single quotes with double quotes + format
change prefix for auth audit_log metrics
add auth s3 backend metrics test
collect auth s3 backend metrics
update fixtures with auth s3 backend metrics

* add support for backend cache metrics

* add support for backend dynamoDB metrics

* add support for backend firestore metrics

* add support for backend GCP GCS metrics

* add support for backend ETCD metrics

* lint

* Refactor and cleanup Teleport Integration (#17084)

* use metrics_path fixture in tests

* use instance fixture in tests

* move metrics constants in tests to common.py

* handle check exception

* remove the match parameter when testing for exception

* add .common prefix to common instance metrics for filtering purposes later

* update integration tests

* fix linting

* fix e2e tests

* use the COMMON_METRICS const in the integration and e2e tests

* format

* use the INSTANCE const in the test_e2e.py

* update the config properties to align with the RFC suggestion

* lint

* make DEFAULT_DIAG_PORT class constant

* [PLINT-304] Report metrics for the Teleport SSH Service (#17111)

* use metrics_path fixture in tests

* use instance fixture in tests

* move metrics constants in tests to common.py

* handle check exception

* remove the match parameter when testing for exception

* add .common prefix to common instance metrics for filtering purposes later

* update integration tests

* fix linting

* fix e2e tests

* use the COMMON_METRICS const in the integration and e2e tests

* format

* use the INSTANCE const in the test_e2e.py

* update the config properties to align with the RFC suggestion

* lint

* make DEFAULT_DIAG_PORT class constant

* add tests for SSH service metrics

* collect SSH metrics, tests passing

* cleanup: move METRIC_MAP to metrics.py

* [PLINT-306] Report metrics for the Teleport Kubernetes Service (#17113)

* add tests for Kubernetes service metrics

* successfully collecting kubernetes client metrics

* add tests for Kubernetes service server metrics

* successfully collecting kubernetes server metrics

* [PLINT-305] Report metrics for the Teleport Database Service (#17114)

* add tests for Database service metrics

* successfully collecting database service metrics

* [PLINT-308] Report metrics for the Teleport Enhanced Session Recording / BPF (#17116)

* add tests for BPF metrics

* successfully collecting BPF metrics

* [PLINT-307] Report metrics for the Teleport internal Prometheus (#17117)

* add tests for Prometheus metrics

* successfully collecting Prometheus metrics

* [PLINT-326] Add `teleport_service` tag to Teleport metrics (#17216)

* update tests to check for 'teleport_service' tag for auth metrics

* update tests to check for 'teleport_service' tag for ssh metrics

* update tests to check for 'teleport_service' tag for proxy metrics

* update tests to check for 'teleport_service' tag for database metrics

* update tests to check for 'teleport_service' tag for kubernetes metrics

* update tests to check for 'teleport_service' tag for common teleport metrics

* add METRIC_MAP_BY_SERVICE

* add custom metric transformer to add 'teleport_service' tag

* remove unexisting metric type case

* remove useless check

* [PLINT-331] Update `metadata.csv` for the Teleport Integration (#17241)

* update metadata.csv

* fix metadata duplications, and invalid histogram types to their corresponding count type

* remove periods at the end of descriptions

* [PLINT-325] Update Teleport Configuration spec (#17261)

* add 'teleport_url' and 'diag_port' properties to the Configuration Spec

* ddev validate config -s

* ddev validate models

* sort metadata.csv

* ddev validate ci -s

* add DEFAULT_METRIC_LIMIT to fix the openmetrics validation-n

* update classifier_tags

* add description to the manifest

* fix tile description

* update manifest check for metrics

* [WIP] add dashboard

* add dashboard entry in the manifest.json

* delele monitors, logs, and saved_views entries from the manifest.json

* remove extra comma in manifest.json

* changelog

* ddev validate label --sync

* [PLINT-362] Standardize metric names (#17383)

* update description 'cluster' -> 'instance'

* change teleport.auth.audit_log.* prefix to teleport.audit_log.* to ease filtering audit log metrics

* standardize metric names in the tests

* update implementation

* update metadata.csv

* remove extra space in metadata.csv

* audit_log -> auth.audit_log

* Send Teleport service check as a metric (#17441)

* update description 'cluster' -> 'instance'

* send count metric instead of service check

* raise on exception

* format

* fix integration tests

* remove obsolete field version in docker-compose.yml

* fix msg arg to self.count and add teleport_status tag to health.up metric

* fix integration tests typo

* fix e2e tests

* log error message on exception

* lint

* add teleport.health.up to metadata.csv

* add assertion for unreachable health state metric tag

* apply suggestion

* Update metadata.csv with descriptions and units (#17456)

* regenerate metadata.csv

* add all missing descriptions

* add some units

* add bucket,sum, and count metrics for histogram metrics

* update units and sort

* fix manifest.json errors

* update README.md with prerequisites section

* delete dashboard

* Apply suggestions from code review

Co-authored-by: Ilia Kurenkov <ilia.kurenkov@datadoghq.com>

---------

Co-authored-by: Ilia Kurenkov <ilia.kurenkov@datadoghq.com> 8aed42a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants