-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Expose metrics #258
Comments
Prometheus please |
I'd like to focus on providing and endpoint |
Any progress on this one? |
Nope! |
Here's a basic RFC for this. |
https://openmetrics.io/ could be an option, although it's still in its infancy |
@lkysow How do you think metrics should be collected and exposed? Any preference? I think we should use an existing library for collecting metrics (Prometheus, Openmetrics in the future?,...), and not reinvent the wheel.. There are hundreds of Prometheus exporters, so you just need a sidecar to expose them in your preferred format or to send them your metrics store. |
You could default to exposing as JSON and give the option (URL parameter) to change the format to something else, i.e. Prometheus. Consul and Nomad allow for this. |
@xbglowx How do they do metric collection internally? Have they reimplemented Counters, Gauges, Histograms, etc? Edit: Ok, they are using https://github.com/armon/go-metrics which could be an option. I am gonna give that a try. |
Thay library only supports Gauges and Counters. And personally I don't like that it tries to deal with all kind of sinks. I don't think that logic should be built within Atlantis. Sidecar extractors solve the issue in a much cleaner manner. |
@caryyu please use the reactions on the post rather than adding comments. |
Datadog integration? |
In lieu of metrics support, how are people currently monitoring their atlantis deploy to make sure it's healthy? |
Another option could be to log metrics in some structured format like EMF: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Specification.html At least in AWS this would be easy to parse out into Cloudwatch metrics. Not sure if any other tools have added support for the spec. |
It's going to be tough to get approval to use Atlantis without a prometheus metrics endpoint. I'm wondering how others are monitoring Atlantis uptime? |
Absolutely agree that we should add this, it's just not something that IMO ranks as the most important problem for atlantis to solve at this moment. That is not to say my opinion is important 😉 . If you or your org feel it is, this is OSS and someone (props to I know everyone (self included) loves data but in absence of data I can offer anecdotal advice on real usage. I have run atlantis at multiple orgs for years and have had 0 problems from an uptime perspective. We ran it on fairly typical instances (something like a Personal Plea/Rant to the Industry: there is no one single monitoring system in my experience that covers everything and does it the best. They all have their strengths and weaknesses. Saying someone can't use a solution because it is not supported by a specific monitoring product is ludicrous at an engineering organization. There are always options, while it might not be sexy running a sidecar for something like atlantis can work just fine for many use cases. I had to build monitoring for production docker setups before there were projects like prometheus, docker monitoring apis, docker exec, etc. We always found a clever ways to meet the needs of our customers regardless where there apps are at. Eventually the solutions mature over time and we replace the clever as it is no longer needed. |
We have metrics support in our fork, however it uses statsd in the form of github.com/lyft/gostats. Here is the commit: If theres enough likes on this, seeing as it's already implemented, I can just upstream it for others to build upon/use. If it helps I can also have a tutorial on how to setup statsd with atlantis. I know people were expressing their desire for prometheus but this is already done and used in production so could be a starting point at least. |
Awesome work. Thanks @nishkrishnan |
@nishkrishnan would be great to see your work here as PR ;) |
@nishkrishnan any plans to open a PR? |
yeah will do, sorry about that i must have missed all this stuff. |
I have PR open to support Prometheus metrics: #2204 |
Thanks for the work @yoonsio. however in 0.19.8 trying to implement
we get an error of
which is strange because in #2204 we can clearly see prometheus being added to metrics here |
@ekhaydarov can you try 0.19.9 ? Also, the whitespace in your yaml sample seems off. Just like atlantis/server/core/config/raw/global_cfg.go Lines 14 to 19 in d1d1539
metrics:
prometheus:
endpoint: /metrics |
Via @mechastorm, they would like Atlantis to expose metrics around:
The text was updated successfully, but these errors were encountered: