mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
alertinganalyticsbusiness-intelligencedashboarddata-visualizationelasticsearchgografanahacktoberfestinfluxdbmetricsmonitoringmysqlpostgresprometheus
5e4fd94413
Prior to this change, all alert instance writes and deletes happened individually, in their own database transaction. This change batches up writes or deletes for a given rule's evaluation loop into a single transaction before applying it. Before: ``` goos: darwin goarch: arm64 pkg: github.com/grafana/grafana/pkg/services/ngalert/store BenchmarkAlertInstanceOperations-8 398 2991381 ns/op 1133537 B/op 27703 allocs/op --- BENCH: BenchmarkAlertInstanceOperations-8 util.go:127: alert definition: {orgID: 1, UID: FovKXiRVzm} with title: "an alert definition FTvFXmRVkz" interval: 60 created util.go:127: alert definition: {orgID: 1, UID: foDFXmRVkm} with title: "an alert definition fovFXmRVkz" interval: 60 created util.go:127: alert definition: {orgID: 1, UID: VQvFuigVkm} with title: "an alert definition VwDKXmR4kz" interval: 60 created PASS ok github.com/grafana/grafana/pkg/services/ngalert/store 1.619s ``` After: ``` goos: darwin goarch: arm64 pkg: github.com/grafana/grafana/pkg/services/ngalert/store BenchmarkAlertInstanceOperations-8 1440 816484 ns/op 352297 B/op 6529 allocs/op --- BENCH: BenchmarkAlertInstanceOperations-8 util.go:127: alert definition: {orgID: 1, UID: 302r_igVzm} with title: "an alert definition q0h9lmR4zz" interval: 60 created util.go:127: alert definition: {orgID: 1, UID: 71hrlmR4km} with title: "an alert definition nJ29_mR4zz" interval: 60 created util.go:127: alert definition: {orgID: 1, UID: Cahr_mR4zm} with title: "an alert definition ja2rlmg4zz" interval: 60 created PASS ok github.com/grafana/grafana/pkg/services/ngalert/store 1.383s ``` So we cut time by about 75% and memory allocations by about 60% when storing and deleting 100 instances. This change also updates some of our tests so that they run successfully against postgreSQL - we were using random Int64s, but postgres integers, which our tables use, max out at 2^31-1 |
||
---|---|---|
.bingo | ||
.changelog-archive | ||
.github | ||
.husky | ||
.vim | ||
.vscode | ||
.yarn | ||
conf | ||
contribute | ||
cue.mod | ||
devenv | ||
docs | ||
e2e | ||
emails | ||
grafana-mixin | ||
packages | ||
packaging | ||
pkg | ||
plugins-bundled | ||
public | ||
scripts | ||
tools | ||
.betterer.results | ||
.betterer.ts | ||
.bra.toml | ||
.browserslistrc | ||
.dockerignore | ||
.drone.star | ||
.drone.yml | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitattributes | ||
.gitignore | ||
.linguirc | ||
.nvmrc | ||
.pa11yci-pr.conf.js | ||
.pa11yci.conf.js | ||
.prettierignore | ||
.prettierrc.js | ||
.yarnrc.yml | ||
babel.config.json | ||
build.go | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
crowdin.yml | ||
Dockerfile | ||
Dockerfile.ubuntu | ||
embed.go | ||
go.mod | ||
go.sum | ||
GOVERNANCE.md | ||
HALL_OF_FAME.md | ||
ISSUE_TRIAGE.md | ||
jest.config.js | ||
latest.json | ||
lerna.json | ||
LICENSE | ||
LICENSING.md | ||
MAINTAINERS.md | ||
Makefile | ||
metadata.md | ||
NOTICE.md | ||
package.json | ||
PLUGIN_DEV.md | ||
README.md | ||
ROADMAP.md | ||
SECURITY.md | ||
stylelint.config.js | ||
SUPPORT.md | ||
tsconfig.json | ||
UPGRADING_DEPENDENCIES.md | ||
WORKFLOW.md | ||
yarn.lock |
The open-source platform for monitoring and observability
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:
- Visualizations: Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
- Dynamic Dashboards: Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
- Explore Metrics: Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
- Explore Logs: Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
- Alerting: Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
- Mixed Data Sources: Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.
Get started
Unsure if Grafana is for you? Watch Grafana in action on play.grafana.org!
Documentation
The Grafana documentation is available at grafana.com/docs.
Contributing
If you're interested in contributing to the Grafana project:
- Start by reading the Contributing guide.
- Learn how to set up your local environment, in our Developer guide.
- Explore our beginner-friendly issues.
- Look through our style guide and Storybook.
Get involved
- Follow @grafana on Twitter.
- Read and subscribe to the Grafana blog.
- If you have a specific question, check out our discussion forums.
- For general discussions, join us on the official Slack team.
License
Grafana is distributed under AGPL-3.0-only. For Apache-2.0 exceptions, see LICENSING.md.