{"id":31284859,"url":"https://github.com/rifleh700/mprometheus","last_synced_at":"2026-06-23T03:31:21.070Z","repository":{"id":311936002,"uuid":"1045629122","full_name":"rifleh700/mprometheus","owner":"rifleh700","description":"MTA:SA metrics system + prometheus exporter","archived":false,"fork":false,"pushed_at":"2025-08-28T16:23:03.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T07:38:44.761Z","etag":null,"topics":["grafana","mta","mtasa","multitheftauto","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/rifleh700.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-27T13:29:39.000Z","updated_at":"2025-08-31T18:41:32.000Z","dependencies_parsed_at":"2025-08-27T23:48:57.169Z","dependency_job_id":"28fc01b7-1a10-4a56-8dcf-b0a70cd9f388","html_url":"https://github.com/rifleh700/mprometheus","commit_stats":null,"previous_names":["rifleh700/mprometheus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rifleh700/mprometheus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifleh700%2Fmprometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifleh700%2Fmprometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifleh700%2Fmprometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifleh700%2Fmprometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rifleh700","download_url":"https://codeload.github.com/rifleh700/mprometheus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifleh700%2Fmprometheus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34674702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":["grafana","mta","mtasa","multitheftauto","prometheus"],"created_at":"2025-09-24T07:34:00.388Z","updated_at":"2026-06-23T03:31:21.063Z","avatar_url":"https://github.com/rifleh700.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mprometheus\nMTA:SA metrics system + prometheus exporter\n\n\u003e [!IMPORTANT]  \n\u003e Minimum MTA server version is **1.6.0 r22639** since resource uses `router` http function\n\n![screenshot](https://i.imgur.com/4GW5wfz.png)\n\n## Quick start\n1. Download Prometheus [(link)](https://prometheus.io/download/) and unpack ZIP\n2. Go to unpacked folder and configure `prometheus.yml`:\n   - find `scrape_configs` block\n   - add `metrics_path` property\n   - put your server's `host:HTTP-port` to `targets` property\n\n```yaml\nscrape_configs:\n  - job_name: \"prometheus\"\n\n    metrics_path: \"/mprometheus/metrics\"\n\n    static_configs:\n      - targets: [\"localhost:22005\"]\n        labels:\n          app: \"prometheus\"\n\n    # U also can use MTA user login and password for simple auth.\n    # This account must have ACL right \u003cright name=\"resource.mprometheus.http\" access=\"true\"\u003e\u003c/right\u003e\n    # We'll add this right by default for all\n    #basic_auth:\n    #  username: 1337\n    #  password: 1337\n```\n3. Add ACL right to `Default` acl (or use simple HTTP auth instead with specific account)\n```xml\n\u003cacl name=\"Default\"\u003e\n    \u003cright name=\"resource.mprometheus.http\" access=\"true\"\u003e\u003c/right\u003e\n```\n(reload ACL with `reloadacl` command in server console or restart the server)\n\n4. Download and start `mprometheus` resource\n5. Check this url in your browser http://localhost:22005/mprometheus/metrics (u must see not blank page) \n6. Run `prometheus.exe`\n7. Check this url in your browser http://localhost:9090/\n    - type `server_info` query and press `execute`\n    - u must see result likes `server_info{app=\"prometheus\", instance=\"localhost:22005\", job=\"prometheus\", min_client_version=\"1.6.0-9.23324.0\", platform=\"Windows\", version=\"1.6.0-9.23324.0\"}`\n8. Download Grafana [(link)](https://grafana.com/grafana/download?edition=oss) and install it (or unpack archive)\n9. Run Grafana or start `bin/grafana-server.exe`\n10. Open http://localhost:3000 in your browser and login (`admin`:`admin` by default)\n11. Press button `Add your first data source`\n    - click `Prometheus`\n    - type name `mta_prometheus`\n    - type url http://localhost:9090\n    - scroll down and press `save \u0026 test`\n12. Go home and press `Create your first dashboard`\n    - `Import dashboard` (discard)\n    - `Upload dashboard JSON file`\n    - find file `MTA_Server_Grafana.json` in `mprometheus` resource [(or just download it separately)](https://raw.githubusercontent.com/rifleh700/mprometheus/refs/heads/main/MTA_Server_Grafana.json) and choose it\n\n## Exported server-side function\n- `boolean registerCounter(string name [, string description])`\n- `boolean registerGauge(string name [, string description])`\n- `boolean removeGauge(string name)`\n- `boolean registerSummary(string name [, string description])`\n- `boolean addCounterValue(string name, float value [, table labels])`\n- `boolean setCounterValue(string name, float value [, table labels])`\n- `boolean setGaugeValue(string name, float value [, table labels])`\n- `boolean addSummaryValue(string name, float value [, table labels])`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frifleh700%2Fmprometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frifleh700%2Fmprometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frifleh700%2Fmprometheus/lists"}