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.

Overview

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.

Comments
  • Cross Site Scripting -While creating new Alert runbookurl is accepting and executing javascirpt as Input

    Cross Site Scripting -While creating new Alert runbookurl is accepting and executing javascirpt as Input

    What happened:While creating new alert in runbook url input box is excepting Javascript

    What you expected to happen:I nput should be validated before accepting. The application should not accept any script, special character or HTML codes in the fields whenever not required.

    How to reproduce it (as minimally and precisely as possible):

    1. Go to Alerts and click on New Alert Rule.
    2. Fill in the details as shown below. Enter the payload javascript:alert(β€œXSS”); and click on Save and Exit button.
    Capture 3.Click on created alert -> View Runbook button as marked below. Capture12 4.Payload has been executed as soon as we click on View Runbook button.

    Anything else we need to know?:

    Environment: -Affected Parameter(s): runbook_url

    • Grafana version:9.1.7
    opened by adityakalej 0
  • grafana-renderer renders image without chart for alert notification message

    grafana-renderer renders image without chart for alert notification message

    What happened:

    I set up a very simple chart based on elasticsearch data set. It shows count of records only. When I use the "Direct link rendered image" from Share panel, everything is rendered as expected:

    image

    When an alert is fired the attached image of the same panel is rendered without data chart although the stats in legend column are shown (data from elasticsearch must be delivered). Here is the screenshot of the whole alert:

    image

    And here is enlarged chart from the message: image

    There is a suspicious line with javascript error in renderer debug log (whole log is attached to this issue - grafana-renderer.log.txt ):

    grafana-renderer-1  | 2022-11-25T10:18:08.617496444Z {"error":"Error: RangeError: Invalid array length\n    at Array.push (http://grafana:3000/public/build/4713.8a8cb5e884bc8a897819.js:2:1529240)\n    at Object.splits (http://grafana:3000/public/build/4713.8a8cb5e884bc8a897819.js:2:2830524)\n    at http://grafana:3000/public/build/4713.8a8cb5e884bc8a897819.js:2:2852114\n    at Array.forEach (<anonymous>)\n    at ir (http://grafana:3000/public/build/4713.8a8cb5e884bc8a897819.js:2:2851710)\n    at http://grafana:3000/public/build/4713.8a8cb5e884bc8a897819.js:2:2854174\n    at xr (http://grafana:3000/public/build/4713.8a8cb5e884bc8a897819.js:2:2854234)","level":"error","message":"Browser uncaught exception"}
    

    I tried different versions with the same result:

    • grafana/grafana:latest (9.6.2) with grafana/grafana-image-renderer:3.6.2
    • grafana/grafana-oss:latest (9.6.2) with grafana/grafana-image-renderer:3.6.2
    • grafana/grafana-oss:9.6.1 with grafana/grafana-image-renderer:3.6.1

    What you expected to happen:

    Image is rendered for alert with data chart.

    How to reproduce it (as minimally and precisely as possible):

    Anything else we need to know?:

    Environment:

    • Grafana version: docker images
    [email protected]:/opt/grafana# docker images --digests
    REPOSITORY                       TAG       DIGEST                                                                    IMAGE ID       CREATED      SIZE
    grafana/grafana                  9.2.6     sha256:541b84ab152f675aae0a4a0aeead142923c39e45dddb7a19eeee96493eb6d778   eb4a939d5821   2 days ago   342MB
    grafana/grafana-image-renderer   3.6.2     sha256:cbb508cee8a55c9f2f850e33bfcf7e487757e309a5a417df82d2d590b1333698   e21625b496ab   3 days ago   846MB
    
    • Data source type & version: elasticsearch 7.10+
    • OS Grafana is installed on: Debian 11.5 with Docker - community version 20.10.19
    • User OS & Browser: -
    • Grafana plugins: -
    • Others: -
    opened by ISim 0
  • Explore Loki query builder uses escape on backtick strings

    Explore Loki query builder uses escape on backtick strings

    What happened: If you click on the magnifier in the Explore page the value of the label gets escaped and put inside backticks.

    image

    result query

    {app !="", level=~"error|warning", machineName="server"} | json | user=`DOMAINNAME\\USERNAME` | line_format "{{.app}}@{{.machineName}} : {{.t}} IP:{{.remoteAddr}}\n{{.user}}"
    

    What you expected to happen: either use quotes or disable escaping.

    How to reproduce it (as minimally and precisely as possible): make a loki query and click on magnifier next to log lable with special characters

    Environment:

    • Grafana version: 9.2.6
    • OS Grafana is installed on: Windows Server 2019
    • Others: loki, version HEAD-1b627d8 (branch: HEAD, revision: 1b627d880) build user: [email protected] build date: 2022-11-10T23:52:44Z go version: go1.19.2 platform: windows/amd64
    opened by gkloss 0
  • Horizontal BarChart has too many tick marks to fit the X-axis

    Horizontal BarChart has too many tick marks to fit the X-axis

    What happened: On a horizontal bar chart with automatic maximum and number of decimals, the tick value labels are not spaced sufficiently anymore. What you expected to happen: I expect the chart to use not more tick marks than labels than would fit along the axis and be still readable.

    How to reproduce it (as minimally and precisely as possible): I have a simple table with two rows (series) and two data columns: image

    The stacked bar has unit defined as "MB" (as the input data is in MB) and thus needs to cover the maximum of 5.5 GB (properly rounded to 6 GB). The display shows the labels running into each other, or positioned just too close.

    image

    Anything else we need to know?: I know that scaling with MB and GB can be a challenge since the number of digits varies, and depends on the position in the scale. Maybe the code didn't account for the "MB" suffix (it looks slightly better when I change the unit to "bytes" - though obviously incorrect) but then the labels are overdone with something like "500.0 B". I don't want to set the decimals to 0 because for a lower maximum it results in multiple tick labels with the same value. When dealing with these 1024 scaling factors, I really don't know what 4.75 GB is; when the number of ticks is reduced, you might avoid those intermediates already.

    PS I tried whether Log2 scale worked better; in a way it is because there are less ticks. It starts nicely with 8 and 16 MB, but then comes up with ticks at 2.05 GB or 8.19 GB... But I'm delighted to see something like that just work, and understand whether this is more useful as visualization (tough call because it does make it easier to see the small ones, but hides the fact than those are peanuts and there's one huge group).

    image

    Environment:

    • Grafana version: 8.5.1
    • Data source type & version: InfluxDB 1.8.10
    • OS Grafana is installed on: RHEL 9.1
    • User OS & Browser: RHEL & Chrome
    • Grafana plugins: n/a
    • Others:
    opened by rvdheij 0
  • $__to and $__from does not work in alert rules

    $__to and $__from does not work in alert rules

    What happened: I am trying to set up new alert rule.

    SELECT
        start_time as "time",
        duration
    FROM cronscript_duration_ts
    WHERE
      start_time between $__from and $__to
    GROUP BY 1
    ORDER BY 1
    

    Then I get error in upper right corner of the window:

    Failed to evaluate queries and expressions: failed to execute conditions: failed to execute query A: db query error: pq: syntax error at or near "$"

    I know I could have used $__timeFilter(start_time) in this example but I have just made a smallest example possible to show the problem, in reality I need those elsewhere. The point is just that they dont work. I have tried '${__to}' and ${__to} and '$__to' as well, nothing works.

    What you expected to happen: I have expected that the variables would give the "from" and "to" time.

    How to reproduce it (as minimally and precisely as possible): create a table, use a query.

    Anything else we need to know?:

    Environment:

    • Grafana version:
    • 9.2.2 (also tested on 9.2.6 with same result)
    • Data source type & version: Postgres 14 timescaledb 2.8.1
    • OS Grafana is installed on: rocky linux
    • User OS & Browser: ubuntu, brave
    • Grafana plugins: marcusolsson-dynamictext-panel
    • Others:
    opened by LukasJerabek 0
  • Transparent background leaves some artefacts white

    Transparent background leaves some artefacts white

    What happened: Using "transparent background" for all panels on the dashboard leaves a few parts in color (white or dark grey)

    What you expected to happen: I expected these parts to use transparent background as well.

    How to reproduce it (as minimally and precisely as possible): Create a new row and new panel, set "transparent background" and fill in a "description" Look at the dashboard in both dark and light theme

    Anything else we need to know?: image image

    This shows the panel corner with the (i) as well as the folded row underneath in dark grey, while the rest of it is coal black.

    I like the transparent background for some dashboards, as it gives the dashboard a very elegant look. The folded rows and the folded upper-left corner of the panel stand out where they shouldn't.

    Environment:

    • Grafana version: 9.2.5
    • Data source type & version: InfluxDB 1.8.10
    • OS Grafana is installed on: RHEL 9.1
    • User OS & Browser: RHEL & Chrome
    • Grafana plugins: n/a
    • Others:
    opened by rvdheij 1
