Git Product home page Git Product logo

grafana / synthetic-monitoring-app Goto Github PK

View Code? Open in Web Editor NEW
121.0 137.0 17.0 27.03 MB

Synthetic Monitoring frontend application

Home Page: https://grafana.com/docs/grafana-cloud/how-do-i/synthetic-monitoring/

License: GNU Affero General Public License v3.0

TypeScript 97.14% JavaScript 2.45% Shell 0.15% SCSS 0.01% Dockerfile 0.05% Makefile 0.20%
grafana monitoring synthetic-monitoring grafana-synthetic-monitoring

synthetic-monitoring-app's Introduction

Synthetic monitoring application

Synthetic Monitoring is a blackbox monitoring solution provided as part of Grafana Cloud. Synthetic Monitoring provides users with insights into how their applications and services are behaving from an external point of view. Users can define checks to continually test remote targets from 1 or more probe locations around the world to assess the availability, performance and correctness of the services. As each check runs, metrics and logs are collected and published to the user's Grafana Cloud service. Metrics are published to Grafana Cloud Prometheus and logs are published to Grafana Cloud Loki.

Synthetic monitoring is the successor to the original worldping application. The refreshed Synthetic Monitoring product focuses on reducing complexity and taking advantage of Grafana Cloud capabilities.

Check Types

Users can define HTTP/HTTPS, DNS, TCP and ICMP Ping checks to monitor their remote targets. Internally, the Synthetic Monitoring solution uses the Prometheus Blackbox exporter for executing the checks and collecting metrics and logs. When creating a check, users are able to customize the settings and validation rules supported by the Blackbox exporter.

Probe Locations

For each check, users can select 1 or more 'public' probe locations distributed throughout the world to run tests from. Additionally, users can run their own 'private' probe locations by downloading and deploying the Synthetic Monitoring Agent.

Configuration

Synthetic Monitoring requires a Grafana Cloud account, and is installed by default in Grafana Cloud stacks. A local Grafana instance can be configured to connect to Synthetic Monitoring via a provisioning file:

apiVersion: 1

apps:
  - type: grafana-synthetic-monitoring-app
    name: grafana-synthetic-monitoring-app
    disabled: false
    jsonData:
      apiHost: <synthetic monitoring api url for your grafana cloud stack>
      stackId: <instance ID of your hosted grafana>
      logs:
        grafanaName: <name of an existing Loki datasource pointing to the Grafana Cloud Loki instance>
        hostedId: <Grafana Cloud Loki instance ID>
      metrics:
        grafanaName: <name of an existing Prometheus datasource pointing to the Grafana Cloud Prometheus instance>
        hostedId: <Grafana Cloud Prometheus instance ID>
    secureJsonData:
      publisherToken: <access policy token with read:stacks, write:metrics, write:logs, and write:traces scope>

Configuration details:

  • apiHost expects Synthetic Monitoring API URL, see more details here

  • stackId expects an integer and can be found using gcom /instances/<orgSlug>, or by visiting https://grafana.com/orgs/<orgSlug>/stacks and clicking the details button on stack you are connecting to. The id will be in the URL.

  • The logs and metrics section are instructing the plugin which datasources it needs to use.

    • The grafanaName needs to exactly match the names specified in your datasource provisioning
    • The hostedId expects an integer and is the same value as the basicAuthUser in your datasource provisioning. The value can also be found from the details page of loki or prometheus at https://grafana.com/orgs/<orgSlug>/stacks.
  • publisherToken is an access policy token used to communicate with your Cloud stack and publish telemetry data from the probes. The access policy needs to have the following scopes:

    • Read stacks
    • Write metrics
    • Write logs
    • Write traces

Note: you can add a provisioning block per org to provision the plugin for multiple orgs. You can provide different values for each org block and connect to a different cloud stack per org.

Prerequisites:

  1. A datasource pointed at a Prometheus instance hosted in Grafana Cloud
  2. A datasource pointed at a Loki instance hosted in Grafana Cloud

Note: The Prometheus and Loki instances must be part of the same Cloud stack

The required datasources can be added via provisioning. The information needed can be copied from Prometheus and Loki datasources found in the datasources tab of a Cloud hosted Grafana instance:

apiVersion: 1

