{"id":18834479,"url":"https://github.com/fgouteroux/threshold_exporter","last_synced_at":"2026-01-26T11:30:17.775Z","repository":{"id":221497872,"uuid":"754544254","full_name":"fgouteroux/threshold_exporter","owner":"fgouteroux","description":"Exposes threshold prometheus metrics from a config file with HA (memberlist).","archived":false,"fork":false,"pushed_at":"2024-02-08T09:55:39.000Z","size":363,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-30T07:42:24.171Z","etag":null,"topics":["prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","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/fgouteroux.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-02-08T09:32:13.000Z","updated_at":"2024-06-12T14:31:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"74e0695b-baa3-467a-9718-761658fabd90","html_url":"https://github.com/fgouteroux/threshold_exporter","commit_stats":null,"previous_names":["fgouteroux/threshold_exporter"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fthreshold_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fthreshold_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fthreshold_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgouteroux%2Fthreshold_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgouteroux","download_url":"https://codeload.github.com/fgouteroux/threshold_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239768923,"owners_count":19693764,"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":["prometheus-exporter"],"created_at":"2024-11-08T02:12:36.504Z","updated_at":"2026-01-26T11:30:17.737Z","avatar_url":"https://github.com/fgouteroux.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# threshold_exporter\n\n## Treshold Prometheus Exporter\n\nThis [Prometheus](https://prometheus.io/)\n[exporter](https://prometheus.io/docs/instrumenting/exporters/)\nexposes threshold metrics from a config file.\n\n### Usage\n\n```\nusage: threshold_exporter --config-path=CONFIG-PATH [\u003cflags\u003e]\n\n\nFlags:\n  -h, --[no-]help                Show context-sensitive help (also try --help-long and --help-man).\n      --[no-]ring.enabled        Enable the ring to deduplicate exported threshold metrics.\n      --ring.instance-id=RING.INSTANCE-ID  \n                                 Instance ID to register in the ring.\n      --ring.instance-addr=RING.INSTANCE-ADDR  \n                                 IP address to advertise in the ring. Default is auto-detected.\n      --ring.instance-port=7946  Port to advertise in the ring.\n      --ring.instance-interface-names=RING.INSTANCE-INTERFACE-NAMES  \n                                 List of network interface names to look up when finding the instance IP\n                                 address.\n      --ring.join-members=RING.JOIN-MEMBERS  \n                                 Other cluster members to join.\n      --[no-]web.disable-exporter-metrics  \n                                 Exclude metrics about the exporter itself (process_*, go_*).\n      --web.telemetry-path=\"/metrics\"  \n                                 Path under which to expose metrics.\n      --config-path=CONFIG-PATH  Config file path\n      --[no-]web.systemd-socket  Use systemd socket activation listeners instead of port listeners\n                                 (Linux only).\n      --web.listen-address=:11112 ...  \n                                 Addresses on which to expose metrics and web interface. Repeatable for\n                                 multiple addresses.\n      --web.config.file=\"\"       [EXPERIMENTAL] Path to configuration file\n                                 that can enable TLS or authentication. See:\n                                 https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md\n      --log.level=info           Only log messages with the given severity or above. One of: [debug,\n                                 info, warn, error]\n      --log.format=logfmt        Output format of log messages. One of: [logfmt, json]\n      --[no-]version             Show application version.\n```\n\n### Run\n\n```\n$ threshold_exporter --config-path /tmp/config.yaml --web.disable-exporter-metrics\nts=2023-07-12T13:56:29.756Z caller=main.go:49 level=info msg=\"Starting threshold_exporter\" version=\"(version=, branch=, revision=10fb258c6ff77c8c60a1053daf29a57bb8faeaac-modified)\"\nts=2023-07-12T13:56:29.756Z caller=main.go:50 level=info msg=\"Build context\" build_context=\"(go=go1.21.1, platform=linux/amd64, user=, date=, tags=unknown)\"\nts=2023-07-12T13:56:29.757Z caller=tls_config.go:274 level=info msg=\"Listening on\" address=[::]:9104\nts=2023-07-12T13:56:29.757Z caller=tls_config.go:277 level=info msg=\"TLS is disabled.\" http2=false address=[::]:9104\nts=2023-07-12T13:56:32.752Z caller=main.go:106 level=info msg=\"reading config file\" file=/tmp/config.yaml\n```\n\n### Config file\n\n```yaml\nmetrics:\n  - name: server_cpu_threshold_percent\n    help: The used cpu threshold\n    type: gauge\n    value: 0.05\n    labels:\n      priority: SEV-5\n      severity: warning\n      process: all\n  - name: server_memory_threshold_percent\n    help: The used memory threshold, for a given process\n    type: gauge\n    value: 0.05\n    labels:\n      priority: SEV-5\n      severity: warning\n      process: all\n  - name: server_swap_threshold_percent\n    help: The used swap threshold\n    type: gauge\n    value: 0.3\n    labels:\n      priority: SEV-5\n      severity: warning\n  - name: server_disk_threshold_percent\n    help: The used disk threshold\n    type: gauge\n    value: 0.1\n    labels:\n      priority: SEV-5\n      severity: warning\n      mountpoint: default\n```\n\n### Metrics Exposed\n\n```\n# HELP threshold_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which threshold_exporter was built, and the goos and goarch for the build.\n# TYPE threshold_exporter_build_info gauge\nthreshold_exporter_build_info{branch=\"\",goarch=\"amd64\",goos=\"linux\",goversion=\"go1.21.1\",revision=\"10fb258c6ff77c8c60a1053daf29a57bb8faeaac-modified\",tags=\"unknown\",version=\"\"} 1\n# HELP threshold_exporter_scrape_error 1 if there was an error opening or reading a file, 0 otherwise\n# TYPE threshold_exporter_scrape_error gauge\nthreshold_exporter_scrape_error 0\n# HELP server_cpu_threshold_percent The used cpu threshold\n# TYPE server_cpu_threshold_percent gauge\nserver_cpu_threshold_percent{priority=\"SEV-5\",process=\"all\",severity=\"warning\"} 0.05\n# HELP server_disk_threshold_percent The used disk threshold\n# TYPE server_disk_threshold_percent gauge\nserver_disk_threshold_percent{mountpoint=\"default\",priority=\"SEV-5\",severity=\"warning\"} 0.1\n# HELP server_memory_threshold_percent The used memory threshold, for a given process\n# TYPE server_memory_threshold_percent gauge\nserver_memory_threshold_percent{priority=\"SEV-5\",process=\"all\",severity=\"warning\"} 0.05\n# HELP server_swap_threshold_percent The used swap threshold\n# TYPE server_swap_threshold_percent gauge\nserver_swap_threshold_percent{priority=\"SEV-5\",severity=\"warning\"} 0.3\n```\n\n\n## TLS and basic authentication\n\nThreshold Exporter supports TLS and basic authentication. This enables better control of the various HTTP endpoints.\n\nTo use TLS and/or basic authentication, you need to pass a configuration file using the `--web.config.file` parameter. The format of the file is described\n[in the exporter-toolkit repository](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgouteroux%2Fthreshold_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgouteroux%2Fthreshold_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgouteroux%2Fthreshold_exporter/lists"}