Releases(v9.2.6)
Owner
Grafana Labs
Grafana Labs is behind leading open source projects Grafana and Loki, and the creator of the first open & composable observability platform.
Grafana Labs
An example logging system using Prometheus, Loki, and Grafana.

Logging Example Structure Collector Export numerical data for Prometheus and log data for Promtail. Exporter uses port 8080 Log files are saved to ./c

YoungHwan Joo 4 Oct 15, 2022
Go starter project with Gin, Viper, postgres , redis, zap, prometheus metrics etc setup

Go REST Service Starter/Boilerplate Easily extendible REST API Service boilerplate aiming to follow idiomatic go and best practice. Any feedback and p

Kshitij Singh 1 Jun 23, 2022
SigNoz 4.7k Sep 24, 2021
Like Prometheus, but for logs.

Loki: like Prometheus, but for logs. Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It

Grafana Labs 17.6k Nov 20, 2022
gosivy - Real-time visualization tool for Go process metrics

Gosivy tracks Go process's metrics and plot their evolution over time right into your terminal, no matter where it's running on. It helps you understand how your application consumes the resources.

Ryo Nakao 448 Nov 9, 2022
Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console.

logkit-community δΈ­ζ–‡η‰ˆ Introduce Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console. logkit-community De

Qiniu Cloud 1.3k Nov 25, 2022
A Postgres Metrics Dashboard

