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

Export gensign failure otel metrics #222

Merged
merged 2 commits into from
Nov 18, 2024
Merged

Export gensign failure otel metrics #222

merged 2 commits into from
Nov 18, 2024

Conversation

py4chen
Copy link
Contributor

@py4chen py4chen commented Nov 18, 2024

To capture authn or any handler signing failure for gensign.

❯ ssh -A user_a@localhost -p 222 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
'{"ifVer":7, "username":"user_invalid", "hostname":"localhost", "sshClientVersion":"0.0"}'
Warning: Permanently added '[localhost]:222' (ECDSA) to the list of known hosts.
{"level":"info","app":"gensign","id":"b7683c0d3a","err":"paranoids.regular handler authentication error, cannot sign the challenge: agent: failed to sign challenge","handler":"paranoids.regular","time":"2024-11-18T15:31:38Z","caller":"/go/src/github.com/theparanoids/ysshra/gensign/gensign.go:38","msg":"authentication failed"}
{"level":"error","app":"gensign","id":"b7683c0d3a","id":"b7683c0d3a","err":"all authentications failed, all authentications failed","time":"2024-11-18T15:31:38Z","caller":"/go/src/github.com/theparanoids/ysshra/cmd/gensign/main.go:127","msg":"failed to run gensign"}

# HELP ysshra_gensign_run_total Count the number of gensign runs
# TYPE ysshra_gensign_run_total counter
ysshra_gensign_run_total{gensign_error_type="1",job="gensign"} 1


# HELP ysshra_gensign_total Count the number of gensign runs
# TYPE ysshra_gensign_total counter
ysshra_gensign_run_total{gensign_error_type="7",job="gensign"} 1```

<!-- The following line must be included in your pull request -->
I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@py4chen py4chen changed the title Export gensign failure metrics Export gensign failure otel metrics Nov 18, 2024
@py4chen py4chen marked this pull request as ready for review November 18, 2024 14:30
@py4chen py4chen requested review from maditya and hkadakia November 18, 2024 14:38
@py4chen py4chen merged commit 11e4e6a into main Nov 18, 2024
3 checks passed
@py4chen py4chen deleted the pchen06/error-metrics branch November 18, 2024 16:34
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.

2 participants