kinduff / csgo_exporter

A Prometheus exporter for Counter-Strike: Global Offensive.
Apache License 2.0
19 stars 3 forks source link

Create a Grafana Dashboard #18

Closed kinduff closed 3 years ago

kinduff commented 3 years ago

Now that the metrics are coming together, it would be nice to have a fully featured dashboard.

My experience is very low, so any kind of help would be awesome.

I really like the work that was done here https://www.influxdata.com/influxdb-templates/counter-strike-global-offensive-gametracker/

simonszu commented 3 years ago

I can create a first draft once i figure out why the exporter is currently crashing on a regular interval for me. Don't ask me for a timeframe yet. :D

kinduff commented 3 years ago

That would be awesome @simonszu! Thank you

simonszu commented 3 years ago

Please check https://grafana.com/grafana/dashboards/14546 for a first draft. The general functionality of your linked influxdb template is implemented, but the optics need some improvement. Also i noticed that the linked influxdb template also has a "Hits per weapon" feature. In general i could implement this by scraping csgo_stats_metric{name="total_hits_weaponname"} but this takes ages to implement.

I created https://github.com/kinduff/csgo_exporter/issues/1 back then so that i can define variables in grafana and just cycle over them. This works fine for shots and kills, but not for hits, since this isn't implemented yet.

I also want to implement more features in the dashboard with the magic of combining more than query to get the real interesting stats like "hit accuracy per shot" or "kill accuracy per hit", but lets keep first things first, i need to improve the optics. The red and green values are currently set by some predefined thresholds in each panel, which are set by default by grafana, which does not make sense since a simple value like "total shots" does not need any thresholds.

Also, just one organizational question: I just went and published the first draft publicly in the grafana dashboard collection. Are you cool with that? Should i fork this repo and create a PR with the most recent json definition of the dashboard?

kinduff commented 3 years ago

Looks amazing @simonszu, I really like this first version. Thank you very much. I just created #23 in order to address the missing metric.

I think visually speaking, we can find a color that is okay for the eyes, and remove the red from the threshold.

I'm super cool with having the dashboard public, a copy in the repository would be very useful too, so if you can fork and make a PR, perhaps in the extra/grafana folder and name it dashboard.json. This way anyone can contribute. What do you think?

kinduff commented 3 years ago

About other kind of stats, like the ones you mentioned, while I was refactoring I found the opportunity to expose these, but I didn't because I wanted to check if it's possible to do it in Grafana, or if it's worth to have it in the exporter.

simonszu commented 3 years ago

I would like to submit a PR with the dashboard.json, but i have currently somehow some major infrastructure issues and also a little less time than 11 days ago. If you want to have an internal look to the JSON, please import the linked dashboard to your Grafana and copy the json out of the grafana. I will come back to this topic as soon as my workload allows it :)

kinduff commented 3 years ago

@simonszu I was waiting for you, but happy to do that. Going to make a couple of mods on the dashboard (colors, add more stats, etc). I would be very nice if when done, you could update the one in the Grafana website, or if you could assign me as a co-owner, happy to do that too (not sure if its possible though!).

Thanks again, Simon!

simonszu commented 3 years ago

As far as i see it is not possible to add other accounts as co-owners. However it is possible to delete dashboards. Since you are the maintainer of the github repo, i will be okay with you being the maintainer of the dashboard as well, so i could delete my instance. It has zero downloads, at least that's what the website is showing me, so we won't break any user's grafana update procedure ;)

kinduff commented 3 years ago

Thank you! Will let you know when I have it ready so you can take a look. I'm also going to add a "demo" instance with Grafana + Prometheus, etc. So everybody can see the final product.

kinduff commented 3 years ago

@simonszu I've been improving the dashboard little by little, whenever I have the change.

Added a new section for the last match, including some calculations.

image

Market is the most interesting one:

image

Will continue and post my progress!

simonszu commented 3 years ago

Very nice. How should we finalize the publishing of the dashboard? Should i delete my board from the grafana page, so whenever one searches for "csgo" they will find a version created by you? I think committing the json file to this repo is a good idea as well, but your dashboard is more improved than mine right now ;)

kinduff commented 3 years ago

@simonszu I really want to give you the authorship of the dashboard. If you can be available to update it whenever we have it updated here in the repository, then you can keep yours. If you don't want that type of commitment I can upload a version.

Whatever you think it's right for you.

kinduff commented 3 years ago

@all-contributors please add @simonszu for content

allcontributors[bot] commented 3 years ago

@kinduff

I've put up a pull request to add @simonszu! :tada:

simonszu commented 3 years ago

OK, i have seen you have uploaded your own version to the Grafana dashboard repository. I am fine with that, though. However, i'll fork this github repo now so that i will be able to commit my changes and improvements.

kinduff commented 3 years ago

@simonszu Please do! Thank you very much