File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -717,6 +717,13 @@ def _vmware_get_hosts(self, host_metrics):
717
717
power_state = 1 if host ['runtime.powerState' ] == 'poweredOn' else 0
718
718
host_metrics ['vmware_host_power_state' ].add_metric (labels , power_state )
719
719
720
+ # Host connection state (connected, disconnected, notResponding)
721
+ connection_state = host .get ('runtime.connectionState' , 'unknown' )
722
+ host_metrics ['vmware_host_connection_state' ].add_metric (
723
+ labels + [connection_state ],
724
+ 1
725
+ )
726
+
720
727
if not power_state :
721
728
continue
722
729
@@ -728,13 +735,6 @@ def _vmware_get_hosts(self, host_metrics):
728
735
self ._to_epoch (host ['runtime.bootTime' ])
729
736
)
730
737
731
- # Host connection state (connected, disconnected, notResponding)
732
- connection_state = host .get ('runtime.connectionState' , 'unknown' )
733
- host_metrics ['vmware_host_connection_state' ].add_metric (
734
- labels + [connection_state ],
735
- 1
736
- )
737
-
738
738
# Host in maintenance mode?
739
739
if 'runtime.inMaintenanceMode' in host :
740
740
host_metrics ['vmware_host_maintenance_mode' ].add_metric (
You can’t perform that action at this time.
0 commit comments