prometheus / prometheus

The Prometheus monitoring system and time series database.
https://prometheus.io/
Apache License 2.0
55.99k stars 9.2k forks source link

VMWare Discovery #8717

Closed RyanW8 closed 5 months ago

RyanW8 commented 3 years ago

Proposal

Use case. Why is this important?

We would like to monitor all ESXI hosts and also all virtual machines in a VMWare vCenter environment; however since VMs and ESXI hosts are so dynamic (they come and go super often) it seems silly to define them statically.

We could use dns_sd_configs however that doesn't seem right as there would be no distinction between ESXI hosts for example and VMs.

If prometheus had VMWare discovery built in that scraped a vCenter for targets then that woiuld be awesome

SuperQ commented 3 years ago

There are a vmware file_sd config generator that could be used as a basis for implementing this.

https://github.com/AppliedTrust/vmware-filesd

LeviHarrison commented 3 years ago

https://github.com/vmware/govmomi/blob/master/examples/virtualmachines/main.go is the Go equivalent of this, and adding in https://pkg.go.dev/github.com/vmware/govmomi@v0.25.0/vapi/tags#Manager.ListAttachedTags would allow you to get the tags.

beorn7 commented 5 months ago

Hello from the bug scrub.

Generally, we already struggle to maintain the existing SDs properly. For a new SD, we need a committed maintainer for it plus appropriate testing infrastructure to make sure the SD keeps working.

Since nothing has been updated on this issue in more than 3y, we assume there is nobody available to work on this. We'll close this, but if anyone has the resources to implement it and commit to the maintenance, please follow up and we will re-open.

mohag commented 1 month ago

There are a vmware file_sd config generator that could be used as a basis for implementing this.

https://github.com/AppliedTrust/vmware-filesd

That one is gone now, any idea where it can easily be found again? Edit: Found one: https://github.com/rekhasusmitha/vmware-filesd

(Implementing custom SD stuff as "web" servers that can be scraped by http_sd might make sense)