pryorda / vmware_exporter

VMWare vCenter Exporter for Prometheus
BSD 3-Clause "New" or "Revised" License
527 stars 200 forks source link

metrics for host services (such as ntp) ? #368

Open gberche-orange opened 1 year ago

gberche-orange commented 1 year ago

Thanks for sharing this great work with the community !

I'm looking for a way to track the services running on esx hosts, with similar data that the following govc host.date.info command provides

$ govc host.date.info -host=$esx 
Current date and time:  Wed Apr 26 14:49:01 UTC 2023
NTP client status:      Automatic                                                                                                                                                                                  
NTP service status:     Stopped                                                                                                                                                                                    
NTP servers:            ntp.mydomain.org [...]

Is there a related metric with associated labels in vmware_exporter that I would have missed ?

gberche-orange commented 1 year ago

In addition to govc host.date.info which provides status of the esx ntpd service , the govc host.service.ls command lists all esx host services:

$ for h in $(govc find / -type h); do echo "host $h ---------";govc host.service.ls -host.ipath=$h ; done
Key             Policy     Status   Label
DCUI            on         Running  Direct Console UI
TSM             off        Stopped  ESXi Shell
TSM-SSH         off        Stopped  SSH
lbtd            on         Running  Load-Based Teaming Daemon
lwsmd           off        Stopped  Active Directory Service
ntpd            automatic  Running  NTP Daemon
pcscd           off        Stopped  PC/SC Smart Card Daemon
sfcbd-watchdog  on         Running  CIM Server
slpd            off        Stopped  slpd
snmpd           on         Stopped  SNMP Server
vmsyslogd       on         Running  Syslog Server
vmware-fdm      on         Running  vSphere High Availability Agent
vpxa            on         Running  VMware vCenter Agent
xorg            on         Stopped  X.Org Server

[...]