chore (docs): place the grafana files in the right place (#2881)
### **PR Type** Enhancement, Documentation ___ ### **Description** - Added a comprehensive set of Grafana configuration files and dashboards for enhanced observability of Nhost projects. - Introduced new dashboards for Functions metrics, GraphQL metrics, Ingress metrics, and overall Project metrics. - Implemented Grafana setup scripts and configuration files for data sources, contact points, and notification policies. - Created Nhost-specific alerting rules for critical issues such as high CPU usage, low disk space, and high error rates. - Improved documentation by adding detailed comments and descriptions in configuration files. - Enhanced customization options by using environment variables and templates in various configuration files. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Configuration changes</strong></td><td><details><summary>6 files</summary><table> <tr> <td> <details> <summary><strong>setup_config.sh</strong><dd><code>Add Grafana setup configuration script</code> </dd></summary> <hr> observability/grafana/setup_config.sh <li>Added a new shell script to set up Grafana configuration<br> <li> Script creates necessary directories and generates datasources <br>configuration<br> <li> Uses environment variables and templates for dynamic configuration<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-8c8a7932243229ff1b184b232685f85e894dc85cd13fbc7e6203de6826f05f19">+12/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>contact_points.yaml</strong><dd><code>Add Grafana contact points configuration</code> </dd></summary> <hr> observability/grafana/contact_points.yaml <li>Added a new YAML file for Grafana contact points configuration<br> <li> Includes settings for email, Pagerduty, Discord, Slack, and webhook <br>notifications<br> <li> Uses templating for dynamic configuration based on user settings<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-9262f9a9442457b302afbed9a64604007bec161fb8eed794f3e75a79a3e24a8a">+59/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>dashboards_providers.yaml</strong><dd><code>Add Grafana dashboard providers configuration</code> </dd></summary> <hr> observability/grafana/dashboards_providers.yaml <li>Added a new YAML file for Grafana dashboard providers configuration<br> <li> Configures the source of dashboards to be loaded into Grafana<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-bfdc9ab104d266e0cdc3153476252536d83aeb13905c423c95f1fc9a4a135cdf">+11/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>datasources.yaml.tmpl</strong><dd><code>Add Grafana data sources configuration template</code> </dd></summary> <hr> observability/grafana/datasources.yaml.tmpl <li>Added a new YAML template file for Grafana data sources configuration<br> <li> Configures Prometheus as the default data source for Grafana<br> <li> Uses environment variables for dynamic configuration<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-07d3ef0d2277f144efb00f0e400cbdcb0a1474c9059dfa1ae281bf2388c0992c">+18/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>grafana.ini</strong><dd><code>Add Grafana main configuration file</code> </dd></summary> <hr> observability/grafana/grafana.ini <li>Added a new INI file for Grafana main configuration<br> <li> Includes settings for analytics, logging, paths, and server options<br> <li> Configures SMTP if provided in the environment<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-144fcadb330865a0b6bcbedd327d5f5b3d72c458a7805c2449f7d8bb568e13f5">+24/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>notification_policies.yaml</strong><dd><code>Add Grafana notification policies configuration</code> </dd></summary> <hr> observability/grafana/notification_policies.yaml <li>Added a new YAML file for Grafana notification policies<br> <li> Configures the default receiver for alerts<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-b79528bf44b485a4e87a327f2b82b78b6b409e06a6077eb9f6c5eea24653193d">+8/-1</a> </td> </tr> </table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>5 files</summary><table> <tr> <td> <details> <summary><strong>dashboard_functions_metrics.json</strong><dd><code>Add Grafana dashboard for Functions metrics</code> </dd></summary> <hr> observability/grafana/dashboard_functions_metrics.json <li>Added a new JSON file for Grafana dashboard configuration<br> <li> Dashboard focuses on Functions metrics including invocations, response <br>times, and errors<br> <li> Includes various panels and visualizations for comprehensive <br>monitoring<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-b2815589932503d2d05f9027d550d28f3d2a774106d0f3dec61db8678b12c385">+1280/-1</a></td> </tr> <tr> <td> <details> <summary><strong>dashboard_graphql.json</strong><dd><code>Add Grafana dashboard for GraphQL metrics</code> </dd></summary> <hr> observability/grafana/dashboard_graphql.json <li>Added a new JSON file for Grafana dashboard configuration<br> <li> Dashboard focuses on GraphQL metrics including resource utilization <br>and request rates<br> <li> Includes panels for CPU, memory, and GraphQL-specific metrics<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-4f591ab80bee38969fd64c20c4ddab89df3d810d41144089fa23bc1d59a89d4d">+696/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>dashboard_ingress_metrics.json</strong><dd><code>Add Grafana dashboard for Ingress metrics</code> </dd></summary> <hr> observability/grafana/dashboard_ingress_metrics.json <li>Added a new JSON file for Grafana dashboard configuration<br> <li> Dashboard focuses on Ingress metrics including requests, response <br>status, and errors<br> <li> Includes panels for various ingress-related metrics and visualizations<br> <br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-058aae47dde92553225c557b839f7359ad1deefe341f9a119f63b6875352bb55">+777/-1</a> </td> </tr> <tr> <td> <details> <summary><strong>dashboard_project_metrics.json</strong><dd><code>Add Grafana dashboard for Project-wide metrics</code> </dd></summary> <hr> observability/grafana/dashboard_project_metrics.json <li>Added a new JSON file for Grafana dashboard configuration<br> <li> Dashboard provides an overview of project-wide metrics<br> <li> Includes panels for CPU, memory, network, and service-specific metrics<br> <br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-1db1a1e7d7715e17415ec82d96997af4bb235de0f752711e2a6c27420067bb54">+2038/-1</a></td> </tr> <tr> <td> <details> <summary><strong>rules_nhost.yaml</strong><dd><code>Add Nhost-specific Grafana alerting rules</code> </dd></summary> <hr> observability/grafana/rules_nhost.yaml <li>Added a new YAML file for Grafana alerting rules<br> <li> Includes rules for high CPU usage, low disk space, low memory, OOM <br>kills, and high error rates<br> <li> Rules are customized for Nhost services and include detailed <br>annotations<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2881/files#diff-27165812186176e21d13a35136e43511b837700a599d3a00c61a1f6b36c55af2">+370/-1</a> </td> </tr> </table></details></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions
This commit is contained in: