pryorda / vmware_exporter

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

ESX host temperature monitoring #226

Open tushar-umbarkar opened 3 years ago

tushar-umbarkar commented 3 years ago

Hi All,

Is there any way to monitor the server temperature using exporter ?

Thanks and Regards, Tushar

tushar-umbarkar commented 3 years ago

Thanks @pryorda for labeling this as enhancement.

Please let me know if I can help /contribute in this enhancement.

Regards, Tushar

M0NsTeRRR commented 3 years ago

hello,

I've looked into the issue @pryorda and the exporter is actually getting the metrics.

The prop name is runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo

        elif 'runtime.healthSystemRuntime.systemHealthInfo.numericSensorInfo' == prop.name:
            """
                host hardware sensors alarms
            """
            try:
                alarms = list(
                    'sensorInfo:{}:{}'.format(item.name.replace(' ', ''), item.healthState.key.lower())
                    for item in prop.val if item.healthState.key.lower() not in ('green', 'unknown')
                )
            except Exception:
                alarms = ['sensorInfo:AlarmsUnavailable:yellow']

            properties[prop.name] = ','.join(alarms)

Exporter display this information only if fetch_alarms is true in the config and the healthState.key is flagged as red. I don't know how do you want to handle this, i've just started to look into the exporter :)

pryorda commented 3 years ago

@M0NsTeRRR I welcome all prs. As long as it has unit tests and you validate it works. Thanks for looking into this.

M0NsTeRRR commented 3 years ago

I will send the PR tomorrow probably but I need some informations before.

I'm testing on a Dell R320 in my homelab can someone confirm that sensors name are not vendor specific

Here are sensors I get on my R320 from vcenter : https://gist.github.com/M0NsTeRRR/d001ef5aaba0eda2efcbd701c0f0e64d

You can find the information in Server > Monitor > Hardware Health

pryorda commented 3 years ago

I've attached mine as a comment. Looks like the ids can be different.

M0NsTeRRR commented 3 years ago

PR #255

M0NsTeRRR commented 3 years ago

@tushar-umbarkar you should have sensors metric with vmware_exporter 0.15

M0NsTeRRR commented 1 year ago

@pryorda I think this issue can be closed :)