{"id":19096503,"url":"https://github.com/sapcc/redfish-exporter","last_synced_at":"2025-08-30T17:41:53.909Z","repository":{"id":41876052,"uuid":"269473608","full_name":"sapcc/redfish-exporter","owner":"sapcc","description":"Exporter for Prometheus using the Redfish protocol for server monitoring","archived":false,"fork":false,"pushed_at":"2025-05-02T15:17:58.000Z","size":211,"stargazers_count":55,"open_issues_count":7,"forks_count":21,"subscribers_count":46,"default_branch":"main","last_synced_at":"2025-07-26T18:43:27.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/sapcc.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,"zenodo":null}},"created_at":"2020-06-04T21:57:03.000Z","updated_at":"2025-07-15T07:49:11.000Z","dependencies_parsed_at":"2023-10-14T18:34:28.087Z","dependency_job_id":"1e7bb0c3-f5b0-450b-a064-0b4652541c90","html_url":"https://github.com/sapcc/redfish-exporter","commit_stats":{"total_commits":173,"total_committers":4,"mean_commits":43.25,"dds":"0.017341040462427793","last_synced_commit":"10388bea9024bcd58381d51e4d5242371328b15f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sapcc/redfish-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fredfish-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fredfish-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fredfish-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fredfish-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/redfish-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fredfish-exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268519166,"owners_count":24263054,"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-08-03T02:00:12.545Z","response_time":2577,"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-09T03:36:53.666Z","updated_at":"2025-08-03T09:09:34.660Z","avatar_url":"https://github.com/sapcc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redfish-Exporter\r\n\r\nThis is a Prometheus Exporter for extracting metrics from a server using the Redfish API.\r\nThe hostname of the server has to be passed as **target parameter** in the http call.\r\n\r\nIt has been tested with the following server models:\r\n\r\nCisco UCS C480M5, working properly since BMC FW 4.1(1d)  \r\nCisco UCS C240M4  \r\nCisco UCS C240M5  \r\nCisco UCS C220M4  \r\nCisco UCS C220M5\r\n\r\nCisco BMC FW below 4.x has its flaws regarding redfish API. Hence, I recommend updating at least to 4.0(1c).\r\n\r\nDell PowerEdge R640  \r\nDell PowerEdge R730  \r\nDell PowerEdge R740  \r\nDell PowerEdge R640  \r\nDell PowerEdge R840\r\n\r\nLenovo ThinkSystem SR950\r\n\r\nHPE DL360 Gen10   \r\nHPE DL560 Gen10\r\n\r\n## Example Call\r\n\r\nIf you are logged into the POD running the exporter, you can retrieve metrics from a server, make an HTTP call to the exporter with the `target` and `job` parameters. The exporter supports the following endpoints:\r\n\r\n### `/health`\r\nRetrieves health-related metrics (e.g., system status, memory errors, power state).\r\n\r\n```bash\r\ncurl \"http://localhost:9220/health?target=server1.example.com\u0026job=redfish-myjob\"\r\n```\r\n\r\n### `/firmware`\r\nRetrieves firmware version information for the server components.\r\n\r\n```bash\r\ncurl \"http://localhost:9220/firmware?target=server1.example.com\u0026job=redfish-myjob\"\r\n```\r\n\r\n### `/performance`\r\nRetrieves performance-related metrics (e.g., power consumption, temperature).\r\n\r\n```bash\r\ncurl \"http://localhost:9220/performance?target=server1.example.com\u0026job=redfish-myjob\"\r\n```\r\n\r\n**Notes**:\r\n- Replace `server1.example.com` with the hostname or IP address of your Redfish server.\r\n- Replace `redfish-myjob` with the name of your job (used to map credentials).\r\n- The exporter listens on port 9220 by default.\r\n\r\n## Prerequisites and Installation\r\n\r\nThe exporter was written for Python 3.6 or newer. To install all modules needed you have to run the following command:\r\n\r\n```bash\r\npip3 install --no-cache-dir -r requirements.txt\r\n```\r\n\r\nAlternatively, you can use the provided Dockerfile to build and run the exporter in a container.\r\n\r\n## Running with Docker\r\n\r\nTo run the exporter in a Docker container, use the following command:\r\n\r\n```bash\r\ndocker run -d -p 9220:9220 your-path/redfish-exporter:v0.1.0\r\n```\r\n\r\n**Notes**:\r\n- Mount a custom `config.yaml` file if needed (see below).\r\n\r\n## Parameters\r\n\r\n`-l \u003clogfile\u003e` - all output is written to a logfile.\r\n\r\n`-d` - switches on debugging mode\r\n\r\n`-c \u003cconfig file\u003e` - you can specify the path to the config file, default is config.yml.\r\n\r\n## The config.yml file\r\n\r\n* The **listen_port** is providing the port on which the exporter is waiting to receive calls. It is overwritten by the environment variable **LISTEN_PORT**.\r\n\r\n* The credentials for login to the switches can either be added to the config.yaml file or passed via environment variables. The environment variables are taking precedence over the entries in config.yaml file.\r\n\r\n    The mapping of job names to environment variables follows a schema: `REDFISH_JOB1_USERNAME` and `REDFISH_JOB1_PASSWORD` would be the variables for example of the first job called `redfish/job1`.\r\n    A slash gets replaced by underscore and everything gets converted to uppercase.\r\n\r\n* The **timeout** parameter specifies the amount of time to wait for an answer from the server. Again this can alos be provided via TIMEOUT environment variable.\r\n\r\n* The **job** parameter specifies the Prometheus job that will be passed as label if no job was handed over during the API call.\r\n\r\n### Example of a config file\r\n\r\n```yaml\r\nlisten_port: 9200\r\nusername: \u003cyour username\u003e\r\npassword: \u003cyour password\u003e\r\ntimeout: 40\r\njob: 'redfish-myjob'\r\n```\r\n\r\n## Exported Metrics\r\n\r\nAll metrics returned by the redfish exporter are gauge metrics.\r\n\r\n### redfish_up\r\n\r\nIndicating if the redfish API was giving useful data back (== 1) or not (== 0).\r\n\r\n### redfish_health\r\n\r\nShow the health information of the hardware parts like processor, memory, storage controllers, disks, fans, power and chassis if available.\r\n\r\n### redfish_memory_correctable\r\n\r\n### redfish_memory_uncorrectable\r\n\r\nShowing the count of errors per dimm.\r\n\r\nCisco servers do not seem to provide this kind of information via redfish. Dell PowerEdge servers only with certain DIMM manufacturers (Samsung not, Micron Technology and Hynix Semiconductor do).\r\n\r\n### redfish_powerstate\r\n\r\nShowing the powerstate of the server\r\n\r\n### redfish_response_duration_seconds\r\n\r\nThe duration of the first response of the server to a call to /redfish/v1\r\n\r\n### redfish_up\r\n\r\nMetric indicating if there was a valid redfish response while calling /redfish/v1\r\n\r\n### redfish_scrape_duration_seconds\r\n\r\nTotal duration of scarping all data from the server\r\n\r\n### redfish_firmware\r\n\r\nA collection of firmware version data stored in the labels. The value is always 1.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fredfish-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fredfish-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fredfish-exporter/lists"}