datasources:
  - name: <datasource name>
    type: loki
    access: proxy
    url: https://logs-prod-us-central1.grafana.net
    basicAuth: true
    basicAuthUser: <Grafana Cloud Loki instance ID>
    jsonData:
      maxLines: 1000
    secureJsonData:
      basicAuthPassword: <viewer token from grafana.com>
    version: 1

  - name: <datasource name>
    type: prometheus
    access: proxy
    url: https://prometheus-us-central1.grafana.net/api/prom
    basicAuth: true
    basicAuthUser: <Grafana Cloud Prometheus instance ID>
    jsonData:
      timeInterval: 1s
    secureJsonData:
      basicAuthPassword: <viewer token from grafana.com>
    version: 1

To run the local environment:

  1. Start the frontend build: yarn dev
  2. Start Grafana: yarn server
  3. Grafana will be available at localhost:3000

To start the using app:

  1. Navigate to Synthetic Monitoring via the sidebar
  2. Click the Get Started button. This will initialize the app.

During the Initialization process, the Synthetic Monitoring backend will:

  1. Validate the Publisher API key provided in the provisioning file.
  2. Ensure the account has active Grafana Cloud Prometheus and Grafana Cloud Loki services
  3. The dashboards included with the App will then be imported.
  4. Finally, the Synthentic Monitoring Backend will be notified that the service is ready.

Users can then create checks to monitor their remote targets. Metrics and logs will flow into the selected Cloud stack.

synthetic-monitoring-app's People

Contributors

brittenhouse avatar catperry avatar chrisharbro avatar ckbedwell avatar csalih avatar dependabot[bot] avatar electron0zero avatar ethirolle avatar heitortsergent avatar ippx avatar jewbetcha avatar joe-elliott avatar ka3de avatar leventebalogh avatar mattsimonsen avatar mem avatar nathanrodman avatar peterschretlen avatar ppcano avatar rdubrock avatar ryantxu avatar samjewell avatar torkelo avatar vikacep avatar w1kman avatar wbrowne avatar woodsaj avatar xnyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

synthetic-monitoring-app's Issues

When adding new ping probe, "save" is disabled

Add a new check.

Don't click on check type.

Type "grafana.com" in the target.

Select a probe.

The "save" button is not enabled.

Click the check type, select something, click again, go back to PING. Now save is enabled.

Validation error on checks with decimal values in v0.0.10

In v0.0.10 we switched UI elements to use sliders+input fields for checks. If a user types a decimal value in the input we don't show an error on tab out, but do show an error when saving the check. Possibly might want to allow saving decimals or not allow them to be entered.

timeout

Decouple from Grafana.cloud

Has any thought been given to decoupling this to where it can be ran with an on-prem instance of Grafana/Prometheus/Loki? I know it's a sales driver for Grafana Cloud but this would be a major step forward for those that are running On-Prem stacks.

Minor typo in folder name and checks page

  • In the Checks page, when you have the option to create a new check, "Grafana" is misspelled
    image
  • The dashboard folder is currently named "SyntheticMonitoring" without a space
    image

Validation error in lat/long when creating a new probe

The latitude and longitude fields do not allow decimals when creating a new probe.

To reproduce:

  • Navigate to Synthetic Monitoring -> Probes
  • Click New Probe
  • Enter decimal values in the Latitude and Longitude fields.
  • Click Save and it gives an error

General usage improvements

Some options:

  • Show usage per check
  • Total roll up usage for all checks
  • Total costs per check
  • Total costs for Synthetic Monitoring
  • Tooltip explaining parameters that affect usage
  • Explore making calculated usage outside of form/sticky

Should we use approximate numbers that we're calculating on the frontend or use actual usage numbers?

Entering negative numbers in latitude / longitude is awkward

When adding a new probe, the latitude and longitude fields require you to enter negative numbers for west and south, but that's pretty weird.

If you click the field the cursor is after the 0. If you hit backspace, that doesn't work. You cannot enter a minus. What you have to do is enter the value back go back to the first character and enter the minus.

Rename uptime label to success rate on probes tab

image

Uptime label hints that this is uptime of probe but what we are seeing is the success rate for all the checks that that probe is running for that tenant over the last 3 hours.

changing the label from "uptime" to "success rate" would make this less confusing,

If there are no probes, it's not possible to load an existing check

If you create a check, associate it with a probe, save it, and then delete all the probes, going to the list of checks and clicking on that check causes the application to not display anything. The display suggests it's trying to load something, but it never does anything else.

It's possible that the empty list of probes is throwing the code that displays the drop down with the list of probes off.

Target validations

