#136 API metrics
Opened 6 years ago by gnaponie. Modified 6 years ago

Hello,
we are internally making an effort to improve our monitoring and for this reason we are starting to put in place some metrics.
We would like to add some metrics also to ResultsDB and export them thru the API.
We are using Prometheus as monitoring system.

Wdyt?


Yeah, I'm interested. I'm not familiar with Prometheus, but from the overview page of the project, it looks like it's straightforward enough.

What kinds of metrics are we talking about? How frequent would the server-polling be? Are the metrics you have in mind usable for load-balanced deployments? These might be silly questions, of course - as I said, I'm not really clad in this.

Anyway, as long as i the data collection won't cause terrible overhead, the required bits (if any) are packaged for Fedora, and the stats would be accessible also to us (given the instances we manage will be monitored), I'm all for it!

Yeah, I'm interested. I'm not familiar with Prometheus, but from the overview page of the project, it looks like it's straightforward enough.

It shouldn't be complex in most scenarios. There's an already existing module for Flask/SQLAlchemy apps, see https://pagure.io/monitor-flask-sqlalchemy for inspiration/direct usage.

What kinds of metrics are we talking about? How frequent would the server-polling be? Are the metrics you have in mind usable for load-balanced deployments? These might be silly questions, of course - as I said, I'm not really clad in this.

There may be some general metrics. As of resultsdb, DB backend metrics may be exported directly using an exporter (postgres_exporter), so there's no need to implement this. There may be some interesting metrics related to frontend, messaging and other parts of the app. The load-balanced environment can be solved by aggregating metrics collected by Prometheus from individual hosts/containers/pods etc.

Anyway, as long as i the data collection won't cause terrible overhead, the required bits (if any) are packaged for Fedora, and the stats would be accessible also to us (given the instances we manage will be monitored), I'm all for it!

There's prometheus_client library packaged for Python2 and Python3, should be available in Fedora 29 repos.

:thumbsup: Sounds good. How about EPEL7/RHEL7? We've just had some PR's WRT packages missing there.

Anyway, I'm open to PRs, overall I like the idea. Thanks for bringing this up!

@jskladan There's python-prometheus_client for EL7, so Py27 only.

We're going to discuss in the team priorities as of resultsdb monitoring, but I am optimistic here. So let's hope, the PR will appear soon.

Log in to comment on this ticket.

Metadata