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' : {
@@ -137,8 +145,9 @@ def run():
137145 check .add_message (Status .CRITICAL , f"{ name } tools not installed" )
138146 elif guest_summary .toolsStatus == "toolsOld" :
139147 perf_data ["VMware Tools upgrade available" ] += 1
140- check .add_message (Status .WARNING , f"{ name } tools upgrade available" )
141148 logging .debug (f"{ name } tools upgrade available" )
149+ if args .old :
150+ check .add_message (Status .WARNING , f"{ name } tools upgrade available" )
142151 elif guest_summary .toolsRunningStatus == "guestToolsNotRunning" :
143152 perf_data ["VMware Tools not running" ] += 1
144153 check .add_message (Status .CRITICAL , f"{ name } tools not running" )
You can’t perform that action at this time.
0 commit comments