Cole - Cole can use his sixth sense to give you metrics about your Grafana dashboards

Artifact Hub Build

Cole

Cole can use his sixth sense to give you metrics about your Grafana dashboards

Overview

Cole is a lightweight service that handles HTTP logs of Grafana to provide insights about the usage of Grafana instances and expose it through Prometheus metrics.

Grafana router logging dependency

Cole uses its sixth sense by Grafana HTTP logs, and because of this, you need to enable the router_logging to log all HTTP requests (not just errors).

For more information about router logging, please, check the Grafana official documentation.

Metrics Documentation

See the docs directory for more information on the exposed metrics.

Contributing

Contributions are very welcome! See our CONTRIBUTING.md for more information.

Docker images

Docker images are available on Docker Hub.

Building from source

To build Cole from source code, first ensure that you have a working Go environment with version 1.16 or greater installed.

To build the source code you can use the make build, which will compile in the assets so that Cole can be run from anywhere:

$ mkdir -p $GOPATH/src/github.com/nicolastakashi/cole
$ cd $GOPATH/src/github.com/nicolastakashi/cole
$ git clone https://github.com/nicolastakashi/cole.git
$ cd cole
$ make build
$ ./cole server <args>

The Makefile provides several targets:

  • build: build the cole
  • fmt: format the source code
  • vet: check the source code for common errors
  • tests: run unit tests
