Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSH banner as a metric in the lua ssh2 check #224

Merged
merged 2 commits into from May 11, 2015

Conversation

esproul
Copy link
Member

@esproul esproul commented May 1, 2015

We're already reading the banner; would be nice to have it as a metric.

@@ -267,6 +267,9 @@ function initiate(module, check)
local banner = e:read("\n")
if banner == nil then return cerr("failed to read SSH banner") end

banner = banner:gsub("%s+$", "")
check.metric_string("banner", banner)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't modify the banner variable.

drop the first line and just do:

check.metric_string("banner", banner:gsub("%s+$", ""))

@esproul
Copy link
Member Author

esproul commented May 11, 2015

When I do that, I get a "wrong number of arguments" error.

@esproul
Copy link
Member Author

esproul commented May 11, 2015

Using a local variable to get the trimmed version of the banner in.

postwait added a commit that referenced this pull request May 11, 2015
Add SSH banner as a metric in the lua ssh2 check
@postwait postwait merged commit f17fc5a into circonus-labs:master May 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants