Add SAP HANA schema collection and diagnostics#23934
Draft
pawel-big-lebowski wants to merge 5 commits into
Draft
Add SAP HANA schema collection and diagnostics#23934pawel-big-lebowski wants to merge 5 commits into
pawel-big-lebowski wants to merge 5 commits into
Conversation
Collect SAP HANA catalog metadata (schemas, tables, columns) for Database Monitoring's Schema Explorer, mirroring the postgres implementation on the shared SchemaCollector base class. Add startup diagnostics for connection, version, and catalog-view access. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
HANA Express does not include the DESCRIPTION column in SYS.M_DATABASE. Fetch DATABASE_NAME and DESCRIPTION in separate queries so that the absence of DESCRIPTION (silently ignored) does not prevent the database name from being resolved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use 'saphana_databases' as the schema payload kind and 'saphana' as the dbms identifier, matching KindSapHanaDatabases and the SapHana DBMS constant defined in the dd-go dbm-metadata-processor PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Validation ReportAll 21 validations passed. Show details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds Database Monitoring schema collection and startup diagnostics to the SAP HANA integration.
schemas.py): aHanaSchemaCollectorbuilt on the shareddatadog_checks.base.utils.db.schemas.SchemaCollectorbase class (the same one used by postgres). It queriesSYS.SCHEMAS,SYS.TABLES, andSYS.TABLE_COLUMNSand emitskind=hana_databasesmetadata payloads (schemas → tables → columns) for the Schema Explorer. System schemas are skipped, andinclude_schemas/exclude_schemas/max_tables/max_columnslimits are honored.diagnose.py): aHanaDiagnoseregistered viaself.diagnosis.register(...)that checks connectivity, minimum supported version (2.x), and per-view catalog access, distinguishing privilege errors from generic failures and surfacing actionable remediation.collect_schemasoption (enabled,collection_interval,max_tables,max_columns,include_schemas,exclude_schemas) added tospec.yaml, with regeneratedconfig_modelsandconf.yaml.example. Disabled by default.sap_hana.py): time-gated_maybe_collect_schemas()invoked fromcheck(), plus theDatabaseCheck-style properties the base collector requires (dbms,dbms_version,database_identifier,reported_hostname,cloud_metadata,tags).README.md): documents the new grants (SYS.SCHEMAS,SYS.TABLES,SYS.TABLE_COLUMNS, covered byGRANT CATALOG READ) and a "Schema collection" configuration section.Motivation
Bring SAP HANA in line with other Database Monitoring integrations (postgres, mysql, sqlserver, clickhouse) by surfacing catalog metadata in the Schema Explorer, and give users a quick way to diagnose missing privileges or connectivity issues.
Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged