{"id":18577305,"url":"https://github.com/chaos-mesh/datasource","last_synced_at":"2025-04-10T09:30:47.183Z","repository":{"id":38250335,"uuid":"273733324","full_name":"chaos-mesh/datasource","owner":"chaos-mesh","description":"Grafana data source plugin for Chaos Mesh.","archived":false,"fork":false,"pushed_at":"2024-09-12T07:01:52.000Z","size":3418,"stargazers_count":9,"open_issues_count":9,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-06T05:37:58.854Z","etag":null,"topics":["chaos-engineering","chaos-mesh","data-source","grafana-datasource","grafana-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaos-mesh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-20T15:22:27.000Z","updated_at":"2024-06-03T06:58:54.000Z","dependencies_parsed_at":"2024-03-25T08:48:43.128Z","dependency_job_id":"43a484dc-68db-435f-b2a5-1a58a2cf3a29","html_url":"https://github.com/chaos-mesh/datasource","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-mesh%2Fdatasource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-mesh%2Fdatasource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-mesh%2Fdatasource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaos-mesh%2Fdatasource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaos-mesh","download_url":"https://codeload.github.com/chaos-mesh/datasource/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248191634,"owners_count":21062540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaos-engineering","chaos-mesh","data-source","grafana-datasource","grafana-plugin"],"created_at":"2024-11-06T23:28:40.431Z","updated_at":"2025-04-10T09:30:46.567Z","avatar_url":"https://github.com/chaos-mesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Source\n\nGrafana data source plugin for Chaos Mesh.\n\n\u003e This plugin requires Chaos Mesh **\u003e=2.1**, Grafana \u003e= **10.0**.\n\u003e\n\u003e Note: We only test the plugin on Grafana 10.0.3, it may support lower versions, but we are not sure.\n\u003e Upgrading to Grafana v10 is because of the [Angular support deprecation](https://github.com/chaos-mesh/datasource/issues/55). If you encounter any problems, please open an issue to let us know.\n\n## Features\n\n- Displaying Chaos events in a table visualization\n- Support [Variables](https://grafana.com/docs/grafana/latest/variables/) to filter Chaos events\n- Support [Annotations](https://grafana.com/docs/grafana/latest/dashboards/annotations/) to annotate Chaos events on the panel\n\n## Installation\n\n### With dashboard\n\n[https://grafana.com/docs/grafana/latest/administration/plugin-management/#install-a-plugin](https://grafana.com/docs/grafana/latest/administration/plugin-management/#install-a-plugin)\n\n### With cli\n\n```sh\ngrafana-cli plugins install chaosmeshorg-datasource\n```\n\n## Manual installation\n\nDownload the plugin zip package with the following command or go to \u003chttps://github.com/chaos-mesh/datasource/releases\u003e to download:\n\n```shell\ncurl -LO https://github.com/chaos-mesh/datasource/releases/download/v3.0.0/chaosmeshorg-datasource-3.0.0.zip\n```\n\nAfter downloading, unzip:\n\n```shell\nunzip chaosmeshorg-datasource-3.0.0.zip -d YOUR_PLUGIN_DIR\n```\n\nThen update and save the `grafana.ini` file:\n\n```ini\n[plugins]\n  allow_loading_unsigned_plugins = chaosmeshorg-datasource\n```\n\nFinally, restart Grafana to load the plugin.\n\n## Setup\n\nOnce installed, go to **Administration -\u003e Data sources** and add Chaos Mesh, then go to the configuration page:\n\n![Settings](https://raw.githubusercontent.com/chaos-mesh/datasource/master/src/img/settings.png)\n\nAssuming you have Chaos Mesh installed locally, the Chaos Dashboard will export the API on port `2333` by default. So, if you haven't changed anything, you can fill in `http://localhost:2333`.\n\nThen use the `port-forward` command to make the API externally accessible:\n\n```shell\nkubectl port-forward -n chaos-mesh svc/chaos-dashboard 2333:2333\n```\n\nFinally, click **Save \u0026 test** to test the connection. If it shows a successful notification, the setup is complete.\n\n### Authentication\n\nIf you deploy Chaos Mesh with [permission authentication](https://chaos-mesh.org/docs/manage-user-permissions), you need to add the `Authorization` header to the configuration.\nYou can follow the steps below to add the header:\n\n1. Click the **Add header** button.\n2. Fill in the `Authorization` in the **Header** field.\n3. Follow [this section](https://chaos-mesh.org/docs/manage-user-permissions/#get-the-token) to get the token.\n4. Fill in the `Bearer YOUR_TOKEN` in the **Value** field.\n\nThen don't forget to click **Save \u0026 test** to test the connection.\n\n## Query\n\nThe data source plugin looks at the Chaos Mesh through the lens of events, and the following options are responsible for filtering the different events:\n\n- **Object ID**\n\n  \u003e Filter by object uuid.\n\n- **Namespace**\n\n  \u003e Filter by different namespace.\n\n- **Name**\n\n  \u003e Filter by object name.\n\n- **Kind**\n\n  \u003e Filter by kind (PodChaos, NetworkChaos, Schedule...). You can also input an arbitrary kind\n  \u003e if you implement a new kind in Chaos Mesh.\n\n- **Limit**\n\n  \u003e Limit the number of events.\n\nAll of them will be passed as parameters to the `/api/events` API.\n\n## Variables\n\nThe data source plugin supports adding query variables by different metrics:\n\n![Variables](https://raw.githubusercontent.com/chaos-mesh/datasource/master/src/img/variables.png)\n\n- **Namespace**\n\n  \u003e After selection, all available namespaces will show in the **Preview of values** directly.\n\n- **Kind**\n\n  \u003e Same as **Namespace**. Retrieve all kinds.\n\n- **Experiment/Schedule/Workflow**\n\n  \u003e Same as **Namespace**. Retrieve current all experiments/schedules/workflows.\n  \u003e\n  \u003e You can also specify the `queries` to further filter the values,\n  \u003e for example, `?namespace=default` will only retrieve the experiments/schedules/workflows in the `default` namespace.\n\n## Annotations\n\nYou can integrate events into panels via annotations, the following is a sample creation, it will retrieve all PodChaos events:\n\n![Annotations](https://raw.githubusercontent.com/chaos-mesh/datasource/master/src/img/annotations.png)\n\nPlease refer to [Query](#query) to fill in the corresponding fields.\n\n## How to contribute\n\nPull a request or open an issue to describe your changes or problems.\n\n## License\n\nSame as Chaos Mesh. Under the Apache-2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaos-mesh%2Fdatasource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaos-mesh%2Fdatasource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaos-mesh%2Fdatasource/lists"}