-
Notifications
You must be signed in to change notification settings - Fork 124
[Draft]: Spike: CSPL-3458: initial code changes for zeroD #1470
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| package metrics | ||
|
|
||
| import ( | ||
| "github.com/prometheus/client_golang/prometheus" | ||
| ) | ||
|
|
||
| var ( | ||
| UpgradeStartTime = prometheus.NewGauge(prometheus.GaugeOpts{ | ||
| Name: "splunk_upgrade_start_time", | ||
| Help: "Unix timestamp when the SHC upgrade started", | ||
| }) | ||
| UpgradeEndTime = prometheus.NewGauge(prometheus.GaugeOpts{ | ||
| Name: "splunk_upgrade_end_time", | ||
| Help: "Unix timestamp when the SHC upgrade ended", | ||
| }) | ||
| ShortSearchSuccessCounter = prometheus.NewCounterVec( | ||
| prometheus.CounterOpts{ | ||
| Name: "splunk_short_search_success_total", | ||
| Help: "Total number of successful short searches per search head", | ||
| }, | ||
| []string{"sh_name"}, | ||
| ) | ||
| ShortSearchFailureCounter = prometheus.NewCounterVec( | ||
| prometheus.CounterOpts{ | ||
| Name: "splunk_short_search_failure_total", | ||
| Help: "Total number of failed short searches per search head", | ||
| }, | ||
| []string{"sh_name"}, | ||
| ) | ||
| TotalSearchSuccessCounter = prometheus.NewCounterVec( | ||
| prometheus.CounterOpts{ | ||
| Name: "splunk_total_search_success_total", | ||
| Help: "Total number of successful total searches per search head", | ||
| }, | ||
| []string{"sh_name"}, | ||
| ) | ||
| TotalSearchFailureCounter = prometheus.NewCounterVec( | ||
| prometheus.CounterOpts{ | ||
| Name: "splunk_total_search_failure_total", | ||
| Help: "Total number of failed total searches per search head", | ||
| }, | ||
| []string{"sh_name"}, | ||
| ) | ||
| ) | ||
|
|
||
| func init() { | ||
| prometheus.MustRegister(UpgradeStartTime) | ||
| prometheus.MustRegister(UpgradeEndTime) | ||
| prometheus.MustRegister(ShortSearchSuccessCounter) | ||
| prometheus.MustRegister(ShortSearchFailureCounter) | ||
| prometheus.MustRegister(TotalSearchSuccessCounter) | ||
| prometheus.MustRegister(TotalSearchFailureCounter) | ||
| } |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check High
Copilot Autofix
AI 7 months ago
To fix the problem, we need to ensure that TLS certificate verification is enabled. This involves setting
InsecureSkipVerifytofalseand properly configuring the client to use valid certificates. If the certificates are self-signed or from a private CA, we should add the CA certificate to the client's trusted pool.InsecureSkipVerifysetting tofalse.