{"id":7282,"date":"2020-11-29T07:59:26","date_gmt":"2020-11-29T04:59:26","guid":{"rendered":"https:\/\/kifarunix.com\/?p=7282"},"modified":"2024-03-14T23:38:46","modified_gmt":"2024-03-14T20:38:46","slug":"monitoring-gitlab-metrics-with-prometheus-and-grafana","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/monitoring-gitlab-metrics-with-prometheus-and-grafana\/","title":{"rendered":"Monitoring Gitlab Metrics with Prometheus and Grafana"},"content":{"rendered":"\n
In this tutorial, we will learn about monitoring Gitlab metrics with Prometheus and Grafana. Grafana<\/a> is a data visualization and monitoring tool and supports time series datastores such as Graphite, InfluxDB, Prometheus, Elasticsearch. Prometheus<\/a> is a powerful time-series monitoring service, providing a flexible platform for monitoring GitLab and other software products. GitLab provides out of the box monitoring with Prometheus, providing easy access to high quality time-series monitoring of GitLab services.<\/em> Grafana can be used to achieve better visualization of the metrics collected by the Prometheus.<\/p>\n\n\n\n Want more Grafana and Prometheus? Check the links below;<\/p>\n\n\n\n Prometheus: Up & Running: Infrastructure and Application Performance Monitoring<\/a><\/p>\n\n\n\n Learn Grafana 7.0: A beginner’s guide to getting well versed in analytics, interactive dashboards, and monitoring<\/a><\/p>\n\n\n\n Before you can proceed, we assume you have a Gitlab server up and running. However, you can follow the link below to install and setup Gitlab server on an Ubuntu 20.04 system;<\/p>\n\n\n\n Install Gitlab with SSL\/TLS Certificate on Ubuntu 20.04<\/a><\/p>\n\n\n\n By default, Omnibus Gitlab installations comes bundled with Grafana and Prometheus. To confirm this, simply check the status of Gitlab services;<\/p>\n\n\n\n As you can see, we have Grafana and Prometheus services up and running. Similarly, you can see that we have various exporters such as You can check the status of the individual service as follows;<\/p>\n\n\n\n By default, Prometheus is configured to be locally accessible from the Gitlab server itself. If you want to be able to access Prometheus externally, edit the configuration file and adjust the lines below accordingly.<\/p>\n\n\n\n You can replace localhost with a FQDN or an IP address.<\/p>\n\n\n\n If you do not want to allow external access to Gitlab Prometheus, then you can skip the above.<\/p>\n\n\n\n Once you have made the changes, be sure to reconfigure Gitlab services for the changes to take effect;<\/p>\n\n\n\n You can access Prometheus dashboard, either locally or externally depending on your setup. In my case, we have configured Prometheus for external access.<\/p>\n\n\n\n To allow external access, ensure that port Ubuntu systems and the likes;<\/p>\n\n\n\n CentOS systems and the likes;<\/p>\n\n\n\n Then navigate to the Prometheus dashboard locally, ( There are a sample Prometheus dashboard queries you have been provided with on Gitlab documentation page<\/a>;<\/p>\n\n\n\n You can execute and view the report on Prometheus dashboard. For example, let us execute the memory utilization query (Percentage memory available on the system) above. You should get such sample console values and graph as shown in the screenshots below;<\/p>\n\n\n\n The Console<\/p>\n\n\n\n The Graph<\/p>\n\n\n\n You can read more about Prometheus Queries<\/a>.<\/p>\n\n\n\n As you can see above, we got the metrics yes, but the visualization is not up to the par, -:).<\/p>\n\n\n\n We want to feel the goodness of Grafana visualization. Note that, in this setup, we are utilizing the Grafana that comes bundled with Gitlab server itself.<\/p>\n\n\n\n By default, the Grafana is enabled and single sign on with Gitlab is automatically enabled as well. However in this setup, we enable login using username and password.<\/p>\n\n\n\n Authentication to Grafana using username\/password is disabled by default. Hence, open the configuration file and navigate to Grafana Dashboards section and enable username\/password authentication by uncommenting the line, Save and exit the file.<\/p>\n\n\n\n Reconfigure Gitlab to effect the changes;<\/p>\n\n\n\n Once you have enabled username\/password authentication, navigate to the Gitlab Grafana URL, http:\/\/FQDN-or-IP\/-\/grafana<\/strong>.<\/p>\n\n\n\n The username<\/strong> for logging in is Then login to Grafana. Upon successful login, you are welcomed into Grafana dashboard.<\/p>\n\n\n\n In order for Grafana to collect metrics from Prometheus and provide visualizations, you need to add Prometheus datasource. By default, you will find that Prometheus datasource has been added automatically. You can check by navigating to Configuration<\/strong> > Datasources<\/strong>.<\/p>\n\n\n\n However, if you need to add a new datasource;<\/p>\n\n\n\n Similarly, there are some default dashboards that the Prometheus datasource ships with. If you navigate to Configuration<\/strong> > Datasources<\/strong> > click on Gitlab Omnibus datasource > Dashboards<\/strong>. Click Import<\/strong> to import the dashboard. The button changes to Re-import<\/strong> after importing.<\/p>\n\n\n\n Once you have imported the dashboards, you can now view them. Click the search button and select the dashboard you want to view its visualizations. For example, let us view the Prometheus 2.0 stats dashboard.<\/p>\n\n\n\n Similarly, you can monitor the Gitlab server system metrics such as cpu usage, RAM, disk I\/O e.t.c. See the dashboard below;<\/p>\n\n\n\n For the above dashboards, below is a modified json configuration file (modified version of Gitlab system dashboard for Grafana<\/a>).<\/p>\n\n\n\nUsing Prometheus and Grafana to Monitor Gitlab Metrics<\/h2>\n\n\n\n
gitlab-ctl status<\/code><\/pre>\n\n\n\n
run: alertmanager: (pid 4248) 22043s; run: log: (pid 4158) 22046s\nrun: gitaly: (pid 4273) 22042s; run: log: (pid 4147) 22046s\nrun: gitlab-exporter: (pid 4285) 22042s; run: log: (pid 4151) 22046s\nrun: gitlab-workhorse: (pid 4297) 22042s; run: log: (pid 4157) 22046s\nrun: grafana: (pid 96055) 13581s; run: log: (pid 4152) 22046s\nrun: logrotate: (pid 190276) 422s; run: log: (pid 4156) 22046s\nrun: nginx: (pid 96045) 13583s; run: log: (pid 4155) 22047s\nrun: node-exporter: (pid 4352) 22041s; run: log: (pid 4148) 22047s\nrun: postgres-exporter: (pid 4384) 22041s; run: log: (pid 4159) 22047s\nrun: postgresql: (pid 4425) 22038s; run: log: (pid 4149) 22047s\nrun: prometheus: (pid 78644) 15085s; run: log: (pid 4160) 22047s\nrun: puma: (pid 95895) 13594s; run: log: (pid 4150) 22047s\nrun: redis: (pid 4469) 22036s; run: log: (pid 4153) 22047s\nrun: redis-exporter: (pid 4477) 22036s; run: log: (pid 4161) 22047s\nrun: sidekiq: (pid 95784) 13602s; run: log: (pid 4154) 22047s\n<\/code><\/pre>\n\n\n\n
node-exporter<\/code><\/strong>,
gitlab-exporter<\/code> for collecting host and Gitlab performance metrics.<\/p>\n\n\n\n
gitlab-ctl status prometheus<\/code><\/pre>\n\n\n\n
gitlab-ctl status grafana<\/code><\/pre>\n\n\n\n
Configuring Prometheus on Gitlab Server<\/h3>\n\n\n\n
vim \/etc\/gitlab\/gitlab.rb<\/code><\/pre>\n\n\n\n
##! Advanced settings. Should be changed only if absolutely needed.\n#prometheus['listen_address'] = 'localhost:9090'\nprometheus['listen_address'] = '192.168.57.3:9090'\n<\/strong>#\n...<\/code><\/pre>\n\n\n\n
gitlab-ctl reconfigure<\/code><\/pre>\n\n\n\n
...\nRecipe: gitlab::gitlab-rails\n * execute[clear the gitlab-rails cache] action run\n - execute \/opt\/gitlab\/bin\/gitlab-rake cache:clear\nRecipe: monitoring::prometheus\n * execute[reload prometheus] action run\n - execute \/opt\/gitlab\/bin\/gitlab-ctl hup prometheus\n\nRunning handlers:\nRunning handlers complete\nChef Infra Client finished, 9\/811 resources updated in 01 minutes 09 seconds\ngitlab Reconfigured!\n<\/code><\/pre>\n\n\n\n
Viewing Gitlab Performance Metrics on Prometheus<\/h3>\n\n\n\n
9090\/tcp<\/strong><\/code> is opened on firewall if firewall is running.<\/p>\n\n\n\n
ufw allow 9090\/tcp<\/code><\/pre>\n\n\n\n
firewall-cmd --add-port=9090\/tcp --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n
http:\/\/localhost:9090<\/strong><\/code>) or externally (
http:\/\/fqdn-or-IP:9090<\/strong><\/code>).<\/p>\n\n\n\n
<\/figure>\n\n\n\n
\n
((node_memory_MemAvailable_bytes \/ node_memory_MemTotal_bytes) or ((node_memory_MemFree_bytes + node_memory_Buffers_bytes + node_memory_Cached_bytes) \/ node_memory_MemTotal_bytes)) * 100<\/code><\/li>\n\n\n\n
1 - avg without (mode,cpu) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m]))<\/code><\/li>\n\n\n\n
rate(node_network_transmit_bytes_total{device!=\"lo\"}[5m])<\/code><\/li>\n\n\n\n
rate(node_network_receive_bytes_total{device!=\"lo\"}[5m])<\/code><\/li>\n<\/ul>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Monitor Gitlab Metrics with Prometheus and Grafana<\/h3>\n\n\n\n
Enable Grafana Login using username and password<\/h4>\n\n\n\n
grafana['disable_login_form'] = false<\/strong><\/code>.<\/p>\n\n\n\n
vim \/etc\/gitlab\/gitlab.rb<\/code><\/pre>\n\n\n\n
...\n################################################################################\n## Grafana Dashboards\n##! Docs: https:\/\/docs.gitlab.com\/ee\/administration\/monitoring\/prometheus\/#prometheus-as-a-grafana-data-source\n################################################################################\n\n#grafana['enable'] = true\n# grafana['log_directory'] = '\/var\/log\/gitlab\/grafana'\n# grafana['home'] = '\/var\/opt\/gitlab\/grafana'\n# grafana['admin_password'] = 'admin'\n# grafana['allow_user_sign_up'] = false\n# grafana['basic_auth_enabled'] = false\ngrafana['disable_login_form'] = false\n<\/code><\/pre>\n\n\n\n
gitlab-ctl reconfigure<\/code><\/pre>\n\n\n\n
Accessing Gitlab Grafana Dashboard<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
admin<\/code>. For the password, you can reset it by running the command below;<\/p>\n\n\n\n
gitlab-ctl set-grafana-password<\/code><\/pre>\n\n\n\n
<\/figure>\n\n\n\n
Add Prometheus Datasource to Grafana<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
\n
Import Gitlab Grafana Dashboards<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Viewing Gitlab Grafana Dashboards<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
{\n \"annotations\": {\n \"list\": [\n {\n \"builtIn\": 1,\n \"datasource\": \"-- Grafana --\",\n \"enable\": true,\n \"hide\": true,\n \"iconColor\": \"rgba(0, 211, 255, 1)\",\n \"name\": \"Annotations & Alerts\",\n \"type\": \"dashboard\"\n },\n {\n \"datasource\": \"GitLab Omnibus\",\n \"enable\": false,\n \"expr\": \"ALERTS{alias=\\\"$host\\\", alertstate=\\\"firing\\\"}\",\n \"iconColor\": \"rgb(252, 5, 0)\",\n \"name\": \"Alert\",\n \"tagKeys\": \"severity\",\n \"textFormat\": \"{{ alias }} : {{alertstate}}\",\n \"titleFormat\": \"{{ alertname }}\"\n },\n {\n \"datasource\": \"GitLab Omnibus\",\n \"enable\": true,\n \"expr\": \"ALERTS{alias=\\\"$host\\\",alertstate=\\\"pending\\\"}\",\n \"iconColor\": \"rgb(228, 242, 9)\",\n \"name\": \"Warning\",\n \"tagKeys\": \"severity\",\n \"textFormat\": \"{{ alias }} : {{ alertstate }}\",\n \"titleFormat\": \"{{ alertname }}\"\n }\n ]\n },\n \"description\": \"GitLab Prometheus for system metrics. \\r\\nLoad, CPU, RAM, network, process ... \",\n \"editable\": true,\n \"gnetId\": 7697,\n \"graphTooltip\": 1,\n \"id\": 17,\n \"iteration\": 1606596413793,\n \"links\": [],\n \"panels\": [\n {\n \"cacheTimeout\": null,\n \"colorBackground\": false,\n \"colorValue\": true,\n \"colors\": [\n \"rgba(245, 54, 54, 0.9)\",\n \"rgba(237, 129, 40, 0.89)\",\n \"rgba(50, 172, 45, 0.97)\"\n ],\n \"datasource\": \"GitLab Omnibus\",\n \"decimals\": 1,\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"format\": \"s\",\n \"gauge\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"show\": false,\n \"thresholdLabels\": false,\n \"thresholdMarkers\": true\n },\n \"height\": \"50px\",\n \"id\": 19,\n \"interval\": null,\n \"links\": [],\n \"mappingType\": 1,\n \"mappingTypes\": [\n {\n \"name\": \"value to text\",\n \"value\": 1\n },\n {\n \"name\": \"range to text\",\n \"value\": 2\n }\n ],\n \"maxDataPoints\": 100,\n \"nullPointMode\": \"connected\",\n \"nullText\": null,\n \"postfix\": \"s\",\n \"postfixFontSize\": \"80%\",\n \"prefix\": \"\",\n \"prefixFontSize\": \"80%\",\n \"rangeMaps\": [\n {\n \"from\": \"null\",\n \"text\": \"N\/A\",\n \"to\": \"null\"\n }\n ],\n \"sparkline\": {\n \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n \"full\": false,\n \"lineColor\": \"rgb(31, 120, 193)\",\n \"show\": false\n },\n \"tableColumn\": \"{instance=\\\"192.168.57.3:9090\\\", job=\\\"prometheus\\\"}\",\n \"targets\": [\n {\n \"calculatedInterval\": \"10m\",\n \"datasourceErrors\": {},\n \"errors\": {},\n \"expr\": \"(time() - process_start_time_seconds{job=\\\"prometheus\\\"})\",\n \"format\": \"time_series\",\n \"interval\": \"5m\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"\",\n \"metric\": \"\",\n \"prometheusLink\": \"\/api\/datasources\/proxy\/1\/graph#%5B%7B%22expr%22%3A%22node_time%7Balias%3D%5C%22%24host%5C%22%7D%20-%20node_boot_time%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%2243200s%22%2C%22end_input%22%3A%222015-9-18%2013%3A25%22%2C%22step_input%22%3A%22%22%2C%22tab%22%3A0%7D%5D\",\n \"refId\": \"A\",\n \"step\": 300\n }\n ],\n \"thresholds\": \"300,3600\",\n \"title\": \"System Uptime\",\n \"type\": \"singlestat\",\n \"valueFontSize\": \"80%\",\n \"valueMaps\": [],\n \"valueName\": \"current\"\n },\n {\n \"cacheTimeout\": null,\n \"colorBackground\": false,\n \"colorValue\": false,\n \"colors\": [\n \"rgba(245, 54, 54, 0.9)\",\n \"rgba(237, 129, 40, 0.89)\",\n \"rgba(50, 172, 45, 0.97)\"\n ],\n \"datasource\": \"GitLab Omnibus\",\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"format\": \"none\",\n \"gauge\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"show\": false,\n \"thresholdLabels\": false,\n \"thresholdMarkers\": true\n },\n \"gridPos\": {\n \"h\": 3,\n \"w\": 4,\n \"x\": 6,\n \"y\": 0\n },\n \"height\": \"55px\",\n \"id\": 25,\n \"interval\": null,\n \"links\": [],\n \"mappingType\": 1,\n \"mappingTypes\": [\n {\n \"name\": \"value to text\",\n \"value\": 1\n },\n {\n \"name\": \"range to text\",\n \"value\": 2\n }\n ],\n \"maxDataPoints\": 100,\n \"nullPointMode\": \"connected\",\n \"nullText\": null,\n \"postfix\": \"\",\n \"postfixFontSize\": \"50%\",\n \"prefix\": \"\",\n \"prefixFontSize\": \"80%\",\n \"rangeMaps\": [\n {\n \"from\": \"null\",\n \"text\": \"N\/A\",\n \"to\": \"null\"\n }\n ],\n \"sparkline\": {\n \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n \"full\": false,\n \"lineColor\": \"rgb(31, 120, 193)\",\n \"show\": false\n },\n \"tableColumn\": \"instance:node_cpus:count{instance=\\\"localhost:9100\\\", job=\\\"node\\\"}\",\n \"targets\": [\n {\n \"expr\": \"instance:node_cpus:count{instance=\\\"localhost:9100\\\",job=\\\"node\\\"}\",\n \"format\": \"time_series\",\n \"interval\": \"5m\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"\",\n \"refId\": \"A\",\n \"step\": 300\n }\n ],\n \"thresholds\": \"\",\n \"title\": \"Virtual CPUs\",\n \"type\": \"singlestat\",\n \"valueFontSize\": \"80%\",\n \"valueMaps\": [\n {\n \"op\": \"=\",\n \"text\": \"N\/A\",\n \"value\": \"null\"\n }\n ],\n \"valueName\": \"current\"\n },\n {\n \"cacheTimeout\": null,\n \"colorBackground\": false,\n \"colorValue\": true,\n \"colors\": [\n \"rgba(245, 54, 54, 0.9)\",\n \"rgba(237, 129, 40, 0.89)\",\n \"rgba(50, 172, 45, 0.97)\"\n ],\n \"datasource\": \"GitLab Omnibus\",\n \"decimals\": 2,\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"format\": \"bytes\",\n \"gauge\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"show\": false,\n \"thresholdLabels\": false,\n \"thresholdMarkers\": true\n },\n \"gridPos\": {\n \"h\": 3,\n \"w\": 4,\n \"x\": 10,\n \"y\": 0\n },\n \"height\": \"55px\",\n \"id\": 26,\n \"interval\": null,\n \"links\": [],\n \"mappingType\": 1,\n \"mappingTypes\": [\n {\n \"name\": \"value to text\",\n \"value\": 1\n },\n {\n \"name\": \"range to text\",\n \"value\": 2\n }\n ],\n \"maxDataPoints\": 100,\n \"nullPointMode\": \"connected\",\n \"nullText\": null,\n \"postfix\": \"\",\n \"postfixFontSize\": \"50%\",\n \"prefix\": \"\",\n \"prefixFontSize\": \"80%\",\n \"rangeMaps\": [\n {\n \"from\": \"null\",\n \"text\": \"N\/A\",\n \"to\": \"null\"\n }\n ],\n \"sparkline\": {\n \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n \"full\": false,\n \"lineColor\": \"rgb(31, 120, 193)\",\n \"show\": false\n },\n \"tableColumn\": \"node_memory_MemAvailable_bytes{instance=\\\"localhost:9100\\\", job=\\\"node\\\"}\",\n \"targets\": [\n {\n \"expr\": \"node_memory_MemAvailable_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"}\",\n \"format\": \"time_series\",\n \"interval\": \"\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"\",\n \"metric\": \"node_memory_MemAvailable\",\n \"refId\": \"A\",\n \"step\": 30\n }\n ],\n \"thresholds\": \"\",\n \"title\": \"RAM available\",\n \"type\": \"singlestat\",\n \"valueFontSize\": \"80%\",\n \"valueMaps\": [\n {\n \"op\": \"=\",\n \"text\": \"N\/A\",\n \"value\": \"null\"\n }\n ],\n \"valueName\": \"current\"\n },\n {\n \"cacheTimeout\": null,\n \"colorBackground\": false,\n \"colorValue\": true,\n \"colors\": [\n \"rgba(245, 54, 54, 0.9)\",\n \"rgba(237, 129, 40, 0.89)\",\n \"rgba(50, 172, 45, 0.97)\"\n ],\n \"datasource\": \"GitLab Omnibus\",\n \"decimals\": 2,\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"format\": \"bytes\",\n \"gauge\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"show\": false,\n \"thresholdLabels\": false,\n \"thresholdMarkers\": true\n },\n \"gridPos\": {\n \"h\": 3,\n \"w\": 4,\n \"x\": 14,\n \"y\": 0\n },\n \"height\": \"55px\",\n \"id\": 34,\n \"interval\": null,\n \"links\": [],\n \"mappingType\": 1,\n \"mappingTypes\": [\n {\n \"name\": \"value to text\",\n \"value\": 1\n },\n {\n \"name\": \"range to text\",\n \"value\": 2\n }\n ],\n \"maxDataPoints\": 100,\n \"nullPointMode\": \"connected\",\n \"nullText\": null,\n \"postfix\": \"\",\n \"postfixFontSize\": \"50%\",\n \"prefix\": \"\",\n \"prefixFontSize\": \"80%\",\n \"rangeMaps\": [\n {\n \"from\": \"null\",\n \"text\": \"N\/A\",\n \"to\": \"null\"\n }\n ],\n \"sparkline\": {\n \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n \"full\": false,\n \"lineColor\": \"rgb(31, 120, 193)\",\n \"show\": false\n },\n \"tableColumn\": \"node_memory_MemFree_bytes{instance=\\\"localhost:9100\\\", job=\\\"node\\\"}\",\n \"targets\": [\n {\n \"expr\": \"node_memory_MemFree_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"}\",\n \"format\": \"time_series\",\n \"interval\": \"\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"\",\n \"metric\": \"node_memory_MemAvailable\",\n \"refId\": \"A\",\n \"step\": 30\n }\n ],\n \"thresholds\": \"\",\n \"title\": \"Free RAM\",\n \"type\": \"singlestat\",\n \"valueFontSize\": \"80%\",\n \"valueMaps\": [\n {\n \"op\": \"=\",\n \"text\": \"N\/A\",\n \"value\": \"null\"\n }\n ],\n \"valueName\": \"current\"\n },\n {\n \"cacheTimeout\": null,\n \"colorBackground\": false,\n \"colorValue\": true,\n \"colors\": [\n \"rgba(245, 54, 54, 0.9)\",\n \"rgba(237, 129, 40, 0.89)\",\n \"rgba(50, 172, 45, 0.97)\"\n ],\n \"datasource\": \"GitLab Omnibus\",\n \"decimals\": 0,\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"format\": \"percent\",\n \"gauge\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"show\": false,\n \"thresholdLabels\": false,\n \"thresholdMarkers\": true\n },\n \"gridPos\": {\n \"h\": 3,\n \"w\": 6,\n \"x\": 18,\n \"y\": 0\n },\n \"height\": \"50px\",\n \"id\": 9,\n \"interval\": null,\n \"links\": [],\n \"mappingType\": 1,\n \"mappingTypes\": [\n {\n \"name\": \"value to text\",\n \"value\": 1\n },\n {\n \"name\": \"range to text\",\n \"value\": 2\n }\n ],\n \"maxDataPoints\": 100,\n \"nullPointMode\": \"connected\",\n \"nullText\": null,\n \"postfix\": \"\",\n \"postfixFontSize\": \"50%\",\n \"prefix\": \"\",\n \"prefixFontSize\": \"80%\",\n \"rangeMaps\": [\n {\n \"from\": \"null\",\n \"text\": \"N\/A\",\n \"to\": \"null\"\n }\n ],\n \"sparkline\": {\n \"fillColor\": \"rgba(31, 118, 189, 0.18)\",\n \"full\": true,\n \"lineColor\": \"rgb(31, 120, 193)\",\n \"show\": true\n },\n \"tableColumn\": \"{instance=\\\"localhost:9100\\\", job=\\\"node\\\"}\",\n \"targets\": [\n {\n \"calculatedInterval\": \"10m\",\n \"datasourceErrors\": {},\n \"errors\": {},\n \"expr\": \"(node_memory_MemAvailable_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"} or (node_memory_MemFree_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"} + node_memory_Buffers_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"} + node_memory_Cached_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"})) \/ node_memory_MemTotal_bytes{instance=\\\"localhost:9100\\\",job=\\\"node\\\"} * 100\",\n \"format\": \"time_series\",\n \"interval\": \"5m\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"\",\n \"metric\": \"node_mem\",\n \"prometheusLink\": \"\/api\/datasources\/proxy\/1\/graph#%5B%7B%22expr%22%3A%22(node_memory_MemFree%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Buffers%7Balias%3D%5C%22%24host%5C%22%7D%20%2B%20node_memory_Cached%7Balias%3D%5C%22%24host%5C%22%7D)%20%2F%20node_memory_MemTotal%7Balias%3D%5C%22%24host%5C%22%7D%20*%20100%22%2C%22range_input%22%3A%2243201s%22%2C%22end_input%22%3A%222015-9-15%2013%3A54%22%2C%22step_input%22%3A%22%22%2C%22tab%22%3A0%7D%5D\",\n \"refId\": \"A\",\n \"step\": 300\n }\n ],\n \"thresholds\": \"10,50\",\n \"title\": \"% RAM Available\",\n \"type\": \"singlestat\",\n \"valueFontSize\": \"80%\",\n \"valueMaps\": [],\n \"valueName\": \"current\"\n },\n {\n \"aliasColors\": {},\n \"bars\": false,\n \"dashLength\": 10,\n \"dashes\": false,\n \"datasource\": \"GitLab Omnibus\",\n \"decimals\": 2,\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"fill\": 6,\n \"fillGradient\": 0,\n \"grid\": {},\n \"gridPos\": {\n \"h\": 7,\n \"w\": 24,\n \"x\": 0,\n \"y\": 3\n },\n \"height\": \"260px\",\n \"hiddenSeries\": false,\n \"id\": 2,\n \"legend\": {\n \"alignAsTable\": true,\n \"avg\": true,\n \"current\": false,\n \"hideEmpty\": false,\n \"max\": true,\n \"min\": true,\n \"rightSide\": true,\n \"show\": true,\n \"total\": false,\n \"values\": true\n },\n \"lines\": true,\n \"linewidth\": 2,\n \"links\": [],\n \"nullPointMode\": \"null\",\n \"options\": {\n \"dataLinks\": []\n },\n \"percentage\": false,\n \"pointradius\": 5,\n \"points\": false,\n \"renderer\": \"flot\",\n \"seriesOverrides\": [],\n \"spaceLength\": 10,\n \"stack\": true,\n \"steppedLine\": false,\n \"targets\": [\n {\n \"calculatedInterval\": \"2s\",\n \"datasourceErrors\": {},\n \"errors\": {},\n \"expr\": \"sum(rate(node_cpu_seconds_total{instance='localhost:9100',job='node'}[$interval])) by (mode) * 100 \/ count(node_cpu{instance='localhost:9100',job='node'}) by (mode) or sum(irate(node_cpu_seconds_total{instance='localhost:9100',job='node'}[5m])) by (mode) * 100 \/ count(node_cpu_seconds_total{instance='localhost:9100',job='node'}) by (mode)\",\n \"format\": \"time_series\",\n \"interval\": \"\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"{{ mode }}\",\n \"metric\": \"\",\n \"prometheusLink\": \"\/api\/datasources\/proxy\/1\/graph#%5B%7B%22expr%22%3A%22sum(rate(node_cpu%7Balias%3D%5C%22%24host%5C%22%7D%5B%24interval%5D))%20by%20(mode)%20*%20100%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Atrue%2C%22tab%22%3A0%7D%5D\",\n \"refId\": \"A\",\n \"step\": 2\n }\n ],\n \"thresholds\": [],\n \"timeFrom\": null,\n \"timeRegions\": [],\n \"timeShift\": null,\n \"title\": \"CPU Usage\",\n \"tooltip\": {\n \"msResolution\": false,\n \"shared\": true,\n \"sort\": 0,\n \"value_type\": \"individual\"\n },\n \"type\": \"graph\",\n \"xaxis\": {\n \"buckets\": null,\n \"mode\": \"time\",\n \"name\": null,\n \"show\": true,\n \"values\": []\n },\n \"yaxes\": [\n {\n \"format\": \"percent\",\n \"label\": \"\",\n \"logBase\": 1,\n \"max\": 100,\n \"min\": 0,\n \"show\": true\n },\n {\n \"format\": \"short\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": 0,\n \"show\": true\n }\n ],\n \"yaxis\": {\n \"align\": false,\n \"alignLevel\": null\n }\n },\n {\n \"aliasColors\": {},\n \"bars\": false,\n \"dashLength\": 10,\n \"dashes\": false,\n \"datasource\": \"GitLab Omnibus\",\n \"decimals\": 2,\n \"editable\": true,\n \"error\": false,\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"fill\": 2,\n \"fillGradient\": 0,\n \"grid\": {},\n \"gridPos\": {\n \"h\": 7,\n \"w\": 24,\n \"x\": 0,\n \"y\": 10\n },\n \"hiddenSeries\": false,\n \"id\": 18,\n \"legend\": {\n \"alignAsTable\": true,\n \"avg\": true,\n \"current\": false,\n \"hideEmpty\": false,\n \"max\": true,\n \"min\": true,\n \"rightSide\": true,\n \"show\": true,\n \"sortDesc\": true,\n \"total\": false,\n \"values\": true\n },\n \"lines\": true,\n \"linewidth\": 2,\n \"links\": [],\n \"nullPointMode\": \"null\",\n \"options\": {\n \"dataLinks\": []\n },\n \"percentage\": false,\n \"pointradius\": 5,\n \"points\": false,\n \"renderer\": \"flot\",\n \"seriesOverrides\": [\n {\n \"alias\": \"Load 1m\",\n \"color\": \"#E24D42\"\n },\n {\n \"alias\": \"Load 5m\",\n \"color\": \"#E0752D\"\n },\n {\n \"alias\": \"Load 15m\",\n \"color\": \"#E5AC0E\"\n }\n ],\n \"spaceLength\": 10,\n \"stack\": false,\n \"steppedLine\": false,\n \"targets\": [\n {\n \"calculatedInterval\": \"10s\",\n \"datasourceErrors\": {},\n \"errors\": {},\n \"expr\": \"node_load1{instance='localhost:9100',job='node'}\",\n \"format\": \"time_series\",\n \"interval\": \"\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"Load 1m\",\n \"metric\": \"\",\n \"prometheusLink\": \"\/api\/datasources\/proxy\/1\/graph#%5B%7B%22expr%22%3A%22node_load1%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223601s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D\",\n \"refId\": \"A\",\n \"step\": 2,\n \"target\": \"\"\n },\n {\n \"calculatedInterval\": \"10s\",\n \"datasourceErrors\": {},\n \"errors\": {},\n \"expr\": \"node_load5{instance='localhost:9100',job='node'}\",\n \"format\": \"time_series\",\n \"interval\": \"\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"Load 5m\",\n \"metric\": \"\",\n \"prometheusLink\": \"\/api\/datasources\/proxy\/1\/graph#%5B%7B%22expr%22%3A%22node_load5%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D\",\n \"refId\": \"B\",\n \"step\": 2,\n \"target\": \"\"\n },\n {\n \"calculatedInterval\": \"10s\",\n \"datasourceErrors\": {},\n \"errors\": {},\n \"expr\": \"node_load15{instance='localhost:9100',job='node'}\",\n \"format\": \"time_series\",\n \"interval\": \"\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"Load 15m\",\n \"metric\": \"\",\n \"prometheusLink\": \"\/api\/datasources\/proxy\/1\/graph#%5B%7B%22expr%22%3A%22node_load15%7Balias%3D%5C%22%24host%5C%22%7D%22%2C%22range_input%22%3A%223600s%22%2C%22end_input%22%3A%222015-10-22%2015%3A27%22%2C%22step_input%22%3A%22%22%2C%22stacked%22%3Afalse%2C%22tab%22%3A0%7D%5D\",\n \"refId\": \"C\",\n \"step\": 2,\n \"target\": \"\"\n }\n ],\n \"thresholds\": [],\n \"timeFrom\": null,\n \"timeRegions\": [],\n \"timeShift\": null,\n \"title\": \"Load Average\",\n \"tooltip\": {\n \"msResolution\": false,\n \"shared\": true,\n \"sort\": 0,\n \"value_type\": \"individual\"\n },\n \"type\": \"graph\",\n \"xaxis\": {\n \"buckets\": null,\n \"mode\": \"time\",\n \"name\": null,\n \"show\": true,\n \"values\": []\n },\n \"yaxes\": [\n {\n \"format\": \"none\",\n \"label\": \"\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": 0,\n \"show\": true\n },\n {\n \"format\": \"none\",\n \"logBase\": 1,\n \"max\": null,\n \"min\": 0,\n \"show\": true\n }\n ],\n \"yaxis\": {\n \"align\": false,\n \"alignLevel\": null\n }\n },\n {\n \"aliasColors\": {},\n \"bars\": false,\n \"dashLength\": 10,\n \"dashes\": false,\n \"datasource\": \"GitLab Omnibus\",\n \"fieldConfig\": {\n \"defaults\": {\n \"custom\": {}\n },\n \"overrides\": []\n },\n \"fill\": 4,\n \"fillGradient\": 0,\n \"gridPos\": {\n \"h\": 8,\n \"w\": 12,\n \"x\": 0,\n \"y\": 17\n },\n \"hiddenSeries\": false,\n \"id\": 33,\n \"legend\": {\n \"alignAsTable\": true,\n \"avg\": true,\n \"current\": false,\n \"max\": true,\n \"min\": true,\n \"show\": true,\n \"total\": false,\n \"values\": true\n },\n \"lines\": true,\n \"linewidth\": 2,\n \"links\": [],\n \"nullPointMode\": \"null\",\n \"options\": {\n \"dataLinks\": []\n },\n \"percentage\": false,\n \"pointradius\": 5,\n \"points\": false,\n \"renderer\": \"flot\",\n \"seriesOverrides\": [],\n \"spaceLength\": 10,\n \"stack\": true,\n \"steppedLine\": false,\n \"targets\": [\n {\n \"alias\": \"\",\n \"expr\": \"node_memory_MemTotal_bytes{job='node',instance='localhost:9100'}\",\n \"format\": \"time_series\",\n \"intervalFactor\": 1,\n \"legendFormat\": \"Total\",\n \"rawSql\": \"SELECT\\n UNIX_TIMESTAMP(