grafana / synthetic-monitoring-app

Synthetic Monitoring frontend application
https://grafana.com/docs/grafana-cloud/how-do-i/synthetic-monitoring/
GNU Affero General Public License v3.0
124 stars 17 forks source link

Implement scripted checks with custom logic on JS language using http-request module #319

Closed MurzNN closed 5 months ago

MurzNN commented 3 years ago

What would you like to be added: Will be good to have support for custom checks in Synthetic Monitoring plugin, that are implemented as custom scripts, as addition to simple HTTP/PING checks.

Good example is New Relic's Scripted API https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/scripting-monitors/write-synthetic-api-tests/ , that allows you to implement any custom logic. It reuses the JS http-request module functionality with giving ability to write any custom logic in JavaScript language to implement complex checks.

Why is this needed: Very often users want to have results of both types of checks (simple HTTP/PING and complex custom checks) in one place. Now we must use different tools for that similar tasks, that is pain!

MurzNN commented 3 years ago

An alternative can be adding support for scripts on some test frameworks, like TestCafe or Cypress, Selenium.

marcoboffi commented 3 years ago

An alternative can be adding support for scripts on some test frameworks, like TestCafe or Cypress, Selenium.

It's a very desiderable feature in enterprise scenario.

electron0zero commented 2 years ago

Hi 👋🏼, we have another project called K6 which might be better suited for custom scripts. K6 allows you to write detailed checks in ES6 JS, and has tons of features that makes testing modern applications easy.

We also have K6 Cloud, K6 Cloud offers lot more featues on top of OSS, and you can use K6 Cloud's Grafana Integration to see K6 test data in Grafana

prein commented 6 months ago

Isn't K6 suited best for load testing and not so much for "ping" checks used in synthetic monitoring?

ckbedwell commented 6 months ago

@prein yes, that's right for the k6 product in particular but we are very close to having a GA release of scripted checks in Synthetic Monitoring.

These new checks use k6 under the hood so you can take any k6 script you write and you will be able to use our Synthetic Monitoring product to do regular checks and k6 to do more heavy-duty load testing which should yield a ton of flexibility and confidence to get a full picture of how your applications are performing at any given moment.

rdubrock commented 5 months ago

This was released on May 1st, so I think we can call this issue closed.