File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,25 +144,20 @@ def run():
144144 check .add_message (Status .CRITICAL , f"{ name } tools not running" )
145145 logging .debug (f"{ name } tools not running" )
146146 else :
147- vmname = name
148147 perf_data ["VMware Tools running" ] += 1
149148
150149 for key , value in perf_data .items ():
151150 check .add_perfdata (label = key , value = value , uom = "" )
152151
153152 (code , message ) = check .check_messages (separator = "\n " )
154-
155- if (vmscnt > 1 ):
156- message = f"{ vmscnt } VMs checked for VMware Tools state, { len (vms ) - vmscnt } VMs ignored"
157- else :
158- if (code == Status .OK ):
159- message = f"{ vmname } tools running"
160-
161153 check .exit (
162154 code = code ,
163- message = message ,
155+ message = f"{ vmscnt } VMs checked for VMware Tools state, { len (vms ) - vmscnt } VMs ignored"
156+ if code == Status .OK
157+ else message ,
164158 )
165159
160+
166161if __name__ == "__main__" :
167162 try :
168163 run ()
You can’t perform that action at this time.
0 commit comments