Owner
Nicolas Takashi
Born in 🇧🇷 living in 🇵🇹, I love to speak and write about distributed systems, cloud computing, architecture, systems engineering, and APIs.
Nicolas Takashi
Comments
  • Intent on servicemonitor

    Intent on servicemonitor

    Describe the bug Wrong intend on ServiceMonitor

    # Source: cole/templates/servicemonitor.yaml
    kind: ServiceMonitor
    ...
      selector:
        matchLabels:
        app.kubernetes.io/name: cole
        app.kubernetes.io/instance: cole
    

    the fields

    app.kubernetes.io/name: cole
    app.kubernetes.io/instance: cole
    ``
    should be a child of `matchLabels`
    
    
    **To Reproduce**
    Steps to reproduce the behavior:
    `helm template  cole cole/cole --set flags.grafana.namespace=monitoring --set serviceMonitor.enabled=true`
    
    
    
  • Add `user_id` label to `dashboard_last_view_seconds` metric

    Add `user_id` label to `dashboard_last_view_seconds` metric

    Is your feature request related to a problem? Please describe. When using tools like k8s-sidecar that consumes Grafana API to get a given dashboard to check if it should import or not import the dashboard, the last view is constantly updated since it's created a view log entry.

    Adding the user_id label will enable us to filter out a specific user since the k8s-sidecar needs an API user to execute the described operation (usually admin).

    Describe the solution you'd like Include user_id into dashboard_last_view_seconds metric

    Describe alternatives you've considered N/A

    Additional context N/A

  • Dashboard Info Metrics

    Dashboard Info Metrics

    Is your feature request related to a problem? Please describe.

    It would be nice if cole exposes a metric similar to the kube_pod_info from kube-state-metrics with information about the dashboard such as:

    • uid
    • isStared
    • version
    • schemaVersion
    • timeZone

    Describe the solution you'd like

    To expose that metric, cole must be able to consume data from Grafana Dashboard API to collect data and expose the metric.

    Describe alternatives you've considered N/A

    Additional context N/A

  • Change the base image to use alpine or distro less.

    Change the base image to use alpine or distro less.

    Is your feature request related to a problem? Please describe. N/A

    Describe the solution you'd like Use alpine or distro less as base images, since we don't need the entire go runtime.

    Describe alternatives you've considered N/A

    Additional context N/A

  • [FIX] Add retry if first dashboard retrieval fails

    [FIX] Add retry if first dashboard retrieval fails

    Occasionally when retrieving the dashboard information, an error would occur with the message: "msg="status: 404, body: {\"message\":\"Dashboard not found\"}"

    After some investigation it was concluded that the error occurred when the request to Grafana API coincided with the restart of Grafana pods. This PR adds a one-time retry if the GET request fails.

Snowflake grafana datasource plugin allows Snowflake data to be visually represented in Grafana dashboards.
Snowflake grafana datasource plugin allows Snowflake data to be visually represented in Grafana dashboards.

Snowflake Grafana Data Source With the Snowflake plugin, you can visualize your Snowflake data in Grafana and build awesome chart. Get started with th

Dec 29, 2022
Sensu-go-postgres-metrics - The sensu-go-postgres-metrics is a sensu check that collects PostgreSQL metrics

sensu-go-postgres-metrics Table of Contents Overview Known issues Usage examples

Jan 12, 2022
The metrics-agent collects allocation metrics from a Kubernetes cluster system and sends the metrics to cloudability

metrics-agent The metrics-agent collects allocation metrics from a Kubernetes cluster system and sends the metrics to cloudability to help you gain vi

Jan 14, 2022
A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instances.

Grafana Dashboard Synchronization Backend Plugin A Grafana backend plugin for automatic synchronization of dashboard between multiple Grafana instance

Dec 23, 2022
Terraform-grafana-dashboard - Grafana dashboard Terraform module

terraform-grafana-dashboard terraform-grafana-dashboard for project Requirements

May 2, 2022
Grafana-threema-forwarder - Alert forwarder from Grafana webhooks to Threema wire messages

Grafana to Threema alert forwarder Although Grafana has built in support for pus

Nov 11, 2022
This library provides a metrics package which can be used to instrument code, expose application metrics, and profile runtime performance in a flexible manner.

This library provides a metrics package which can be used to instrument code, expose application metrics, and profile runtime performance in a flexible manner.

Jan 18, 2022
cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resource objects related of Kubernetes Cluster API.

Overview cluster-api-state-metrics (CASM) is a service that listens to the Kubernetes API server and generates metrics about the state of custom resou

Oct 27, 2022
Flash-metrics - Flash Metrics Storage With Golang

Flash Metrics Storage bootstrap: $ echo -e "max-index-length = 12288" > tidb.con

Jan 8, 2022
Download your Fitbit weight history and connect to InfluxDB and Grafana

WemonFit Weight monitoring for Fitbit, using InfluxDB and Grafana Generating a new certificate openssl req -new -newkey rsa:2048 -nodes -keyout lo

Oct 22, 2022
:recycle: Now you can easily rollback to previous deployed images whatever you want on k8s environment

EasyRollback EasyRollback is aim to easy rollback to previous images that deployed on k8s environment Installation You should have go installation fir

Dec 24, 2022
How you can use Go to replace YAML files with Kubernetes.

YamYams A small project that is free to use. ?? I wanted to offer a starting point for anyone interested in replacing YAML with Go. You can read more

Jan 6, 2023
After approve this contract, you can use the contract to adventure with multiple characters at the same time
After approve this contract, you can use the contract to adventure with multiple characters at the same time

MultipleRarity 又又又更新了! MultipleRarity最新版:0x8ACcaa4b940eaFC41b33159027cDBDb4A567d442 注:角色冷却时间不统一时,可以不用管能不能冒险或升级,合约内部加了筛选,但消耗的gas增加了一点点,介意的可以使用常规修复版。 Mu

Nov 19, 2021
A docker container that can be deployed as a sidecar on any kubernetes pod to monitor PSI metrics

CgroupV2 PSI Sidecar CgroupV2 PSI Sidecar can be deployed on any kubernetes pod with access to cgroupv2 PSI metrics. About This is a docker container

Nov 23, 2021
Using this you can access node external ip address value from your pod.

Using this you can access node external ip address value from your pod.

Jan 30, 2022
Grafana Tempo is a high volume, minimal dependency distributed tracing backend.
Grafana Tempo is a high volume, minimal dependency distributed tracing backend.

Grafana Tempo is an open source, easy-to-use and high-scale distributed tracing backend. Tempo is cost-efficient, requiring only object storage to ope

Jan 8, 2023
Grafana Dashboard Manager

Grafana dash-n-grab Grafana Dash-n-Grab (GDG) -- Dashboard/DataSource Manager. The purpose of this project is to provide an easy to use CLI to interac

Dec 31, 2022
Graph and alert on '.rrd' data using grafana, RRDTool and RRDSrv.

Grafana RRD Datasource A grafana datasource for reading '.rrd' files via RRDTool and RRDsrv. With this datasource you will be able to create grafana d

Oct 12, 2022
PoC for Grafana 8.x Local File Inclusion (Pre-Auth)

Grafana 8.x Local File Inclusion (Pre-Auth) CVE: Pending All credits go to j0v and his tweet https://twitter.com/j0v0x0/status/1466845212626542607 Dis

Nov 9, 2022