{"id":19096614,"url":"https://github.com/sapcc/esxi-exporter","last_synced_at":"2025-04-30T14:12:03.197Z","repository":{"id":41954494,"uuid":"341492192","full_name":"sapcc/esxi-exporter","owner":"sapcc","description":"Prometheus ESXi exporter, which utilises the VMware SDK","archived":false,"fork":false,"pushed_at":"2023-12-15T20:09:14.000Z","size":99,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":50,"default_branch":"main","last_synced_at":"2025-03-30T16:46:46.051Z","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}},"created_at":"2021-02-23T09:05:01.000Z","updated_at":"2024-07-04T06:53:27.000Z","dependencies_parsed_at":"2024-11-09T03:37:19.726Z","dependency_job_id":"57868e11-cda8-4f1e-ac2c-b5d8ca630bf9","html_url":"https://github.com/sapcc/esxi-exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fesxi-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fesxi-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fesxi-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fesxi-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/esxi-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249514463,"owners_count":21284553,"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-09T03:37:15.558Z","updated_at":"2025-04-18T15:33:54.632Z","avatar_url":"https://github.com/sapcc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESXi-exporter\r\nPrometheus exporter, which utilises the _VMware SDK_ and _SSH_ to get metrics from _VMware ESXi-HostSystems_.\r\n\r\n## About\r\nThis exporter contains a `critical service collector` and a `overall state collector`. It monitors the service state of services like `hostd` or `ntpd` and gathers the _ESXi-HostSystem_ `overallState` from _vCenters_. \r\n\r\n\r\n## Getting started\r\n\r\n1. Configure the project\r\n    - Credentials are passed by environment variables.\r\n    - `config.yaml` contains some static configuration\r\n    - There are command-line options for more console output\r\n2. Run `exporter.py` with _python3_\r\n\r\n**Environment variables**\r\n- `VCENTER_USER` the vCenter username.\r\n- `VCENTER_PASSWORD` the vCenter password.\r\n- `VCENTER_MPW` if set, master_password mechanism will be used.\r\n- `ESXI_USER` the ESXi-host ssh username.\r\n- `ESXI_PASSWORD` the ESXi-host ssh password.\r\n- `ATLAS_FILE` the path to the [atlas file](https://github.com/sapcc/atlas) containing esxi_hosts and vcenters.\r\n- `CONFIG_FILE` path to config file.\r\n\r\n**Command-line arguments**\r\n- `-v` sets logger to info output\r\n- `-vv` sets logger to debug output\r\n\r\n## Atlas\r\nhttps://github.com/sapcc/atlas\r\n\r\nThis is an atlas scheme reduced to the information required by this exporter.\r\n\r\n```json\r\n[\r\n  {\r\n    \"labels\": {\r\n      \"job\": \"vmware-esxi or vcenter\",\r\n      \"name\": \"\",\r\n      \"server_name\": \"\",\r\n      \"status\": \"Active\",\r\n      \"site\": \"\"\r\n    }\r\n  },\r\n]\r\n```\r\n\r\n## Structure\r\n\r\n- All collectors inherit from the `BaseCollector`\r\n- _Interfaces_ are used to provide a common exchange data type. Eg it defines how a _Host_ and a _Vcenter_ should be passed around. (the term _interface_ is used as in _Angular/Typescript_ vocabular)  \r\n- _Modules_ provide shared core functionality\r\n    - _api_ \u0026rarr; very basic functionality. Enables connectivity to ESXi-hosts etc. They are designed in an interchangeable manner. See helpers which are some kind of wrapper.\r\n    - _helper_ \u0026rarr; Are some kind of wrapper which combine different APIs in order to provide a unified interface. If an api-file gets interchanged, the helper/wrapper still expects the same format as before. For instance if you want to use a different SSH-library than paramiko then change the ssh-api-file in the api folder and make sure it still returns the console output of the remote host as before.\r\n    - _configuration_ \u0026rarr; some small models that collect configuration from yaml, environment and commandline arguments in order to provide configuration in a dynamic and scoped manner to specific parts of the exporter.\r\n- exporter.py is the entry point. It dynamicly invokes collectors based on the configuration and sets up the whole program.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fesxi-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fesxi-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fesxi-exporter/lists"}