#Pome Pome stands for Postgres Metrics. Pome is a PostgreSQL Metrics Dashboard to keep track of the health of your database. This project is at a very

Rachid Belaid 1.1k Nov 18, 2022
pprof is a tool for visualization and analysis of profiling data

Introduction pprof is a tool for visualization and analysis of profiling data. pprof reads a collection of profiling samples in profile.proto format a

Google 6k Nov 23, 2022
Pragmatic and minimalistic module for collecting and sending traces from Go code πŸ’ͺ🏽

tracing-go Pragmatic and minimalistic module for collecting and exporting trace data from the Go code. prometheus/client_golang but for Traces NOTE: T

Bartlomiej Plotka 9 May 20, 2022
Write log entries, get X-Ray traces.

logtoxray Write to logs, get X-Ray traces. No distributed tracing instrumenation library required. ?? ?? ?? THIS PROJECT IS A WORK-IN-PROGRESS PROTOTY

JBD 27 Apr 24, 2022
Tracetest - Trace-based testing. End-to-end tests powered by your OpenTelemetry Traces.

End-to-end tests powered by OpenTelemetry. For QA, Dev, & Ops. Live Demo | Documentation | Twitter | Discord | Blog Click on the image or this link to

kubeshop 302 Nov 24, 2022
Structured, composable logging for Go

log15 Package log15 provides an opinionated, simple toolkit for best-practice logging in Go (golang) that is both human and machine readable. It is mo

Alan Shreve 1.1k Nov 18, 2022
gin-gonic/gin metrics for prometheus.

gin-metrics gin-gonic/gin metrics exporter for Prometheus. δΈ­ζ–‡ Introduction gin-metrics defines some metrics for gin http-server. There have easy way t

Pelen 145 Nov 22, 2022
Goimportcycle - a tool to visualize Go imports resolved to the file level

Go Import Cycle goimportcycle is a tool to visualize Go imports resolved to the

Sam L 28 Apr 24, 2022
mtail - extract internal monitoring data from application logs for collection into a timeseries database

mtail - extract internal monitoring data from application logs for collection into a timeseries database mtail is a tool for extracting metrics from a

Google 3.4k Nov 16, 2022
A flexible process data collection, metrics, monitoring, instrumentation, and tracing client library for Go

Package monkit is a flexible code instrumenting and data collection library. See documentation at https://godoc.org/gopkg.in/spacemonkeygo/monkit.v3 S

Space Monkey Go 470 Nov 26, 2022
Library and program to parse and forward HAProxy logs

haminer Library and program to parse and forward HAProxy logs. Supported forwarder, Influxdb Requirements Go for building from source code git for dow

Shulhan 22 Aug 17, 2022
Search and analysis tooling for structured logs

Zed The Zed system provides an open-source, cloud-native, and searchable data lake for semi-structured and structured data. Zed lakes utilize a supers

Brim 911 Nov 22, 2022
A customized GORM logger that implements the appropriate interface and uses Logrus to output logs

CryptoMath GORM Logger A customized GORM logger that implements the appropriate interface and uses Logrus to output logs. Install go get github.com/ma

Crypto Math 0 Nov 6, 2021