File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ def run():
4949 parser .add_optional_arguments (CheckArgument .ALLOWED (
5050 'regex, checked against <vm-name>'
5151 ))
52+ parser .add_optional_arguments ({
53+ 'name_or_flags' : ['--old' ],
54+ 'options' : {
55+ 'action' : 'store_true' ,
56+ 'default' : False ,
57+ 'help' : 'tools that are too old generate a warning now' ,
58+ }
59+ })
5260 parser .add_optional_arguments ({
5361 'name_or_flags' : ['--not-installed' ],
5462 'options' : {
@@ -135,6 +143,11 @@ def run():
135143 logging .debug (f"{ name } has no vm tools installed" )
136144 if args .not_installed :
137145 check .add_message (Status .CRITICAL , f"{ name } tools not installed" )
146+ elif guest_summary .toolsStatus == "toolsOld" :
147+ perf_data ["VMware Tools upgrade available" ] += 1
148+ logging .debug (f"{ name } tools upgrade available" )
149+ if args .old :
150+ check .add_message (Status .WARNING , f"{ name } tools upgrade available" )
138151 elif guest_summary .toolsRunningStatus == "guestToolsNotRunning" :
139152 perf_data ["VMware Tools not running" ] += 1
140153 check .add_message (Status .CRITICAL , f"{ name } tools not running" )
You can’t perform that action at this time.
0 commit comments