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 on-going attack to Prometheus #17

Open
nitishm opened this issue Jan 23, 2019 · 5 comments
Open

Export on-going attack to Prometheus #17

nitishm opened this issue Jan 23, 2019 · 5 comments

Comments

@nitishm
Copy link
Owner

nitishm commented Jan 23, 2019

Needs more thought. This would help to see a live plot of an attack using grafana

@nitishm nitishm changed the title Export on-going attack to a time-series database like InfluxDB Export on-going attack to Prometheus Feb 11, 2019
@nitishm
Copy link
Owner Author

nitishm commented Feb 11, 2019

Exporting metrics to prometheus using promauto should be a straight-forward task.
https://godoc.org/github.com/prometheus/client_golang/prometheus/promauto

@goshlanguage
Copy link

@nitishm Typically prometheus is meant to scrape metrics endpoints, as opposed to being pushed to.

Would a metrics endpoint be an acceptable outcome for this issue?

@goshlanguage
Copy link

goshlanguage commented Oct 4, 2019

Sorry, I think I misunderstood it when I read the comments last night. It does seem that you were requesting an exported endpoint.

Would the models/report_response be the model we want to export?

@nitishm
Copy link
Owner Author

nitishm commented Oct 8, 2019

@ryanhartje From what I recall, I wanted to capture the metrics live through the AttackFn as shown here https://github.com/nitishm/vegeta-server/blob/v1.0.0/pkg/vegeta/vegeta.go#L68-L102
Prior to encoding the result, we can use the members of vegeta.Result to increment the prometheus metrics (counters, gauges, etc) as each result is received through the channel.

The idea is mimic how the vegeta plot functionality works in the original command line vegeta tool. See https://github.com/tsenart/vegeta/blob/master/plot.go

This task is a little involved wherein you will need to play around with vegeta CLI command for live plotting and understand how that works to mimic it via prometheus metrics, which must be exported to grafana through relevant dashboards (future task).

Let me know if that makes sense.

@flaviostutz
Copy link

Just for you to know, there is a similar issue on Vegeta itself: tsenart/vegeta#477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants