{"id":26708522,"url":"https://github.com/triformine/discordeno-prometheus-plugin","last_synced_at":"2025-03-27T07:18:57.839Z","repository":{"id":62421489,"uuid":"450542628","full_name":"TriForMine/discordeno-prometheus-plugin","owner":"TriForMine","description":null,"archived":false,"fork":false,"pushed_at":"2022-01-21T17:25:07.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-01T17:32:57.975Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/TriForMine.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":"2022-01-21T15:27:28.000Z","updated_at":"2022-05-23T17:27:29.000Z","dependencies_parsed_at":"2022-11-01T17:31:52.764Z","dependency_job_id":null,"html_url":"https://github.com/TriForMine/discordeno-prometheus-plugin","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TriForMine%2Fdiscordeno-prometheus-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TriForMine%2Fdiscordeno-prometheus-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TriForMine%2Fdiscordeno-prometheus-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TriForMine%2Fdiscordeno-prometheus-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TriForMine","download_url":"https://codeload.github.com/TriForMine/discordeno-prometheus-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798244,"owners_count":20673906,"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":"2025-03-27T07:18:57.200Z","updated_at":"2025-03-27T07:18:57.810Z","avatar_url":"https://github.com/TriForMine.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discordeno-prometheus-plugin\n\nThis is an unofficial plugin. This plugin provides a http server that respond\nwith stats used by Prometheus. As of now, it will only provide memory usage.\n\n## Requirements\n\n- [Prometheus](https://prometheus.io/docs/prometheus/latest/getting_started/),\n  prometheus fetches the server every x seconds/minutes and store them.\n- [Grafana](https://grafana.com/grafana/download?pg=get\u0026plcmt=selfmanaged-box1-cta1\u0026edition=oss),\n  grafana will be used to show the data in a great dashboard.\n\n## Optional dependencies\n\n[cache-plugin](https://github.com/discordeno/cache-plugin): If cache-plugin is\nenabled, you will also be able to get the amount of objects stored in cache.\n\n## Running the server\n\n```ts\n// MOVE TO DEPS.TS AND USE SPECIFIC VERSION\nimport enablePrometheusPlugin from \"https://deno.land/x/discordeno_prometheus_plugin/mod.ts\";\n// Create the bot object, THIS WILL NEED YOUR OPTIONS.\nconst bot = createBot({});\n// Be sure to enable it after cache plugin, if you have it.\n// Enable the prometheus plugin, the http server will starts on port 8888(default)\nenablePrometheusPlugin(bot, 8888);\n// Start your bot\nawait startBot(bot);\n```\n\n## Prometheus Configuration\n\nYou will have to configure prometheus, so it fetches the server.\n\nYou first need to find the prometheus.yml file.\n\nOn linux: `/etc/prometheus/prometheus.yml`\n\nThen add this at the end of the file.\n\n```yml\nscrape_configs:\n  # You probably have the prometheus job here, just keep it.\n\n  # This is what you need to add\n  - job_name: \"YOUR_BOT_NAME\"\n\n    static_configs:\n      - targets: [\"localhost:YOUR_PORT\"] # By default, the port is 8888\n        labels:\n          group: \"production\" # Anything you want\n```\n\n## Grafana Configuration\n\nOnce you have done all the above, you are ready to configure grafana.\n\nYou can either experiment yourself and make your own dashboard, or you can use\nthe following template:\n\n[https://grafana.com/grafana/dashboards/15521](https://grafana.com/grafana/dashboards/15521)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriformine%2Fdiscordeno-prometheus-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriformine%2Fdiscordeno-prometheus-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriformine%2Fdiscordeno-prometheus-plugin/lists"}