Closed ahayworth closed 9 years ago
looks good, might be nice to be defensive and gsub out newlines in the reason passed in through optparse
I just added another commit that I think makes the situation a little more workable - specifically consider the following scenario:
With the previous commits, litmus would return a health of 88. However, I don't think that's what you actually want - health returned should be zero in that case so that the failure can be detected. Forcing the health level shouldn't override actual failure of the service - if that's wanted, then an up-file should be used to send traffic to a borked service. Newest commits change the behavior to report measured_health if measured_health is less than the forced health.
manually merged
Previously, if you wanted to force a specific health measurement for a service, you needed to change the configuration for that service to include a constant metric at the value you wanted. This commit adds (albeit a bit hackishly) the ability to specity an exact health level:
litmusctl force health 88 -r "Because reasons"
...would then set the measured health of the service to 88.
This is sometimes useful if you want to slowly balance in/out a server, and you want to do that via litmus.