{"id":23976,"date":"2023-03-27T14:10:23","date_gmt":"2023-03-27T12:10:23","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=23976"},"modified":"2023-03-27T14:10:23","modified_gmt":"2023-03-27T12:10:23","slug":"nginx-monitoring-in-prometheus","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/","title":{"rendered":"Nginx Monitoring in Prometheus"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Following my two previous blogs about monitoring, I will now focus on Nginx. Nginx Inc provides an exporter with it&#8217;s code: <a href=\"https:\/\/github.com\/nginxinc\/nginx-prometheus-exporter\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/nginxinc\/nginx-prometheus-exporter<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As Nginx cannot run a web application as <a href=\"https:\/\/www.dbi-services.com\/blog\/weblogic-monitoring-in-prometheus\/\" target=\"_blank\" rel=\"noreferrer noopener\">WebLogic<\/a> or <a href=\"https:\/\/www.dbi-services.com\/blog\/wildfly-monitoring-in-prometheus\/\" target=\"_blank\" rel=\"noreferrer noopener\">WildFly<\/a> can, exporter will be another process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Nginx Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To enable metrics for Nginx, we must use <code>stub_status<\/code> directive in a <code>server<\/code> or <code>location<\/code> context of the configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before that, we must check that stub module is enabled. A simple command will do:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; notranslate\">\nnginx -V 2&gt;&amp;1 | grep --color &quot;with-http_stub_status_module&quot;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Then, we must extend the existing configuration to enable stub module by adding following lines inside a server context:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nlocation \/nginx_status {\n           stub_status on;\n           allow 127.0.0.1;\n           deny all;\n       }\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">To validate configuration, we can run following command to reload configuration:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; notranslate\">\nnginx -s reload\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">A curl command (<code>curl https:\/\/localhost:443\/nginx_status<\/code>) will check that metrics are populated:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nActive connections: 1\nserver accepts handled requests\n 14 14 14\nReading: 0 Writing: 1 Waiting: 0\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As the format is not Prometheus compliant, we need the exporter to do the reformatting for us.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Nginx Exporter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We could run exporter as a binary or as a container. I am choosing the second option.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; notranslate\">\ndocker run\\\n -p 9113:9113\\\n -e SSL_VERIFY=false\\\n nginx\/nginx-prometheus-exporter\\\n -nginx.scrape-uri=https:\/\/192.168.33.10:443\/nginx_status\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Here is a quick explanation of the parameters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Line 2 is the port exposed to get metrics.<\/li>\n\n\n\n<li>Line 3 is to disable SSL verification as my certificate is not signed by a certification authority.<\/li>\n\n\n\n<li>Line 4 is the image name.<\/li>\n\n\n\n<li>Line 5 is the stub URL.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Output of docker command looks like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\nNGINX Prometheus Exporter version=0.11.0 commit=e4a6810d4f0b776f7fde37fea1d84e4c7284b72a date=2022-09-07T21:09:51Z, dirty=false, arch=linux\/amd64, go=go1.19\n2023\/03\/27 10:41:11 Starting...\n2023\/03\/27 10:41:11 Listening on :9113\n2023\/03\/27 10:41:11 NGINX Prometheus Exporter has successfully started\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Further, I can also test the URL where metrics are now properly formatted for Prometheus ingestion (i.e. http:\/\/localhost:9113\/metrics):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; notranslate\">\n# HELP nginx_connections_accepted Accepted client connections\n# TYPE nginx_connections_accepted counter\nnginx_connections_accepted 27\n# HELP nginx_connections_active Active client connections\n# TYPE nginx_connections_active gauge\nnginx_connections_active 2\n# HELP nginx_connections_handled Handled client connections\n# TYPE nginx_connections_handled counter\nnginx_connections_handled 27\n# HELP nginx_connections_reading Connections where NGINX is reading the request header\n# TYPE nginx_connections_reading gauge\nnginx_connections_reading 0\n# HELP nginx_connections_waiting Idle client connections\n# TYPE nginx_connections_waiting gauge\nnginx_connections_waiting 1\n...\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Prometheus Integration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In <code>scrape_configs<\/code> section, I am adding the following job:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; notranslate\">\n  - job_name: &quot;Nginx&quot;\n    metrics_path: \/metrics\n    static_configs:\n    - targets: &#x5B;&#039;172.17.0.1:9113&#039;]\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">After a reload of the configuration, I check if the Target State is up:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_32_15-Prometheus-Time-Series-Collection-and-Processing-Server-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-23988\" width=\"700\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_32_15-Prometheus-Time-Series-Collection-and-Processing-Server-\u2014-Mozilla-Firefox.png 920w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_32_15-Prometheus-Time-Series-Collection-and-Processing-Server-\u2014-Mozilla-Firefox-300x81.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_32_15-Prometheus-Time-Series-Collection-and-Processing-Server-\u2014-Mozilla-Firefox-768x206.png 768w\" sizes=\"(max-width: 920px) 100vw, 920px\" \/><figcaption class=\"wp-element-caption\">Prometheus Targets<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Grafana<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I will use the dashboard provided in the github repository (grafana\/dashboard.json) and point it to Prometheus datasource:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"547\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_38_20-Import-dashboard-Browse-Dashboards-Grafana-\u2014-Mozilla-Firefox.png\" alt=\"\" class=\"wp-image-23990\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_38_20-Import-dashboard-Browse-Dashboards-Grafana-\u2014-Mozilla-Firefox.png 635w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_38_20-Import-dashboard-Browse-Dashboards-Grafana-\u2014-Mozilla-Firefox-300x258.png 300w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><figcaption class=\"wp-element-caption\">Grafana Dashboard Import<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Result looks simple but nice:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"367\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png\" alt=\"\" class=\"wp-image-23993\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png 800w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17--300x138.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17--768x352.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">Nginx Dashboard<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx Plus provides much more metrics as documented <a href=\"https:\/\/github.com\/nginxinc\/nginx-prometheus-exporter#metrics-for-nginx-plus\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following my two previous blogs about monitoring, I will now focus on Nginx. Nginx Inc provides an exporter with it&#8217;s code: https:\/\/github.com\/nginxinc\/nginx-prometheus-exporter As Nginx cannot run a web application as WebLogic or WildFly can, exporter will be another process. Nginx Configuration To enable metrics for Nginx, we must use stub_status directive in a server or&hellip;&nbsp;<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4134],"tags":[2257,143,2704,2234],"class_list":["post-23976","post","type-post","status-publish","format-standard","category-application-server","tag-grafana","tag-monitoring","tag-nginx","tag-prometheus"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Nginx Monitoring in Prometheus - dbi services Blog<\/title>\n<meta name=\"description\" content=\"Setup nginx exporter to monitor it in Prometheus\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nginx Monitoring in Prometheus\" \/>\n<meta property=\"og:description\" content=\"Setup nginx exporter to monitor it in Prometheus\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-27T12:10:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\"},\"headline\":\"Nginx Monitoring in Prometheus\",\"datePublished\":\"2023-03-27T12:10:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/\"},\"wordCount\":291,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/2023-03-27-13_45_17-.png\",\"keywords\":[\"Grafana\",\"Monitoring\",\"Nginx\",\"Prometheus\"],\"articleSection\":[\"Application Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/\",\"name\":\"Nginx Monitoring in Prometheus - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/2023-03-27-13_45_17-.png\",\"datePublished\":\"2023-03-27T12:10:23+00:00\",\"description\":\"Setup nginx exporter to monitor it in Prometheus\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/2023-03-27-13_45_17-.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/2023-03-27-13_45_17-.png\",\"width\":800,\"height\":367},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/nginx-monitoring-in-prometheus\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Nginx Monitoring in Prometheus\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8a0bfec3c3bd1f27d3d452eaa592bfb8\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"description\":\"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/middleware-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Nginx Monitoring in Prometheus - dbi services Blog","description":"Setup nginx exporter to monitor it in Prometheus","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/","og_locale":"en_US","og_type":"article","og_title":"Nginx Monitoring in Prometheus","og_description":"Setup nginx exporter to monitor it in Prometheus","og_url":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2023-03-27T12:10:23+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png","type":"","width":"","height":""}],"author":"Middleware Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8"},"headline":"Nginx Monitoring in Prometheus","datePublished":"2023-03-27T12:10:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/"},"wordCount":291,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png","keywords":["Grafana","Monitoring","Nginx","Prometheus"],"articleSection":["Application Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/","url":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/","name":"Nginx Monitoring in Prometheus - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png","datePublished":"2023-03-27T12:10:23+00:00","description":"Setup nginx exporter to monitor it in Prometheus","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-27-13_45_17-.png","width":800,"height":367},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/nginx-monitoring-in-prometheus\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Nginx Monitoring in Prometheus"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8a0bfec3c3bd1f27d3d452eaa592bfb8","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"description":"Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.","url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/23976","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=23976"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/23976\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=23976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=23976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=23976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}