{"id":13508419,"url":"https://github.com/prometheus-erl/prometheus_process_collector","last_synced_at":"2025-10-08T12:46:46.275Z","repository":{"id":10036748,"uuid":"64173448","full_name":"prometheus-erl/prometheus_process_collector","owner":"prometheus-erl","description":"Prometheus.io process collector in Erlang","archived":false,"fork":false,"pushed_at":"2025-02-25T11:07:39.000Z","size":2695,"stargazers_count":52,"open_issues_count":15,"forks_count":39,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-08T10:58:58.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/prometheus-erl.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}},"created_at":"2016-07-25T22:59:46.000Z","updated_at":"2025-02-25T11:07:44.000Z","dependencies_parsed_at":"2024-06-18T19:49:12.192Z","dependency_job_id":"1c83414b-2f38-48e7-b055-d0bd1c616a51","html_url":"https://github.com/prometheus-erl/prometheus_process_collector","commit_stats":null,"previous_names":["deadtrickster/prometheus_process_collector.erl","prometheus-erl/prometheus_process_collector","deadtrickster/prometheus_process_collector"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/prometheus-erl/prometheus_process_collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-erl%2Fprometheus_process_collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-erl%2Fprometheus_process_collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-erl%2Fprometheus_process_collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-erl%2Fprometheus_process_collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prometheus-erl","download_url":"https://codeload.github.com/prometheus-erl/prometheus_process_collector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prometheus-erl%2Fprometheus_process_collector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278947995,"owners_count":26073740,"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-08T02:00:06.501Z","response_time":56,"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-08-01T02:00:52.776Z","updated_at":"2025-10-08T12:46:46.260Z","avatar_url":"https://github.com/prometheus-erl.png","language":"C++","funding_links":[],"categories":["Instrumenting / Monitoring"],"sub_categories":[],"readme":"# Prometheus.io Process Collector\n[![Hex.pm](https://img.shields.io/hexpm/v/prometheus_process_collector.svg?maxAge=2592000?style=plastic)](https://hex.pm/packages/prometheus_process_collector)\n[![Hex.pm](https://img.shields.io/hexpm/dt/prometheus_process_collector.svg?maxAge=2592000)](https://hex.pm/packages/prometheus_process_collector)\n[![Hex\nDocs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/prometheus_process_collector/)\n[![GitHub Actions](https://github.com/prometheus-erl/prometheus_process_collector/actions/workflows/ci.yml/badge.svg)](https://github.com/prometheus-erl/prometheus_process_collector/actions/workflows/ci.yml)\n[![Codecov](https://codecov.io/github/prometheus-erl/prometheus_process_collector/graph/badge.svg?token=G9HB5UKNIY)](https://codecov.io/github/prometheus-erl/prometheus_process_collector)\n\n\nCollector which exports the current state of process metrics including cpu, memory, file descriptor usage and native threads count as well as the process start and up times.\n\n- FreeBSD;\n- Linux - uses /proc;\n- MacOS X (expiremental).\n\n## Installation\n\n**Hex package note**: Because OTP strictly validates NIF version c_src was compiled with, I removed precompiled binaries from the Hex package. This means that OTP source code is needed to build this library.\n\nAlso collector needs to be registered (for example in default registry):\n\n```erlang\nprometheus_registry:register_collector(prometheus_process_collector)\n```\n\n```elixir\nrequire Prometheus.Registry\nPrometheus.Registry.register_collector(:prometheus_process_collector)\n```\n\n## Example scrape:\n\n```\n# TYPE process_open_fds gauge\n# HELP process_open_fds Number of open file descriptors.\nprocess_open_fds 13\n# TYPE process_max_fds gauge\n# HELP process_max_fds Maximum number of open file descriptors.\nprocess_max_fds 20000\n# TYPE process_start_time_seconds gauge\n# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.\nprocess_start_time_seconds 1508230997\n# TYPE process_uptime_seconds counter\n# HELP process_uptime_seconds Process uptime in seconds.\nprocess_uptime_seconds 76\n# TYPE process_threads_total gauge\n# HELP process_threads_total Process Threads count.\nprocess_threads_total 22\n# TYPE process_virtual_memory_bytes gauge\n# HELP process_virtual_memory_bytes Virtual memory size in bytes.\nprocess_virtual_memory_bytes 3015249920\n# TYPE process_resident_memory_bytes gauge\n# HELP process_resident_memory_bytes Resident memory size in bytes.\nprocess_resident_memory_bytes 1224400\n# TYPE process_cpu_seconds_total counter\n# HELP process_cpu_seconds_total Process CPU seconds total.\nprocess_cpu_seconds_total{kind=\"utime\"} 0.768\nprocess_cpu_seconds_total{kind=\"stime\"} 0.368\n# TYPE process_max_resident_memory_bytes gauge\n# HELP process_max_resident_memory_bytes Maximum resident set size used.\nprocess_max_resident_memory_bytes 50192384\n# TYPE process_noio_pagefaults_total counter\n# HELP process_noio_pagefaults_total Number of page faules serviced without any I/O activity.\nprocess_noio_pagefaults_total 16015\n# TYPE process_io_pagefaults_total counter\n# HELP process_io_pagefaults_total Number of page faults serviced that required I/O activity.\nprocess_io_pagefaults_total 0\n# TYPE process_swaps_total counter\n# HELP process_swaps_total Number of times a process was \"swapped\" out of main memory.\nprocess_swaps_total 0\n# TYPE process_disk_reads_total counter\n# HELP process_disk_reads_total Number of times the file system had to perform input.\nprocess_disk_reads_total 0\n# TYPE process_disk_writes_total counter\n# HELP process_disk_writes_total Number of times the file system had to perform output.\nprocess_disk_writes_total 80\n# TYPE process_signals_delivered_total counter\n# HELP process_signals_delivered_total Number of signals delivered.\nprocess_signals_delivered_total 0\n# TYPE process_voluntary_context_switches_total counter\n# HELP process_voluntary_context_switches_total Number of times a context switch resulted due to a process voluntarily giving up the processor.\nprocess_voluntary_context_switches_total 1131\n# TYPE process_involuntary_context_switches_total counter\n# HELP process_involuntary_context_switches_total Number of times a context switch resulted due to a higher priority process becoming runnable or because the current process exceeded its time slice.\nprocess_involuntary_context_switches_total 208\n```\n\nUsage\n-----\n\nYou can register this collector manually using `prometheus_process_collector/0,1` or use `default_collectors` env entry for `prometheus`.\n\nWith [Prometheus Plugs](https://github.com/prometheus-erl/prometheus-plugs) - just add prometheus_process_collector dependency to top-level project (i.e. [like here](https://github.com/prometheus-erl/prometheus-plugs-example/edit/master/mix.exs)).\n\n## Integrations / Collectors / Instrumenters\n - [Ecto collector](https://github.com/prometheus-erl/prometheus-ecto)\n - [Plugs Instrumenter/Exporter](https://github.com/prometheus-erl/prometheus-plugs)\n - [Elli middleware](https://github.com/elli-lib/elli_prometheus)\n - [Fuse plugin](https://github.com/jlouis/fuse#fuse_stats_prometheus)\n - [Phoenix instrumenter](https://github.com/prometheus-erl/prometheus-phoenix)\n - [Process Info Collector](https://github.com/prometheus-erl/prometheus_process_collector)\n - [Prometheus.erl](https://github.com/prometheus-erl/prometheus.erl)\n - [Prometheus.ex](https://github.com/prometheus-erl/prometheus.ex)\n - [RabbitMQ Exporter](https://github.com/prometheus-erl/prometheus_rabbitmq_exporter)\n\nLicense\n-----\n\nFreeBSD-specific part uses copy-modified code from standard utils (limits and procstat) or standard API in some places.\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-erl%2Fprometheus_process_collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprometheus-erl%2Fprometheus_process_collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprometheus-erl%2Fprometheus_process_collector/lists"}