Logstash exec input timeout

I'm getting this error with the exec input for logstash. It's pretty sporadic when the error comes up. For example, it'll timeout once in about every 10 executions. Is there anyway I can kill any commands that are taking longer than a given time?

Execution ran longer than the interval. Skipping sleep. {:command=>" top -bn 1 | grep mongod ", :duration=>23.284, :interval=>5, :level=>:warn}

bump

That's odd. Does the same thing happen if you run e.g. ps aux instead?

Yeah, it happens for ps aux as well as mongostat

Execution ran longer than the interval. Skipping sleep. {:command=>"ps aux | grep mongo | tail -n 1", :duration=>22.485, :interval=>5, :level=>:warn}

Execution ran longer than the interval. Skipping sleep. {:command=>"mongostat --noheaders -n 1  ", :duration=>23.773, :interval=>5, :level=>:warn}