Skip to content

Grafana Dashboard for monitoring resources and services #861

Closed

Description

@Rub21

Due to the recent increase in resource usage in #783 and #850 It would be convenient to monitor our resources and make this visible to everyone. As OSM does #783 (comment), I think it would be reasonable to add a Grafana dashboard based on Prometheus to see how many resources the services are using in each service. Currently, we have Prometheus and some exporters in the staging and production clusters, but access to these statistics is still restricted. I could open the access to these statistics.

cc. @batpad @jeffreyameyer @danrademacher

Activity

  1. changed the title [-]Grafana Dashboard for monitoring resources[/-] [+]Grafana Dashboard for monitoring resources and services[/+] on Jul 31, 2024
  2. danrademacher commented on Oct 4, 2024

    @danrademacher

    @Rub21 do you have a sense of costs involved here?

    I see they have a free tier, but I am not sure if we fit there:
    https://grafana.com/pricing/

  3. danrademacher commented on Oct 4, 2024

    @danrademacher

    If we fit in free tier, then this is an easy Yes. If it costs, we need to confer with Jeff

  4. Rub21 commented on Oct 17, 2024

    @Rub21
    MemberAuthor

    If we fit in free tier, then this is an easy Yes. If it costs, we need to confer with Jeff

    This is free; it will just consume some resources in our infrastructure, but it will help check how much is used.

    Results in Staging, https://monitoring.staging.openhistoricalmap.org

    I've been using Prometheus and Grafana to monitor server performance, specifically tracking CPU and memory usage, along with the resource consumption of the pods they host. In the staging environment, I checked if we have sufficient resources or more than enough.

    • In the staging infrastructure, we've been running two xlarge machines. The resources have proven more than sufficient when monitoring CPU and memory usage over time. 👇
    Screenshot 2024-10-16 at 3 04 56 AM

    I've adjusted the node resources in staging and reduced the size to two large machines, but it still seems we have plenty of resources available.

    image

    So, I ended up with a large machine and a medium machine.

    image image

    The dashboard is very helpful; at least it's showing how much our infrastructure is actually being used by our service, and we can reduce the size to save costs.

    We also have a dashboard for production at https://monitoring.openhistoricalmap.org/. Before reducing production resources, we might need to discuss it further .

    Savings in staging for this month: I’ve already reduced the size of the machines. Running two m5.xlarge instances costs approximately $370.84 per month, while using one m5.large ($70.08) and one m1.medium ($33.60) totals $103.68 per month. This means we’d save approximately $267.16 per month compared to using two m5.xlarge instances.

    cc. @danrademacher @batpad @jeffreyameyer

  5. Rub21 commented on Oct 22, 2024

    @Rub21
    MemberAuthor

    Current status for Production environment using the grafana

    I have also implemented the Prometheus and Grafana dashboard for production, which provides a better overview of how the nodes are using resources over the last 10 days, giving insights into how much resources we are actually utilizing.

    The current web API database is running alone on a node, but it doesn’t seem to be consuming many resources. Last time, we upgraded the node size due to an issue with cgimap link, but the node has been using less than 10% over the last 12 days. My recommendation is to reduce the node size by half.
    image

    For the tiler database, we are running fine. the size is more than enough, though there are some peaks where it is using 90% of the CPU and RAM, but seems fine.

    image

    For the web container, we are running fine, but reducing it to smaller nodes and leveraging the autoscaling we implemented in the past could help reduce node costs

    image

    cc. @batpad @danrademacher @jeffreyameyer

  6. danrademacher commented on Nov 5, 2024

    @danrademacher

    Based on discussion, we should reduce the web database API to 4 CPU and 16GB RAM.

  7. Rub21 commented on Nov 12, 2024

    @Rub21
    MemberAuthor

    The node for api db has been updated, we are using now an x.large machine!

  8. Rub21 commented on Dec 12, 2024

    @Rub21
    MemberAuthor

    From our last call, the idea was to make Grafana public to check the infrastructure resources usage. However, it’s not currently possible because we’re using variables in the dashboard . Since our infrastructure scales dynamically based on requirements, we rely on these variables to view resource usage dynamically.
    Screenshot 2024-12-12 at 6 51 40 PM

    I have added the code to the repository to clearly document the Grafana and Prometheus installation and configuration: https://github.com/OpenHistoricalMap/k8s-monitoring

  9. danrademacher commented on Dec 21, 2024

    @danrademacher

    Ok, thanks, Ruben. So we have docs on how to install and run this dashboard in the relevant repo.

  10. added theissue type on Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions