metrics-per-process and old psutil

Don’t think I can open an issue with sensu-plugins-process-checks github repository for this.

One of the environments I am running Sensu, does not allow me to update python modules and I am stuck with an old version of psutil

Psutil version: psutil==1.2.1

metrics-per-process script errors out with following

Traceback (most recent call last):

File “/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-process-checks-1.0.0/bin/”, line 223, in


File “/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-process-checks-1.0.0/bin/”, line 220, in main

graphite_printer(stats_per_pid(pid), options.graphite_scheme)

File “/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-process-checks-1.0.0/bin/”, line 114, in stats_per_pid

stats[‘cpu.user’] = process_handler.cpu_times().user

AttributeError: ‘Process’ object has no attribute ‘cpu_times’

Is there any workaround or options?