sstarcher / docker-sensu

Dockerized Sensu - Client, Server, Api
MIT License
103 stars 72 forks source link

20180130 fixes #66

Closed DrMurx closed 6 years ago

DrMurx commented 6 years ago

When refactoring for the ruby:2.4-slim-stretch base image, I introduced a bug which prevented the search & replace for /dev, /proc and /sys directory names in the sensu plugins. This PR solves this issue.

I've also slightly rephrased the sed expressions used to find the aforementioned paths and narrowed them to the beginning of a string. Otherwise, paths like /proc/net/dev (found in metrics-interface.rb) could break.

DrMurx commented 6 years ago

Unfortunately, the new sed mechanism doesn't work in a regular expression context like here or here.

A more sustainable solution might be to refactor the affected sensu plugins so that they can take parameters to locate the proper /dev, /proc and /sys directories.

sstarcher commented 6 years ago

I have not tested out the sed replacing of dev,proc,sys before so I'll have to go back through the code base and test out the old and current behavior.