Skip to content

Conversation

@jcolladokuri
Copy link
Contributor

@jcolladokuri jcolladokuri commented Nov 14, 2025

This PR moves the health check to backend only leaving in the frontend the functionality to test the dbconnector datasource.

Leaving the dbconnector.testDataSource should be fine since the datasource types we allow for db connection with Zabbix already are backend datasources, and so their health requests would go through the backend.

Verified:
Clicking test and seeing a health request go out.

IMPORTANT: While testing this in the UI, I found a bug with the config editor - whenever a change is made in the UI and tested, the changes don't take effect (i.e. disabling trends, keeps trends set to true, enabling db connection keep dbConnectionEnabled set to false and so on.). Created a separate issue to fix this

Fixes https://github.com/grafana/oss-big-tent-squad/issues/124
Fixes #2004

@jcolladokuri jcolladokuri requested a review from a team as a code owner November 14, 2025 22:02
*/
async testDatasource() {
const backendDS = new DataSourceWithBackend(this.instanceSettings);
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this, I am using this approach for now, but it should be temporary, I have a separate issue to track migrating from DatasourceApi to DatasourceWithBackend when this is complete we will no longer need to have this here.

Copy link
Contributor

@itsmylife itsmylife left a comment

Choose a reason for hiding this comment

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

It looks good but we need to double check if we still need testDatasource()

@zoltanbedi zoltanbedi changed the title Move health check to the backed Move health check to the backend Nov 20, 2025
@github-actions
Copy link
Contributor

Levitate is-compatible report:

🔍 Resolving @grafana/data@latest...
🔍 Resolving @grafana/ui@latest...
🔍 Resolving @grafana/runtime@latest...
🔍 Resolving @grafana/schema@latest...
🔍 Resolving @grafana/e2e-selectors@latest...
🔍 Resolving @grafana/experimental@latest...

🔬 Checking compatibility between ./src/module.ts and @grafana/[email protected]...
✔ Found @grafana/data version 12.1.1 locally

🔬 Checking compatibility between ./src/module.ts and @grafana/[email protected]...
✔ Found @grafana/ui version 12.1.1 locally

🔬 Checking compatibility between ./src/module.ts and @grafana/[email protected]...
✔ Found @grafana/runtime version 12.1.1 locally

🔬 Checking compatibility between ./src/module.ts and @grafana/[email protected]...
✔ Found @grafana/schema version 12.1.1 locally

🔬 Checking compatibility between ./src/module.ts and @grafana/[email protected]...
✔ Found @grafana/e2e-selectors version 12.1.0 locally

🔬 Checking compatibility between ./src/module.ts and @grafana/[email protected]...
Skipping package @grafana/experimental because it is not used in the project or not installed locally.
did you forget to run yarn install or npm install?

✔️ ./src/module.ts appears to be compatible with @grafana/data,@grafana/ui,@grafana/runtime,@grafana/schema,@grafana/e2e-selectors,@grafana/experimental

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Standardize in the backend health check for the Zabbix datasource

3 participants