Add swarm checks#21
Conversation
|
Matt, thanks for the PR. Sorry for the slow response, I was traveling over the weekend. After my initial look there a few things that do stand out. First Travis checks are failing. Secondly I see you added multiple 'url' functions. I would rather expand the existing 'get_url' to add a return code as that would reduce the number of functions overall. To that end I created a branch which does this. Finally the documentation needs to be updated. I can take care of that if you find that annoying. |
|
Apologies about the failing tests. I have docker running locally so I think it found the socket file. I will get those fixed up. FWIW, At a glance, your branch looks good. I will merge into mine and get that fixed up. Docs are easy and very important. I'll do my best to add to them. Thanks! |
|
|
|
Matt, do you have plans to complete this PR. I think it would be able valuable improvement. Let me know if there is something I can do to help. |
|
Hey Tim, yes, sorry. I keep saying I'm going to get this squared away as a Friday task and then Fridays run away from me. |
|
No worries, it is holiday weekend around my parts so I won't be looking at it until Wednesday or Thursday at the earliest. |
|
Matt, my week has been a zoo. Literally I wasn't/won't be home any night this week. As a result I won't be doing a deep review until this weekend but I did notice one thing. Is it true you think the swarm checks should be exclusive, i.e. not other checks should be performed when checking swarm status and service status? That makes sense as the arguments would be for different kinds of things, containers Vs. services Vs. node status. Looking at I am also considering if, perhaps, it makes more sense to break swarm logic apart into it's own check as it really very different. What do you think? There would be |
|
No worries, Tim! My week has also been very crazy. It is my opinion that an nrpe check should output results or statistics about only a single metric at a time. By overloading a check, the recipient of any alert has to try to parse the output and doing that at 2 or 3am is never a good time. I agree that perhaps my separation was not done well but it is also likely I did it subconsciously. That being said, I like your idea that it might be best to split the functions into different commands. |
|
I spent some time this weekend and split out the swarm, checks into their own script. How does this look? |
Still need to update documentation
|
Nudge nudge. I can merge this but I figured you may want to pull it in and update your PR so you get some credit. It was your suggestion and I would hate to obscure that. |
|
👍 I was on vacation for the last week and this didn't quite make it into my list of things to review at 30k feet. I have merged and pushed back into this PR. Good stuff. Thank you! |
Closes #20