Skip to content

Dashboard is a collection of pre-made Grafana dashboards that let you track and analyze data from Twitter, GitHub, Docker, and Packagist.

License

Notifications You must be signed in to change notification settings

metrixio/dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metrics dashboard

Dashboard is a collection of pre-made Grafana dashboards that let you track and analyze data from Twitter, GitHub, Docker, and Packagist.

It's super handy for developers and other professionals who need to keep an eye on certain metrics, but don't want to spend time building their own dashboards from scratch.

All you have to do is clone the repository and choose the metrics collectors you want to use, and you'll be able to see your data in real-time. Plus, with Grafana, you can create dashboards that show live data and set up alerts to let you know if anything changes or seems off.

View full video on youtube

Requirements

Installation

Clone the repository:

git clone https://github.com/metrixio/dashboard.git

cd ./dashboard

chmod 0777 runtime/ -R

Configuration

To configure the metrics collectors you want to use, you will need to edit the docker-compose.yaml file and add the appropriate service definitions for the collectors you want to use.

Twitter

twitter

To use the twitter collector, you will need to have a Twitter developer account and create a Twitter API credentials. Once you have obtained your API key, you can start collecting data. Then you just need to specify the list of account IDS to follow in TWITTER_ACCOUNTS environment variable.

Note: You can find out the account ID via some of the services like - tweeterid.com.

services:
  twitter-metrics:
    image: ghcr.io/metrixio/twitter:latest
    environment:
      TWITTER_CONSUMER_KEY: xxx
      TWITTER_CONSUMER_SECRET: xxx
      TWITTER_ACCESS_TOKEN: xxx
      TWITTER_ACCESS_TOKEN_SECRET: xxx
      TWITTER_ACCOUNTS: 17227608,25073877,783214
    restart: on-failure

  ...

Configure the Prometheus server to scrape metrics from the Twitter metrics collector in prometheus/prometheus.yml file:

scrape_configs:
  - job_name: 'twitter'
    scrape_interval: 60s
    static_configs:
      - targets: [ 'twitter-metrics:2112' ]
  ...

Put dashboards you want to use in grafana/provisioning/dashboards directory from the dashboards repository

Docker

docker

To use the docker collector, you just need to specify the list of repositories to follow in DOCKER_REPOSITORIES environment variable:

services:
  docker-metrics:
    image: ghcr.io/metrixio/docker:latest
    environment:
      DOCKER_REPOSITORIES: spiralscout/roadrunner,butschster/buggregator
    restart: on-failure

  ...

Configure the Prometheus server to scrape metrics from the Twitter metrics collector in prometheus/prometheus.yml file:

scrape_configs:
  - job_name: 'docker'
    scrape_interval: 60s
    static_configs:
      - targets: [ 'docker-metrics:2112' ]
  ...

Put dashboards you want to use in grafana/provisioning/dashboards directory from the dashboards repository

Gituhb public

github

To use the package, you just need to create a Github API token. Once you have obtained your API token, you can use the package's functions to authenticate and start collecting data.

Then you need to specify the list of repositories to follow in GITHUB_REPOSITORIES environment variable:

services:
  github-public-metrics:
    image: ghcr.io/metrixio/github-public:latest
    environment:
      GITHUB_TOKEN: xxx
      GITHUB_REPOSITORIES: spiral/framework,spiral/roadrunner
    restart: on-failure

  ...

Configure the Prometheus server to scrape metrics from the Twitter metrics collector in prometheus/prometheus.yml file:

scrape_configs:
  - job_name: 'github-public'
    scrape_interval: 60s
    static_configs:
      - targets: [ 'github-public-metrics:2112' ]
  ...

Put dashboards you want to use in grafana/provisioning/dashboards directory from the dashboards repository

Packagist

packagist

To use the packagist collector, you just need to specify the list of repositories to follow in PACKAGIST_REPOSITORIES environment variable:

services:
  packagist-metrics:
    image: ghcr.io/metrixio/packagist:latest
    environment:
      PACKAGIST_REPOSITORIES: spiral/framework
    restart: on-failure

  ...

Configure the Prometheus server to scrape metrics from the packagist metrics collector in prometheus/prometheus.yml file:

scrape_configs:
  - job_name: 'docker'
    scrape_interval: 60s
    static_configs:
      - targets: [ 'packagist-metrics:2112' ]
  ...

Put dashboards you want to use in grafana/provisioning/dashboards directory from the dashboards repository

Usage

docker compose up

Metrics will be available on http://127.0.0.1:3000

Default username: admin Default password: secret

Enjoy!

About

Dashboard is a collection of pre-made Grafana dashboards that let you track and analyze data from Twitter, GitHub, Docker, and Packagist.

Topics

Resources

License

Stars

Watchers

Forks