{"id":13622175,"url":"https://github.com/prometheus-junkyard/promdash","last_synced_at":"2025-12-17T18:15:21.101Z","repository":{"id":11356024,"uuid":"13788490","full_name":"prometheus-junkyard/promdash","owner":"prometheus-junkyard","description":"Prometheus Dashboard Builder","archived":true,"fork":false,"pushed_at":"2017-02-16T23:49:37.000Z","size":1841,"stargazers_count":271,"open_issues_count":54,"forks_count":48,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-08T09:41:54.208Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://prometheus.io/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prometheus-junkyard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-22T23:15:38.000Z","updated_at":"2024-01-30T19:51:11.000Z","dependencies_parsed_at":"2022-09-23T21:30:24.615Z","dependency_job_id":null,"html_url":"https://github.com/prometheus-junkyard/promdash","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-junkyard%2Fpromdash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-junkyard%2Fpromdash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-junkyard%2Fpromdash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-junkyard%2Fpromdash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prometheus-junkyard","download_url":"https://codeload.github.com/prometheus-junkyard/promdash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249015980,"owners_count":21198824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T21:01:15.185Z","updated_at":"2025-12-17T18:15:13.675Z","avatar_url":"https://github.com/prometheus-junkyard.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"**NOTE**: PromDash is **deprecated**. We recommend\n[**Grafana**](https://prometheus.io/docs/visualization/grafana/) for\nvisualization of Prometheus metrics nowadays, as it has native Prometheus\nsupport and is widely adopted and powerful.\n\n# PromDash\n\nDashboards for Prometheus.\n\n![promdash](https://prometheus.io/assets/promdash_event_processor-cba2ecbeb64.png)\n\n## Testing\n\n[![Build Status](https://travis-ci.org/prometheus/promdash.svg?branch=master)](https://travis-ci.org/prometheus/promdash)\n\n### Ruby\n\n```bash\n$ bundle exec rake\n```\n\n### Javascript\n\n```bash\n$ RAILS_ENV=test bundle exec rake karma:run\n```\n\n### JSHint\nJSHint is run against all pull requests. To shorten the feedback loop, it is recommended that you run JSHint locally.\nWith [NPM installed](https://docs.npmjs.com/getting-started/installing-node), install and run JSHint:\n\n```bash\n$ npm install jshint -g\n$ jshint app/assets/javascripts\n```\n\n## Deployment\n\n### Development Mode\n\nYou need need to install multiple dependencies for the full development cycle.\nHere is the rundown for Ubuntu 14.04 LTS as a reference. If you run into errors\nwith `bundle`, the most likely reason is that the database servers are not\nproperly installed with dev headers/libs.\n\n* Node.js\n * `sudo apt-get install nodejs nodejs-legacy npm`\n* Ruby\n * `sudo apt-get install ruby-full` ([details](https://www.ruby-lang.org/en/documentation/installation/))\n* MySQL\n * `sudo apt-get install libmysqlclient-dev` ([details](https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/index.html#apt-repo-fresh-install))\n* PostgreSQL\n * `sudo apt-get install postgresql-9.{3|4} postgresql-server-dev-9.{3|4}` ([details](http://www.postgresql.org/download/linux/))\n* SQLite\n * `sudo apt-get install sqlite3 libsqlite3-dev` ([details](https://www.sqlite.org/download.html))\n\nInstall gems:\n\n    bundle\n\nSet up your database:\n\n    cp config/database.yml.example config/database.yml\n    RAILS_ENV=development bundle exec rake db:setup\n\nStart the Rails server:\n\n    bundle exec rails s\n\n### Production Mode\nIn production mode, you need to define a number of environment variables to\nconfigure the database parameters:\n\n    DATABASE_URL=\"mysql2://username:password@host/database\"\n    RAILS_ENV=\"production\"\n\n**Note**: Besides MySQL, you may also use any other Rails-compatible relational\ndatabase like PostgreSQL or SQLite3. See also\nhttp://edgeguides.rubyonrails.org/configuring.html.\n\nCreate a self-contained Ruby environment and precompile assets:\n\n    make build\n\nRun the production server from the bundled environment:\n\n    bin/env bin/bundle exec bin/thin -p $PORT start\n\n### Deploy with Docker\n\nTo deploy PromDash with Docker, use the [prom/promdash](https://registry.hub.docker.com/u/prom/promdash/) Docker image.\nBy default, the image will start the [thin webserver](http://code.macournoyer.com/thin/)\nwebserver in production mode. To run rake tasks like migrations, you\ncan specify any kind of command as parameter to the Docker image.\n\n#### Super easy quickstart deployment with Docker\n\nThe following is a quick-start example for running PromDash with a file-based local database.\n\nFirst, create the SQLite3 database in a shared local Docker volume on the host:\n\n    docker run --rm -v /tmp/prom:/tmp/prom \\\n           -e DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3 \\\n           prom/promdash ./bin/rake db:migrate\n\nNow, we launch PromDash with the database we've just created:\n\n    docker run -p 3000:3000 -v /tmp/prom:/tmp/prom \\\n           -e DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3 \\\n           prom/promdash\n\nYou can pass parameters directly to the thin server with:\n\n    docker run -p 3000:4000 -v /tmp/prom:/tmp/prom \\\n           -e DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3 \\\n           prom/promdash ./bin/thin -a localhost -p 4000 start\n\n### Deploy behind a reverse proxy\n\nTo deploy PromDash behind a reverse proxy you can set a global path prefix\nusing both environment variables `PROMDASH_PATH_PREFIX` and `RAILS_RELATIVE_URL_ROOT`.\nOnce set all URLs will start with the given prefix.\n\nOne simple way to secure your Prometheus deployment with authentication is\nrunning a reverse proxy, Prometheus, and PromDash on the same machine. The goal\nis to have a publicly available deployment for authenticated users via your\nreverse proxy while restricting raw `IP:PORT` access. We won't cover any\ndetails on how to configure your reverse proxy, as it depends on what you are\nusing.\n\nAs PromDash executes Prometheus queries directly from the client it is simpler\nto use a single domain. This makes the server side ACL management simpler and\nthe client requests already authenticated. \n\n**Reverse proxy** (e.g. [nginx](http://nginx.org/), [HAProxy](http://www.haproxy.org/))\n* Set up single domain.\n * Route `http(s)://dash.example.com/dash` to backend `localhost:3000`\n * Route `http(s)://dash.example.com/prom` to backend `localhost:9090`\n* Configure the same ACL, e.g. HTTP basic auth for both backends.\n\n**Run Prometheus** with binding only to localhost to restrict direct external\naccess over the network that would circumvent your authentication. Remember to\npass the path portion in `-web.external-url`. Example for Docker:\n([full reference](http://prometheus.io/docs/introduction/install/#using-docker))\n\n    docker run -p 127.0.0.1:9090:9090 -v /prometheus-data \\\n           prom/prometheus -config.file=/prometheus-data/prometheus.yml \\\n                           -web.external-url \"http://dash.example.com/prom\"\n\n**Run PromDash** in a similar fashion. Once PromDash is running add a\nPrometheus server with `http://dash.example.com/prom/` in the web UI at\n`http://dash.example.com/dash`.\n\n    docker run -p 127.0.0.1:3000:3000 -v /tmp/prom:/tmp/prom \\\n           -e DATABASE_URL=sqlite3:/tmp/prom/file.sqlite3 \\\n           -e PROMDASH_PATH_PREFIX=/dash \\\n           -e RAILS_RELATIVE_URL_ROOT=/dash \\\n           prom/promdash\n\nFinally check that your reverse proxy is working as expected by visiting\n`dash.example.com/dash` and `dash.example.com/prom`. Both should prompt you for\ncredentials, e.g. HTTP basic auth. You can use a Chrome incognito tab to force\nauthentication. Next visit the public facing IP address on the ports\n`\u003cIP\u003e:3000/dash` and `\u003cIP\u003e:9090/prom` to verify they are in fact giving a page\nload error.\n\n### Deployment Checklist\n\n*Before* deploying a new version of PromDash, follow this checklist:\n\n- Study what has changed since the last deployment:\n  - Do any migrations need to be performed (`bundle exec rake db:migrate`)?\n  - Do any new environment variables need to be set?\n  - Did any of the stored dashboard JSON formats change in a backwards-incompatible way?\n- To be safe, create a backup of the current PromDash database.\n- Do tests pass for the new revision?\n- Are there any other particularly risky changes?\n\n*After* deploying a new version:\n\n- Perform a hard refresh in the browser to ensure all loaded assets are up-to-date.\n- Test basic functionality as appropriate (Prometheus and Graphite graph settings, etc.).\n\n### Security Considerations\n\nSince we frequently need to display various PromDash views in inline frames, we\ndisabled Rails' default header `X-Frame-Options: SAMEORIGIN` for all views:\n\nhttps://github.com/prometheus/promdash/commit/5b1da215296b5316568ad7c8449652f0d7f74ebe\n\nIf you are worried about [clickjacking attacks](http://en.wikipedia.org/wiki/Clickjacking),\nit is safe to revert this commit as long as you don't need to display dashboards in iframes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-junkyard%2Fpromdash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprometheus-junkyard%2Fpromdash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-junkyard%2Fpromdash/lists"}