{"id":19703557,"url":"https://github.com/monibuca/plugin-exporter","last_synced_at":"2026-07-01T15:31:20.286Z","repository":{"id":64211322,"uuid":"574118832","full_name":"Monibuca/plugin-exporter","owner":"Monibuca","description":"Monibuca Prometheus exporter 采集器 ","archived":false,"fork":false,"pushed_at":"2022-12-05T00:48:46.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"v4","last_synced_at":"2025-02-27T16:57:51.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Monibuca.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-12-04T13:42:29.000Z","updated_at":"2023-04-04T07:25:51.000Z","dependencies_parsed_at":"2022-12-04T17:30:09.249Z","dependency_job_id":null,"html_url":"https://github.com/Monibuca/plugin-exporter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Monibuca/plugin-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Monibuca","download_url":"https://codeload.github.com/Monibuca/plugin-exporter/tar.gz/refs/heads/v4","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Monibuca%2Fplugin-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010671,"owners_count":26084785,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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-11T21:18:13.987Z","updated_at":"2025-10-12T07:43:08.268Z","avatar_url":"https://github.com/Monibuca.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prometheus exporter 插件\n该插件提供 Prometheus 信息采集功能，方便集成到 Prometheus，可采集下列信息：\n\n- Monibuca 基础信息，采集器名 **base**\n- CPU，包括：CPU 负载百分比，用户时间，系统时间等， 采集器名 **cpu**\n- 内存，包括：总内存，使用内存等，采集器名 **memory**\n- 磁盘，包括：Monibuca所在磁盘总空间，使用空间等，采集器名 **disk**\n- 网络，包括：网络接收字节数，发送字节数等，采集器名 **net**\n- 媒体，包括：媒体流总数，客户端总数等，采集器名 **media**\n\n# 插件地址\ngithub.com/Monibuca/plugin-exporter\n\n# 插件引入\n```go\nimport (\n_ \"m7s.live/plugin/exporter/v4\"\n)\n```\n\n# 默认插件配置\n\n\n```yaml\nexporter:\n  printcollectors: true # 是否打印开启的采集器，默认 true\n  nodeaddr: zh_cn #节点位置\n  enabled: \"[defaults]\" #默认开启的采集器，如果是 defaults，在 yaml 里要用双引号，可以设置开启的采集器，名称见上\n  collector: #每个采集器的配置，仅 cpu net 两个采集器有配置\n    cpu:\n      percpu: false #是否分别统计每个处理器\n    net:\n      nicwhitelist: \".*\" #网卡黑白名单，支持正则表达式，默认所有\n      nicblacklist: \"\"\n```\n\n# 接口API\n`/exporter/api/metrics` \n\n# Prometheus 配置\n在 scrape_configs 下添加一个 job ，比如：\n```yaml\nscrape_configs:\n  - job_name: \"monibuca_exporter\"\n    metrics_path: \"/exporter/api/metrics\"\n    static_configs:\n      - targets: [\"ip:port\"] # monibuca 的ip和端口\n```\n\n# 二次开发\n亦可基于本插件，开发自定义的采集器，只需要实现Collector接口，即 **prometheus.Collector** 和 **engine.OnEvent** 的接口，并提供一个构建函数，可以参考 collector/cpu.go。\n\n在构建函数里，会提供 exporter.collector 下的配置。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonibuca%2Fplugin-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonibuca%2Fplugin-exporter/lists"}