{"id":20331126,"url":"https://github.com/comcast/fishymetrics","last_synced_at":"2026-01-06T17:24:09.019Z","repository":{"id":156482077,"uuid":"632988080","full_name":"Comcast/fishymetrics","owner":"Comcast","description":"Redfish API Prometheus Exporter for monitoring large scale server deployments","archived":false,"fork":false,"pushed_at":"2025-07-17T18:53:45.000Z","size":6850,"stargazers_count":19,"open_issues_count":3,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-07-21T01:39:03.130Z","etag":null,"topics":["metrics","monitoring","prometheus","prometheus-exporter","redfish"],"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/Comcast.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-26T14:37:48.000Z","updated_at":"2025-07-17T18:51:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec6b7e5e-e654-4bdc-af93-707119ef5405","html_url":"https://github.com/Comcast/fishymetrics","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Comcast/fishymetrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ffishymetrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ffishymetrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ffishymetrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ffishymetrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Comcast","download_url":"https://codeload.github.com/Comcast/fishymetrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Ffishymetrics/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267505080,"owners_count":24098345,"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-07-28T02:00:09.689Z","response_time":68,"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":["metrics","monitoring","prometheus","prometheus-exporter","redfish"],"created_at":"2024-11-14T20:18:52.934Z","updated_at":"2026-01-06T17:24:09.014Z","avatar_url":"https://github.com/Comcast.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fishymetrics exporter for Prometheus\n\nThis is a simple server that scrapes a baremetal chassis' managers stats using the redfish API and\nexports them via HTTP for Prometheus consumption.\n\nThis app can support any chassis that has the redfish API available. If one needs to query any non-redfish API calls this app can be extended to support that. Please see the [`plugins`](https://github.com/Comcast/fishymetrics/tree/main/docs/plugins.md) documentation for more information.\n\n## Features\n\n- **Full Scraping**: Collect all available metrics from a Redfish-enabled device\n- **Partial Scraping**: Selectively collect metrics from specific components for faster, more targeted monitoring (see [`partial-scraping`](https://github.com/Comcast/fishymetrics/tree/main/docs/partial-scraping.md))\n- **Vault Integration**: Secure credential management with HashiCorp Vault\n- **Plugin Support**: Extend functionality with custom plugins\n- **Proxy Support**: Route Redfish requests through HTTP(S) proxies using standard env vars or Helm values\n\n## Getting Started\n\nTo run it:\n\n```console\n$ ./fishymetrics --help\nusage: fishymetrics [\u003cflags\u003e]\n\nredfish api exporter with all the bells and whistles\n\nFlags:\n  -h, --help                    Show context-sensitive help (also try --help-long and --help-man).\n      --user=\"\"                 BMC static username\n      --password=\"\"             BMC static password\n      --timeout=15s             BMC scrape timeout\n      --scheme=\"https\"          BMC Scheme to use\n      --insecure-skip-verify     Skip TLS verification\n      --log.level=[debug|info|warn|error]\n                                log level verbosity\n      --log.method=[file|vector]\n                                alternative method for logging in addition to stdout\n      --log.file-path=\"/var/log/fishymetrics\"\n                                directory path where log files are written if log-method is file\n      --log.file-max-size=\"256\"   max file size in megabytes if log-method is file\n      --log.file-max-backups=\"1\"  max file backups before they are rotated if log-method is file\n      --log.file-max-age=\"1\"      max file age in days before they are rotated if log-method is file\n      --vector.endpoint=\"http://0.0.0.0:4444\"\n                                vector endpoint to send structured json logs to\n      --port=\"10023\"             exporter port\n      --vault.addr=\"https://vault.com\"\n                                Vault instance address to get chassis credentials from\n      --vault.role-id=\"\"        Vault Role ID for AppRole\n      --vault.secret-id=\"\"      Vault Secret ID for AppRole\n      --collector.drives.modules-exclude=\"\"\n                                regex of drive module(s) to exclude from the scrape\n      --collector.firmware.modules-exclude=\"\"\n                                regex of firmware module to exclude from the scrape\n      --url.extra-params=\"\"     extra parameter(s) to parse from the URL. --url.extra-params=\"param1:alias1,param2:alias2\"\n      --credentials.profiles=CREDENTIALS.PROFILES\n                                profile(s) with all necessary parameters to obtain BMC credential from secrets backend, i.e.\n\n                                  --credentials.profiles=\"\n                                    profiles:\n                                      - name: profile1\n                                        mountPath: \"kv2\"\n                                        path: \"path/to/secret\"\n                                        userField: \"user\"\n                                        passwordField: \"password\"\n                                      ...\n                                  \"\n\n                                --credentials.profiles='{\"profiles\":[{\"name\":\"profile1\",\"mountPath\":\"kv2\",\"path\":\"path/to/secret\",\"userField\":\"user\",\"passwordField\":\"password\"},...]}'\n```\n\nOr set the following ENV Variables:\n\n```\nBMC_USERNAME=\u003cstring\u003e\nBMC_PASSWORD=\u003cstring\u003e\nBMC_TIMEOUT=\u003cduration\u003e (Default: 15s)\nBMC_SCHEME=\u003cstring\u003e (Default: https)\nEXPORTER_PORT=\u003cint\u003e (Default: 10023)\nLOG_PATH=\u003cstring\u003e (Default: /var/log/fishymetrics)\nVAULT_ADDRESS=\u003cstring\u003e\nVAULT_ROLE_ID=\u003cstring\u003e\nVAULT_SECRET_ID=\u003cstring\u003e\nHTTP_PROXY=\u003curl\u003e        # proxy for http targets\nHTTPS_PROXY=\u003curl\u003e       # proxy for https targets\nNO_PROXY=\u003chosts,...\u003e    # comma-separated list of hosts/CIDRs to bypass proxy\n```\n\n```bash\n./fishymetrics\n```\n\n## Collectors\n\n### Exclude flags\n\nSince some hosts can contain many dozens of drives, this can cause a scrape to take a very long time and may not be entirely necessary. Because of this we've included an exclude flag specifically for the `drives.module` and `firmware.module` scopes.\n\nExample:\n\n```bash\n--collector.drives.modules-exclude=\"(?i)(FlexUtil|(SBMezz|IOEMezz)[0-9]+)\"\n```\n\n| Collector | Scope  | Include Flag | Exclude Flag   |\n| --------- | ------ | ------------ | -------------- |\n| drives    | module | N/A          | module-exclude |\n| firmware  | module | N/A          | module-exclude |\n\n## Usage\n\n### build info URL\n\nResponds with the application's `version`, `build_date`, `go_version`, `etc`\n\n\u003caside class=\"notice\"\u003e\n_if deployed on ones localhost_\n\u003c/aside\u003e\n\n```bash\ncurl http://localhost:10023/info\n```\n\n### metrics URL\n\nResponds with the application's runtime metrics\n\n\u003caside class=\"notice\"\u003e\n_if deployed on ones localhost_\n\u003c/aside\u003e\n\n```bash\ncurl http://localhost:10023/metrics\n```\n\n### redfish API `/scrape`\n\nTo test a scrape of a host's redfish API, you can curl `fishymetrics`\n\n```bash\ncurl 'http://localhost:10023/scrape?model=\u003cmodel-name\u003e\u0026target=1.2.3.4'\n```\n\nIf you have a credential profile configured you can add the extra URL query parameter\n\n```bash\ncurl 'http://localhost:10023/scrape?model=\u003cmodel-name\u003e\u0026target=1.2.3.4\u0026credential_profile=\u003cprofile-name\u003e'\n```\n\nThere is plugin support which is passed a comma separated list of strings\n\n```bash\ncurl 'http://localhost:10023/scrape?model=\u003cmodel-name\u003e\u0026target=1.2.3.4\u0026plugins=example1,example2'\n```\n\n### Docker\n\nTo run the fishymetrics exporter as a Docker container using static crdentials, run:\n\n#### Using ENV variables\n\n```bash\ndocker run --name fishymetrics -d -p \u003cEXPORTER_PORT\u003e:\u003cEXPORTER_PORT\u003e \\\n-e BMC_USERNAME='\u003cuser\u003e' \\\n-e BMC_PASSWORD='\u003cpassword\u003e' \\\n-e BMC_TIMEOUT=15s \\\n-e EXPORTER_PORT=1234 \\\ncomcast/fishymetrics:latest\n```\n\n#### Using command line args\n\n```bash\ndocker run --name fishymetrics -d -p \u003cEXPORTER_PORT\u003e:\u003cEXPORTER_PORT\u003e \\\n-user '\u003cuser\u003e' \\\n-password '\u003cpassword\u003e' \\\n-timeout 15s \\\n-port 1234 \\\ncomcast/fishymetrics:latest\n```\n\n## Prometheus Configuration\n\nThe fishymetrics exporter needs to be passed the address as a parameter, this can be\ndone with relabelling.\n\nExample config:\n\n```YAML\nscrape_configs:\n  - job_name: 'fishymetrics'\n    static_configs:\n      - targets:\n        - bmc-fdqn-p1.example.com\n        labels:\n          foo: bar\n      - targets:\n        - bmc-fdqn-p2.example.com\n        labels:\n          foo: bar\n    metrics_path: /scrape\n    scrape_interval: 5m\n    scrape_timeout: 4m  # Time limit to allow gathering metrics from multiple hardware components\n    params:\n      model: [\"dl360\"]\n    relabel_configs:\n      - source_labels: [__address__]\n        target_label: __param_target\n      - source_labels: [__param_target]\n        target_label: instance\n      - target_label: __address__\n        replacement: fishymetrics.example.com  # Kubernetes cluster nginx-ingress FQDN or any host IP/FQDN you deployed with\n\n  # Example partial scrape configuration for thermal monitoring\n  - job_name: 'fishymetrics-thermal'\n    static_configs:\n      - targets:\n        - bmc-fdqn-p1.example.com\n        - bmc-fdqn-p2.example.com\n    metrics_path: /scrape/partial\n    scrape_interval: 1m\n    scrape_timeout: 30s\n    params:\n      model: [\"dl360\"]\n      components: [\"thermal,power\"]  # Only collect thermal and power metrics\n    relabel_configs:\n      - source_labels: [__address__]\n        target_label: __param_target\n      - source_labels: [__param_target]\n        target_label: instance\n      - target_label: __address__\n        replacement: fishymetrics.example.com\n```\n\n## Proxy Support\n\n- Environment variables (container or process level):\n  - `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`\n- Helm values (recommended for Kubernetes):\n\n```yaml\nproxy:\n  httpProxy: \"http://proxy.example:3128\"\n  httpsProxy: \"http://proxy.example:3128\"\n  noProxy: \"127.0.0.1,localhost,.svc,.cluster.local,10.0.0.0/8\"\n```\n\nThe chart maps these values to the container env vars. The application’s HTTP client uses Go’s `http.ProxyFromEnvironment`, so it automatically honors these settings for all Redfish calls (full and partial scrapes, including Moonshot).\n\n## Development\n\n### Building\n\n#### linux binary\n\n```\nmake build\n```\n\n#### linux binary statically linked\n\n```\nmake static\n```\n\n#### docker image\n\n```bash\nmake docker\n```\n\n### Testing\n\n```bash\nmake test\n```\n\n## License\n\ndependency source code can be found in the `sources.tgz` file in the root of the `comcast/fishymetrics-src` docker image. To extract the source code, run the following commands:\n\n```bash\nexport TMP_CONTAINER=\"$(docker create comcast/fishymetrics-src:latest)\"\ndocker export $TMP_CONTAINER | tar -x sources.tgz\ndocker rm $TMP_CONTAINER\ntar -xzf sources.tgz\n```\n\ndependency licenses for each package:\n\n| package                                       | license                       |\n| --------------------------------------------- | ----------------------------- |\n| `github.com/hashicorp/go-hclog`               | `MIT license`                 |\n| `github.com/hashicorp/go-retryablehttp`       | `Mozilla Public License v2.0` |\n| `github.com/hashicorp/vault/api`              | `Mozilla Public License v2.0` |\n| `github.com/hashicorp/vault/api/auth/approle` | `Mozilla Public License v2.0` |\n| `github.com/hashicorp/vault/sdk`              | `Mozilla Public License v2.0` |\n| `github.com/nrednav/cuid2`                    | `MIT license`                 |\n| `github.com/prometheus/client_golang`         | `Apache-2.0 license`          |\n| `github.com/stretchr/testify`                 | `MIT license`                 |\n| `go.uber.org/zap`                             | `MIT license`                 |\n| `gopkg.in/alecthomas/kingpin.v2`              | `MIT license`                 |\n| `gopkg.in/natefinch/lumberjack.v2`            | `MIT license`                 |\n| `gopkg.in/yaml.v3`                            | `Apache-2.0 license`          |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomcast%2Ffishymetrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomcast%2Ffishymetrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomcast%2Ffishymetrics/lists"}