The check target input should validate the following cases as being bad (no domain):

  • http://hostname/
  • https://suraj/dev

Migrate to using <Form> component

We are rolling our own form state right now. The code will be simpler and more reliable if we leverage the

component in grafana/ui

Update error message when multiple instances are detected

When multiple instances of the synthetic monitoring plugin are installed (e.g. by adding them to the plugin directory with multiple names?), the code hits:

The current message is:

return <div>TODO... multiple instances... delete one!!!!</div>;

The error message should be updated with an explanation for what to do. Ideally the error message can point to the directories containing each instance.

Could this refer to multiple instances of the SM datasource?

Matrix display of checks and probes

When dealing with a dozens or more checks, it would be nice to have an interface where the user can get an overview of which checks are running on which probes. Since the number of probes is fixed (~ 20 public probes, plus however many private ones), this could be organized in a matrix, with one row per check. It would be nice to be able to disable a check, and add / remove checks to individual probes, as well as add a check to all available probes (a check without any probes is invalid, so clearing the probes could be an option, but it should not be possible to store that configuration).

Dependency Check

Enhancement suggestion, assuming this feature isn't part of Synthetic Monitoring already. Set and configure dependency checks. Ability to not check endpoints if another endpoint is not available. Probably most useful with internal probes. For example, if my WAN IP is down, I may not want to check if my web server behind the WAN IP is up. This would prevent alert storms.

ICMP Send Burts vs. Send then Wait and ICMP size

As an active WorldPing customer and looking forward to the new version and features.
Assuming this is the new location for https://github.com/raintank/worldping-app

See community post, where I mentioned:

"I notice WorldPing does 5x ICMP requests then wait for reply. Another tool we use does 1x ICMP request then wait for reply, 5x. We have a set of remote destinations that don’t like the 5x request and reports 1 out of five drop on most polling cycles.

..... adjust this functionality and go to request>reply, instead of 5x request burst?
..... Is there anything to WP using 18 byte vs. some other size ICMP request size?

Config page stuck in Loading State

Steps to reproduce(in Grafana Cloud):

  1. install & setup SM
  2. un-install SM plugin
  3. delete Synthetic Monitoring Proxy data source
  4. re-install plugin
  5. go to plugin config page, and it will be stuck in loading state.

image

expected behavior:

  1. plugin works, and can be configured

Success rate only fetches data once

Any place the success rate metric shows up, it only fetches on mount. This means that if you don't refresh the page you don't get up to date metrics. We should periodically refresh the data so the user is always seeing the current success rate.

During setup it's not clear that you MUST select instances

During setup, the common case will be that the user will have one hosted metrics and one hosted logs instance.

When the user gets to the instance selection screen, they see this:

instance-selection

simply pressing setup produces an error (good!) but it's not clear that the problem is that instances have not been selected: a pop up message from the browser says "Missing metrics instance".

Error deleting a private probe

Steps to reproduce:

  1. Create a private probe; SM->Probes, click "New"
  2. Delete the probe; SM->Probes, select probe, click "Delete Probe"

No on-screen error is displayed, but an error is received from the network request:

{ "msg":"failed to delete probe 23 from database",
  "err":"deleting probe: Error 1054: Unknown column '$1' in 'where clause'"}

The same error is received whether a probe was ever online or not.

Rename to Synthetic monitoring

we have decided to re-brand worldping as "Synthetic Monitoring". This is more inline with existing solutions in the market and is aligned with this no-ops monitoring capability being part of Grafana Cloud, rather then a standalone product.

Automated build pipeline

We should set up a pipeline to run tests/builds on PRs

It should deploy on merge to master (or maybe not, TBD)

Group selected instances by stack

It's currently possible for users to select metric/logs instances belonging to different stacks when initializing via admin key. This will result in a broken experience. We should revamp the instance selection UI to select based on stack instead of instance type.

[Feature Request] audit log for checks creation & updates

What would you like to be added:
Logs indicating which user created a specific check.
Logs indicating which user updated which check, and what the update was (at least which section of the check was modified is any, when the user clicks "Save")

Why is this needed:
When dealing with a lot of users it becomes mandatory to backtrack actions or know who did what.
At this moment what we can get from the logs is the users who updated a check, and when they updated it, but we cannot tell what the modification was. We can also see when a user creates a check, but not which check.

DNS is missing list of return codes

The list of return codes presented to the user should be expanded to include all the values supported by the backend. The default value should be "NOERROR".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.