{"id":19311018,"url":"https://github.com/a0s/files-content-exporter","last_synced_at":"2026-07-04T04:30:21.578Z","repository":{"id":146415002,"uuid":"138231981","full_name":"a0s/files-content-exporter","owner":"a0s","description":"Exports file's content as Prometheus metrics","archived":false,"fork":false,"pushed_at":"2020-08-26T12:08:47.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-24T00:32:26.529Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/a0s.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":"2018-06-21T23:27:39.000Z","updated_at":"2024-06-19T12:25:26.282Z","dependencies_parsed_at":"2023-04-12T23:32:35.734Z","dependency_job_id":null,"html_url":"https://github.com/a0s/files-content-exporter","commit_stats":null,"previous_names":[],"tags_count":3,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ffiles-content-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ffiles-content-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ffiles-content-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a0s%2Ffiles-content-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a0s","download_url":"https://codeload.github.com/a0s/files-content-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240412097,"owners_count":19797206,"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":"2024-11-10T00:27:20.545Z","updated_at":"2026-07-04T04:30:21.527Z","avatar_url":"https://github.com/a0s.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"files-content-exporter\n======================\n[![GitHub release](https://img.shields.io/github/release/a0s/files-content-exporter.svg)](https://github.com/a0s/files-content-exporter/releases/latest)\n[![Binary release](https://github.com/a0s/files-content-exporter/workflows/Binary%20release/badge.svg)](https://github.com/a0s/files-content-exporter/releases/latest)\n[![Docker image](https://github.com/a0s/files-content-exporter/workflows/Docker%20image/badge.svg)](https://hub.docker.com/repository/docker/a00s/files-content-exporter)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nExports file's content as Prometheus metric\n\nReleases\n--------\n\n* static linked binary: [linux/amd64](https://github.com/a0s/files-content-exporter/releases/latest/download/files-content-exporter-amd64.tar.gz), [linux/arm64](https://github.com/a0s/files-content-exporter/releases/latest/download/files-content-exporter-arm64.tar.gz), [linux/armv6](https://github.com/a0s/files-content-exporter/releases/latest/download/files-content-exporter-armv6.tar.gz), [linux/armv7](https://github.com/a0s/files-content-exporter/releases/latest/download/files-content-exporter-armv7.tar.gz)\n\n* docker image: [a00s/files-content-exporter](https://hub.docker.com/repository/docker/a00s/files-content-exporter)\n\nSettings\n--------\n\n* `FILES_CONTENT_EXPORTER_CONFIG_FILE_PATH` | default: _/config.yml_ - path to config.yml\n\n* `FILES_CONTENT_EXPORTER_PORT` | default: _9457_ - port to bind\n\n* `FILES_CONTENT_EXPORTER_HOST` | default: _127.0.0.1_  - host to bind\n\n* `FILES_CONTENT_EXPORTER_LOG_LEVEL` | default: _INFO_ - log level, one of `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`\n\nconfig.yml\n----------\n\nThis file describes metrics (entities) which will be export through `/metrics` endpoint. Example of config.yml (`examples/config.yml`) is valid for Cubieboard2. But you are free to use any files as a source of metrics.\n\n\u003e Warn! For entites with same names you *must* use equal help text and labels names. Otherwise you will get _\"panic: a previously registered descriptor with the same fully-qualified name as Desc{...} has different label names or a different help string\"_\n\n```yaml\npath_as_label_enabled: true                                 # [optional] use path to file with metric as `path` label\nentities:                                                   # list of entities (one file - one metric)\n  - file: /sys/devices/virtual/thermal/thermal_zone0/temp   # [required] path to file with metric\n    name: cpu_temp_celsius                                  # [required] metric's name in export\n    labels:                                                 # [optional] list of labels, optional\n      thermal_zone: 0\n    help: CPU thermal 0                                     # [optional] description of metric\n  - file: /sys/devices/virtual/thermal/thermal_zone1/temp\n    name: cpu_temp_celsius\n    labels:\n      thermal_zone: 1\n    help: CPU thermal 1\n  - file: /sys/devices/virtual/thermal/thermal_zone2/temp\n    name: cpu_temp_celsius\n    labels:\n      thermal_zone: 2\n    help: CPU thermal 2\n  - file: /sys/devices/virtual/thermal/thermal_zone3/temp\n    name: cpu_temp_celsius\n    labels:\n      thermal_zone: 3\n    help: CPU thermal 3\n  - file: /sys/power/axp_pmu/pmu/temp\n    name: pmu_temp_celsius\n```\n\nRun as Docker container\n---------------------------------------------\n\n```bash\ndocker run \\\n  -v /sys:/sys \\\n  -v `pwd`/examples/config.yml:/config.yml \\\n  -p 9457:9457 \\\n  -e FILES_CONTENT_EXPORTER_HOST=0.0.0.0 \\\n  a00s/files-content-exporter\n```\n\nExample response\n----------------\n\n```\n# HELP cpu_temp_celsius CPU thermal\n# TYPE cpu_temp_celsius gauge\ncpu_temp_celsius{path=\"/sys/devices/virtual/thermal/thermal_zone0/temp\",thermal_zone=\"0\"} 45200\ncpu_temp_celsius{path=\"/sys/devices/virtual/thermal/thermal_zone1/temp\",thermal_zone=\"1\"} 0\ncpu_temp_celsius{path=\"/sys/devices/virtual/thermal/thermal_zone2/temp\",thermal_zone=\"2\"} 0\ncpu_temp_celsius{path=\"/sys/devices/virtual/thermal/thermal_zone3/temp\",thermal_zone=\"3\"} 0\n# HELP pmu_temp_celsius\n# TYPE pmu_temp_celsius gauge\npmu_temp_celsius{path=\"/sys/power/axp_pmu/pmu/temp\"} 44500\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa0s%2Ffiles-content-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa0s%2Ffiles-content-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa0s%2Ffiles-content-exporter/lists"}