-
Notifications
You must be signed in to change notification settings - Fork 1
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
Initial impl #2
Initial impl #2
Conversation
- added interval query param - implemented healthcheck
no more 404
Add saving method for splunk health check and http calls with retries
…t-reader into initial-impl
handler.go
Outdated
switch err { | ||
case nil: | ||
writer.WriteHeader(http.StatusOK) | ||
msg, _ := json.Marshal(transactions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the marshall error should not be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
handler.go
Outdated
switch err { | ||
case nil: | ||
writer.WriteHeader(http.StatusOK) | ||
msg, _ := json.Marshal(*publishEvent) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
splunk_service.go
Outdated
|
||
func (service *splunkService) GetTransactions(query monitoringQuery) ([]transactionEvent, error) { | ||
|
||
envRegex := regexp.MustCompile("-u[ks]]$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a global variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
splunk_service.go
Outdated
|
||
func (service *splunkService) GetLastEvent(query monitoringQuery) (*publishEvent, error) { | ||
|
||
envRegex := regexp.MustCompile("-u[ks]]$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Changes Unknown when pulling 8d54f35 on initial-impl into ** on master**. |
Changes Unknown when pulling a6b5117 on initial-impl into ** on master**. |
Changes Unknown when pulling 26972c5 on initial-impl into ** on master**. |
Changes Unknown when pulling 8e01558 on initial-impl into ** on master**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please run goimports on the source files
goimports -w *.go
main.go
Outdated
}) | ||
splunkURL := app.String(cli.StringOpt{ | ||
Name: "splunk-url", | ||
Desc: "Splunk URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe describe this a bit more in detail - like: Splunk Rest API url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Changes Unknown when pulling 4a92247 on initial-impl into ** on master**. |
|
||
Response example: | ||
``` | ||
[{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the example? (eventcount, publish_start)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
README.md
Outdated
### Logging | ||
|
||
* The application uses [logrus](https://github.com/Sirupsen/logrus); the log file is initialised in [main.go](main.go). | ||
* Logging requires an `env` app parameter, for all environments other than `local` logs are written to file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still apply?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
Changes Unknown when pulling 95f946d on initial-impl into ** on master**. |
Changes Unknown when pulling 443ca0e on initial-impl into ** on master**. |
No description provided.