{"id":20740954,"url":"https://github.com/rollbar/prometheus-exporter","last_synced_at":"2026-04-27T04:32:26.611Z","repository":{"id":43047521,"uuid":"379730395","full_name":"rollbar/prometheus-exporter","owner":"rollbar","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-08T08:33:30.000Z","size":19,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-12-26T16:43:52.463Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rollbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-23T21:12:44.000Z","updated_at":"2023-10-26T02:37:27.000Z","dependencies_parsed_at":"2023-01-24T21:45:44.608Z","dependency_job_id":null,"html_url":"https://github.com/rollbar/prometheus-exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rollbar/prometheus-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollbar%2Fprometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollbar%2Fprometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollbar%2Fprometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollbar%2Fprometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rollbar","download_url":"https://codeload.github.com/rollbar/prometheus-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rollbar%2Fprometheus-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32323213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-17T06:31:42.351Z","updated_at":"2026-04-27T04:32:26.595Z","avatar_url":"https://github.com/rollbar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instructions for the Rollbar Prometheus Exporter\n\n## Background\nThis prometheus exporter takes Rollbar item and occurrence data that is available from the Rollbar API and converts it into a format that can be consumed by Prometheus  \n  \nOnce the metrics data is in Prometheus it can be used in dashboarding tools, for example Grafana   \n\n## Requirements\nvirtualenv  \npython 3.x (This exporter been tested with Python 3.8.5)  '\n\nIt is a requirement that the Rollbar projects that you are getting metrics, for has the following parameters set: \n\nenvironment  \ncode_version  \n\n### Setting up an environment for the exporter\nDownload this source code repository  \n\nOpen an command window and change directory (cd) to the root directory of this source code repository  \n\n#### 1. Create the environment\n\nCreating the environment involves the following steps:  \n\n1. Give the ./create_environment.sh shell script execute permissions   \n2. Execute ./create_environment.sh to create the environment  \n\nSee the commands below  \n\nchmod +x ./create_environment.sh  \n  \n./create_environment.sh  \n\nYou should now have a virtual environment that has installed the required dependencies from ./requirements.txt  \n\n#### 2. Confirm the version of python\n\nConfirm the version of python in yoru virtual environment\n\nsource venv/bin/activate  \npython3 --version  \n\nThe version of python3 should be version 3.7 or higher  \n\n\n#### 3. Add read access tokens to projects.json for the Projects that you want metrics for\ncd ./metrics  \n\n\nOpen projects.json and add your Rollbar project_names (also called project_slugs) and read_access_tokens as shown below  \n  \n{  \n    \"project_name_1\": \"PROJECT_ACCESS_TOKEN_WITH_READ_SCOPE\",  \n    \"project_name_2\": \"PROJECT_ACCESS_TOKEN_WITH_READ_SCOPE\"  \n\n\n#### 4. Create a Rollbar project to accept errors from this prometheus_exporter application  \n\nSet it up so that this prometheus exporter application sends error data to Rollbar if errors occur\n\n\nCreate a Rollbar project called Prometheus Exporter\nGet a project access token with post_server_item scope\n  \ncd ./metrics   \nAdd the Rollbar read_access_token and environment information to config.ini\n\n[rollbar]  \naccess_token=PROJECT_ACCESS_TOKEN_WITH_POST_SERVER_SCOPE  \nenvironment=production  \ncode_version=0.0001  \n  \nSave config.ini\n\nWhen this prometheus exporter application is running, check Rollbar from time to time for errors  \nConfigure notifications and other workflows as needed in Rollbar  \n\n  \n### Running the application as a flask web application  \n\n#### Change the port if needed\nThe default port is 8083 (see port settings in metrics/app.py). \nYou can override this by setting an EXPORTER_PORT environment variable with a different port\n\n#### Run the flask application\nFrom the root folder of the repository run the folloiwng commands  \n  \nsource venv/bin/activate    \ncd ./metrics    \npython3 app.py  \n  \nThe runs the file app.py as a web application (by default on port 8083)  \n  \napp.py has a /metrics endpoint that prometheus can query  \n  \nGenerate some errors in the projects referenced in projects.json above  \n\nFrom a browser open http(s)://localhost:8083/metrics  \n\nYou should see a list of the metrics \n\n\n#### To stop the flask application\n\nFrom the command window where the flask application is running type Control-C  \n  \n  \n## Prometheus Configuration  \nFrom the root folder of this source code repository \n\nCopy the contents of ./util/prometheus.yml file into the prometheus.yml file for your prometheus installation\n\nRestart prometheus\n  \nPrometheus will now go out and pull metrics from http(s)://your_host_name:8083/metrics every 15 seconds    \n\n\n### Debugging this prometheus exporter application from a command line  \n\nTo check once for metrics from Rollbar, or to debug the application you can run this prometheus exporter application directly from a command line  \n\nFrom the root folder of the repository do the following  \n\nsource venv/bin/activate  \ncd ./metrics  \n\n../venv/bin/python3 process_metrics.py  \n\n  \nThis will allow you to check for metrics once    \nIt will print the metrics back to the screen   \n  \nThis is also an easy way to debug the application \n\n\n  \n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollbar%2Fprometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frollbar%2Fprometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollbar%2Fprometheus-exporter/lists"}