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.
Go to file
Owen Diehl e37a780e14
Inhouse alerting api (#33129)
* init

* autogens AM route

* POST dashboards/db spec

* POST alert-notifications spec

* fix description

* re inits vendor, updates grafana to master

* go mod updates

* alerting routes

* renames to receivers

* prometheus endpoints

* align config endpoint with cortex, include templates

* Change grafana receiver type

* Update receivers.go

* rename struct to stop swagger thrashing

* add rules API

* index html

* standalone swagger ui html page

* Update README.md

* Expose GrafanaManagedAlert properties

* Some fixes

- /api/v1/rules/{Namespace} should return a map
- update ExtendedUpsertAlertDefinitionCommand properties

* am alerts routes

* rename prom swagger section for clarity, remove example endpoints

* Add missing json and yaml tags

* folder perms

* make folders POST again

* fix grafana receiver type

* rename fodler->namespace for perms

* make ruler json again

* PR fixes

* silences

* fix Ok -> Ack

* Add id to POST /api/v1/silences (#9)

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Add POST /api/v1/alerts (#10)

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* fix silences

* Add testing endpoints

* removes grpc replace directives

* [wip] starts validation

* pkg cleanup

* go mod tidy

* ignores vendor dir

* Change response type for Cortex/Loki alerts

* receiver unmarshaling tests

* ability to split routes between AM & Grafana

* api marshaling & validation

* begins work on routing lib

* [hack] ignores embedded field in generation

* path specific datasource for alerting

* align endpoint names with cloud

* single route per Alerting config

* removes unused routing pkg

* regens spec

* adds datasource param to ruler/prom route paths

* Modifications for supporting migration

* Apply suggestions from code review

* hack for cleaning circular refs in swagger definition

* generates files

* minor fixes for prom endpoints

* decorate prom apis with required: true where applicable

* Revert "generates files"

This reverts commit ef7e975584.

* removes server autogen

* Update imported structs from ngalert

* Fix listing rules response

* Update github.com/prometheus/common dependency

* Update get silence response

* Update get silences response

* adds ruler validation & backend switching

* Fix GET /alertmanager/{DatasourceId}/config/api/v1/alerts response

* Distinct gettable and postable grafana receivers

* Remove permissions routes

* Latest JSON specs

* Fix testing routes

* inline yaml annotation on apirulenode

* yaml test & yamlv3 + comments

* Fix yaml annotations for embedded type

* Rename DatasourceId path parameter

* Implement Backend.String()

* backend zero value is a real backend

* exports DiscoveryBase

* Fix GO initialisms

* Silences: Use PostableSilence as the base struct for creating silences

* Use type alias instead of struct embedding

* More fixes to alertmanager silencing routes

* post and spec JSONs

* Split rule config to postable/gettable

* Fix empty POST /silences payload

Recreating the generated JSON specs fixes the issue
without further modifications

* better yaml unmarshaling for nested yaml docs in cortex-am configs

* regens spec

* re-adds config.receivers

* omitempty to align with prometheus API behavior

* Prefix routes with /api

* Update Alertmanager models

* Make adjustments to follow the Alertmanager API

* ruler: add for and annotations to grafana alert (#45)

* Modify testing API routes

* Fix grafana rule for field type

* Move PostableUserConfig validation to this library

* Fix PostableUserConfig YAML encoding/decoding

* Use common fields for grafana and lotex rules

* Add namespace id in GettableGrafanaRule

* Apply suggestions from code review

* fixup

* more changes

* Apply suggestions from code review

* aligns structure pre merge

* fix new imports & tests

* updates tooling readme

* goimports

* lint

* more linting!!

* revive lint

Co-authored-by: Sofia Papagiannaki <papagian@gmail.com>
Co-authored-by: Domas <domasx2@gmail.com>
Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-04-19 14:26:04 -04:00
.circleci Circle: Remove release pipeline (#28474) 2020-10-22 16:22:48 +02:00
.github Docs: Sync master docs against next version (#32602) 2021-04-12 09:42:10 +02:00
conf OAuth: Add optional strict parsing of role_attribute_path (#28021) 2021-04-14 15:14:27 -04:00
contribute Update documentation-style-guide.md (#32959) 2021-04-13 21:40:28 +02:00
cue Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
cue.mod Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
devenv GraphNG: stacking (#30749) 2021-04-15 13:00:01 +02:00
docs Docs: Update pie-chart-panel.md (#33132) 2021-04-19 11:16:08 -07:00
e2e Variables: Confirms selection before opening new picker (#32586) 2021-04-06 09:21:37 +02:00
emails Update email template for AlertingNG (#32691) 2021-04-07 14:52:48 +05:30
grafana-mixin reduce severity level to warning (#28939) 2020-11-20 10:30:51 +01:00
packages PanelEdit: only update when config changes (#33133) 2021-04-19 19:24:39 +02:00
packaging Chore: Change from double to single quotes (#32430) 2021-03-29 17:40:26 +03:00
pkg Inhouse alerting api (#33129) 2021-04-19 14:26:04 -04:00
plugins-bundled Revert ""Release: Updated versions in package to 7.4.3" (#31444)" (#31452) 2021-02-24 17:53:08 +01:00
public PanelEdit: only update when config changes (#33133) 2021-04-19 19:24:39 +02:00
scripts Theme: More theme updates (#33076) 2021-04-17 07:13:25 +02:00
tools Image Rendering: Remove PhantomJS support (#23460) 2020-04-15 22:17:41 +02:00
.bra.toml Chore: Upgrade to Go 1.14 (#23371) 2020-04-08 14:13:05 +02:00
.browserslistrc Babel: Target more modern browsers, updates browserlistrc (#32573) 2021-04-01 10:32:00 +02:00
.dockerignore remove duplicated /tmp entry in .dockerignore 2018-08-09 09:10:53 +02:00
.drone.star Drone: Add version branch pipeline (#28490) 2020-10-23 10:16:17 +02:00
.drone.yml ReleaseNotes: Updated changelog and release notes for 7.5.4 (#32973) 2021-04-14 17:10:19 +02:00
.editorconfig Chore: Enable PR testing in Drone (#26189) 2020-07-10 16:09:21 +02:00
.eslintignore Chore: Lint all files for no-only-tests (#30364) 2021-01-19 11:06:27 +01:00
.eslintrc Buttons: Refactor & use new theme (#32767) 2021-04-08 13:00:58 +02:00
.gitattributes CRLF (#28822) 2020-11-05 17:20:40 +01:00
.gitignore Alerting: Rule edit form (#32877) 2021-04-14 15:57:36 +03:00
.prettierignore Theming: Updates to select styles and theme model progress (#32797) 2021-04-12 14:23:00 +02:00
.prettierrc.js Prettier: Add prettier config that imports prettier from toolkit (#23729) 2020-04-21 17:23:49 +02:00
api-extractor.json Docs: added code comments for everything in the @grafana/runtime package. (#23456) 2020-04-15 10:46:51 +02:00
build.go Grunt: Removes grunt dependency and replaces some of its usage (#29461) 2020-12-01 10:32:12 +01:00
CHANGELOG_ARCHIVE.md Automation: Adds new changelog actions (#29142) 2020-11-16 21:34:19 +01:00
CHANGELOG.md ReleaseNotes: Updated changelog and release notes for 7.5.4 (#32973) 2021-04-14 17:10:19 +02:00
CODE_OF_CONDUCT.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
CONTRIBUTING.md IssueTriage: Needs more info automation and messages (#28137) 2020-10-16 16:49:55 +02:00
Dockerfile Downgrade to node:14.16.0-alpine3.13 (#32065) 2021-03-17 17:07:39 +02:00
Dockerfile.ubuntu Make build docker full fix (#29570) 2020-12-03 14:17:40 +01:00
embed.go Introduce "scuemata" system for CUE-based specification of Grafana objects (#32527) 2021-04-08 01:11:11 -07:00
go.mod Inhouse alerting api (#33129) 2021-04-19 14:26:04 -04:00
go.sum Inhouse alerting api (#33129) 2021-04-19 14:26:04 -04:00
GOVERNANCE.md Add Alex Khomenko as member (#28032) 2020-10-05 15:08:16 +03:00
ISSUE_TRIAGE.md GrafanaBot: Update labels and commands and adds docs (#28950) 2020-11-09 21:45:18 +01:00
jest.config.js Chore: Bump storybook to v6 (#28926) 2020-11-24 10:38:41 +01:00
latest.json Chore: Bump version in latest.json to 7.5.4 (#33003) 2021-04-14 20:14:04 +02:00
lerna.json Revert ""Release: Updated versions in package to 7.4.3" (#31444)" (#31452) 2021-02-24 17:53:08 +01:00
LICENSE Small license correction 2019-03-21 16:36:24 +01:00
MAINTAINERS.md Docs: Refactor inconsistent unordered lists (#27826) 2020-10-02 11:02:11 -07:00
Makefile Remove tidy-check script (#31423) 2021-02-23 17:53:30 +02:00
metadata.md Docs: Document plugin authentication in metadata schema (#32703) 2021-04-08 18:13:18 +02:00
NOTICE.md Update NOTICE.md 2021-01-06 08:16:50 +01:00
package.json Live: centrifuge.js 2.7.5 (#33001) 2021-04-14 12:59:42 -05:00
PLUGIN_DEV.md Update PLUGIN_DEV.md (#19387) 2019-09-26 12:40:47 +02:00
README.md Fix titles case and add missing punctuation marks (#28713) 2020-11-05 09:17:08 -05:00
ROADMAP.md Update ROADMAP.md (#19384) 2019-09-25 07:18:35 +02:00
SECURITY.md Docs: Fix broken link (#25664) 2020-06-18 14:08:26 +02:00
SUPPORT.md Update SUPPORT.md (#19383) 2019-09-25 07:17:01 +02:00
tsconfig.json Tests: Adds expects for observables (#28929) 2020-11-18 15:18:55 +01:00
UPGRADING_DEPENDENCIES.md Docs: Fix note format for documentation (#27940) 2020-09-30 12:45:07 -07:00
WORKFLOW.md Docs: Minor docs update 2020-11-10 12:14:02 +01:00
yarn.lock Live: centrifuge.js 2.7.5 (#33001) 2021-04-14 12:59:42 -05:00

Grafana

The open-source platform for monitoring and observability.

License Circle CI Go Report Card

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:

  • Visualize: 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:

Get involved

License

Grafana is distributed under the Apache 2.0 License.