{"id":41528,"date":"2026-02-26T10:35:33","date_gmt":"2026-02-26T09:35:33","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=41528"},"modified":"2026-02-26T10:35:33","modified_gmt":"2026-02-26T09:35:33","slug":"monitoring-postgresql-on-windows-with-pghero-and-docker","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/","title":{"rendered":"Monitoring PostgreSQL on Windows with PgHero and Docker"},"content":{"rendered":"<p>I know, I know, PostgreSQL usually feels more at home on Linux. But guess what? PgHero works just fine on Windows too, and I gave it a try myself. If you\u2019re running PostgreSQL in a Docker container, this setup is surprisingly easily, and it gives you a great performance dashboard without touching your base system.<\/p>\n<p>In this post, I\u2019ll show you how I set it up with Docker Compose, including running PgHero itself in a container. The goal: a fully contained stack that\u2019s easy to spin up, monitor, and tear down anytime.<\/p>\n<h2>What you need<\/h2>\n<ul>\n<li>Docker Desktop installed on Windows (I recommend using WSL2 for smooth volume mounting).<\/li>\n<li>A PostgreSQL database running in Docker. We\u2019ll build the stack together if you don\u2019t have one yet. In my case, I decided to install PgHero when I was following one of the NestJs course, and used my existing stack.<\/li>\n<li>Basic familiarity with Docker Compose and command-line.<\/li>\n<\/ul>\n<p>Optionally, you can create a folder on your PC to store database files, so your data sticks around even if the container stops. I will use a volume in this blog, to easily edit my PostgreSQL configuration.<\/p>\n<h2>Step 1: Your Docker Compose setup<\/h2>\n<p>Here\u2019s a minimal Compose file for PostgreSQL, Redis, and PgHero. Save it somewhere on your machine, like <code>C:\\docker\\pghero-setup\\docker-compose.yml<\/code>:<\/p>\n<pre><code class=\"language-yaml\">version: \"3\"\nservices:\n  db:\n    image: postgres\n    restart: always\n    ports:\n      - \"5438:5432\"\n    environment:\n      POSTGRES_PASSWORD: pass123\n      POSTGRES_USER: postgres\n      POSTGRES_DB: postgres\n    volumes:\n      - \"C:\/Users\/frj\/Documents\/Training\/Nestjs\/auth-extension\/docker\/postgres-data:\/var\/lib\/postgresql\/data\"\n\n  redis:\n    image: redis\n    ports:\n      - \"6379:6379\"\n    restart: always\n\n  pghero:\n    image: ankane\/pghero\n    depends_on:\n      - db\n    ports:\n      - \"8080:8080\"\n    environment:<br \/>      DATABASE_URL: postgres:\/\/postgres:pass123@db:5432\/postgres\n      PGHERO_USERNAME: admin\n      PGHERO_PASSWORD: secret\n    restart: always<\/code><\/pre>\n<p><strong>Why this works:<\/strong><\/p>\n<ul>\n<li><code>db<\/code> is your PostgreSQL service. The bind mount points to a folder on your PC, so your data survives container restarts.<\/li>\n<li>The <code>command<\/code> lines ensure PostgreSQL loads <code>pg_stat_statements<\/code>, which PgHero uses to track queries.<\/li>\n<li><code>pghero<\/code> runs in its own container and exposes port 8080 for the dashboard.<\/li>\n<li><code>depends_on: db<\/code> ensures PgHero waits for PostgreSQL to start.<\/li>\n<\/ul>\n<h2>Step 2: Monitoring multiple databases<\/h2>\n<p>To be able to track more than one database, we create a <code>pghero.yml<\/code> file instead of using the <span style=\"color: initial\">DATABASE_URL environment variable. Create the file in the same directory as docker-compose.yml:<\/span><\/p>\n<pre><code class=\"language-yaml\">databases:\n  primary:\n    url: postgres:\/\/postgres:pass123@db:5432\/postgres\n  analytics:\n    url: postgres:\/\/postgres:pass123@db:5432\/analytics<\/code><\/pre>\n<p>Then update <code>docker-compose.yml<\/code> for PgHero:<\/p>\n<pre><code class=\"language-yaml\">  pghero:\n    image: ankane\/pghero\n    depends_on:\n      - db\n    ports:\n      - \"8080:8080\"\n    environment:\n      PGHERO_USERNAME: admin\n      PGHERO_PASSWORD: secret\n    volumes:\n      - \".\/pghero.yml:\/app\/config\/pghero.yml:ro\"\n    restart: always<\/code><\/pre>\n<p>PgHero will now show a dropdown to switch between databases in the UI.<\/p>\n<h2>Step 3: Start everything<\/h2>\n<p>In the folder with your <code>docker-compose.yml<\/code>:<\/p>\n<pre><code>docker-compose down  # stop any previous run\ndocker-compose up -d<\/code><\/pre>\n<p>After a few seconds, open your browser at <a href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a>. Log in with the username and password you set (<code>admin<\/code> \/ <code>secret<\/code>). You should see the PgHero dashboard connected to your database.<\/p>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"557\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4-1024x557.png\" alt=\"\" class=\"wp-image-41544\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4-1024x557.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4-300x163.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4-768x418.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4.png 1027w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Enable query tracking<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After starting PostgreSQL, connect to it and enable the <code>pg_stat_statements<\/code> extension. Inside your container, run:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndocker exec -it &lt;db_container&gt; psql -U postgres -d postgres\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Then in <code>psql<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nCREATE EXTENSION IF NOT EXISTS pg_stat_statements;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">This makes sure PgHero can track queries, see long-running statements, and show useful stats. Note that you have to do it for each database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1014\" height=\"595\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-5.png\" alt=\"\" class=\"wp-image-41547\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-5.png 1014w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-5-300x176.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-5-768x451.png 768w\" sizes=\"auto, (max-width: 1014px) 100vw, 1014px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Windows-specific tips<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use forward slashes (<code>C:\/path\/to\/folder<\/code>) for volume paths in Compose.<\/li>\n\n\n\n<li>Make sure the folder exists before starting PostgreSQL.<\/li>\n\n\n\n<li>Check your <code>pg_hba.conf<\/code> if you see connection errors \u2014 Docker containers have their own internal IPs, and PostgreSQL needs to allow connections from them.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Common troubleshooting<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>500 Internal Server Error \/ cannot connect:<\/strong> Usually a problem with <code>pg_hba.conf<\/code>. Make sure your Docker network is allowed.<\/li>\n\n\n\n<li><strong>No stats showing:<\/strong> Ensure <code>pg_stat_statements<\/code> is loaded and the extension is created.<\/li>\n\n\n\n<li><strong>Dashboard not reachable:<\/strong> Check Docker mapped ports, firewall, and container logs (<code>docker logs &lt;container-id&gt;<\/code>).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">And that\u2019s it! You now have a Windows-based Docker setup with PostgreSQL and PgHero. You can see your query stats, monitor performance, and even track multiple databases from the same dashboard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I know, I know, PostgreSQL usually feels more at home on Linux. But guess what? PgHero works just fine on Windows too, and I gave it a try myself. If you\u2019re running PostgreSQL in a Docker container, this setup is surprisingly easily, and it gives you a great performance dashboard without touching your base system.&hellip;&nbsp;<\/p>\n","protected":false},"author":87,"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":[4133],"tags":[549],"class_list":["post-41528","post","type-post","status-publish","format-standard","category-database","tag-windows"],"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>Monitoring PostgreSQL on Windows with PgHero and Docker - dbi services Blog<\/title>\n<meta name=\"description\" content=\"Learn how to set up PostgreSQL monitoring on Windows using PgHero and Docker Compose. This step-by-step guide covers container configuration, enabling pg_stat_statements, and managing multiple databases from a single dashboard.\" \/>\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\/monitoring-postgresql-on-windows-with-pghero-and-docker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Monitoring PostgreSQL on Windows with PgHero and Docker\" \/>\n<meta property=\"og:description\" content=\"Learn how to set up PostgreSQL monitoring on Windows using PgHero and Docker Compose. This step-by-step guide covers container configuration, enabling pg_stat_statements, and managing multiple databases from a single dashboard.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/\" \/>\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=\"2026-02-26T09:35:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1027\" \/>\n\t<meta property=\"og:image:height\" content=\"559\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joan Frey\" \/>\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=\"Joan Frey\" \/>\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\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/\"},\"author\":{\"name\":\"Joan Frey\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/565fa40326c9a1329bcf424186e01a04\"},\"headline\":\"Monitoring PostgreSQL on Windows with PgHero and Docker\",\"datePublished\":\"2026-02-26T09:35:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/\"},\"wordCount\":527,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/image-4-1024x557.png\",\"keywords\":[\"Windows\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/\",\"name\":\"Monitoring PostgreSQL on Windows with PgHero and Docker - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/image-4-1024x557.png\",\"datePublished\":\"2026-02-26T09:35:33+00:00\",\"description\":\"Learn how to set up PostgreSQL monitoring on Windows using PgHero and Docker Compose. This step-by-step guide covers container configuration, enabling pg_stat_statements, and managing multiple databases from a single dashboard.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/image-4.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/image-4.png\",\"width\":1027,\"height\":559},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/monitoring-postgresql-on-windows-with-pghero-and-docker\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitoring PostgreSQL on Windows with PgHero and Docker\"}]},{\"@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\\\/565fa40326c9a1329bcf424186e01a04\",\"name\":\"Joan Frey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/FRJ_web-min-scaled.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/FRJ_web-min-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/FRJ_web-min-scaled.jpg\",\"caption\":\"Joan Frey\"},\"description\":\"Joan Frey has more than 8 years of experience in the IT sector, including 5 years as a database and Linux consultant. He is specialized in PostgreSQL high availability (Patroni, etcd, HAProxy, Keepalived) and also manages MariaDB and MySQL environments. His knowledge includes Linux (RHEL, SLES), Windows Server, backup and restore strategies (pgBackRest, mariabackup), Ansible automation, as well as development in Python, Go, TypeScript and SQL. Since 2021, he has been working at dbi services, where he installs, supports and documents database infrastructures for customers, often under SLA contracts, and coaches their internal teams. He also contributes to internal tools such as DMK (Database Management Kit), the Resource Planning ERP and the Yak cloud tool. Before joining dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement (France) in Strasbourg. His branch related experience includes banking, fintech, payment services, telecommunications, aviation, watchmaking, public administration, energy, insurance, pharmaceuticals and public transport.\",\"sameAs\":[\"ree years of experience in the IT sector, specializing in C and C# development, with additional knowledge of Linux and SQL. Prior to dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement in Strasbourg and an IT Help Desk intern at EuroAirport. He holds a computer engineering degree specializing in information systems from the University of Technology of Belfort-Montb\u00e9liard (UTBM). His industry experience includes banking and aviation.\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/joan-frey\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Monitoring PostgreSQL on Windows with PgHero and Docker - dbi services Blog","description":"Learn how to set up PostgreSQL monitoring on Windows using PgHero and Docker Compose. This step-by-step guide covers container configuration, enabling pg_stat_statements, and managing multiple databases from a single dashboard.","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\/monitoring-postgresql-on-windows-with-pghero-and-docker\/","og_locale":"en_US","og_type":"article","og_title":"Monitoring PostgreSQL on Windows with PgHero and Docker","og_description":"Learn how to set up PostgreSQL monitoring on Windows using PgHero and Docker Compose. This step-by-step guide covers container configuration, enabling pg_stat_statements, and managing multiple databases from a single dashboard.","og_url":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2026-02-26T09:35:33+00:00","og_image":[{"width":1027,"height":559,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4.png","type":"image\/png"}],"author":"Joan Frey","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Joan Frey","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/"},"author":{"name":"Joan Frey","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/565fa40326c9a1329bcf424186e01a04"},"headline":"Monitoring PostgreSQL on Windows with PgHero and Docker","datePublished":"2026-02-26T09:35:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/"},"wordCount":527,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4-1024x557.png","keywords":["Windows"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/","url":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/","name":"Monitoring PostgreSQL on Windows with PgHero and Docker - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4-1024x557.png","datePublished":"2026-02-26T09:35:33+00:00","description":"Learn how to set up PostgreSQL monitoring on Windows using PgHero and Docker Compose. This step-by-step guide covers container configuration, enabling pg_stat_statements, and managing multiple databases from a single dashboard.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2025\/11\/image-4.png","width":1027,"height":559},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/monitoring-postgresql-on-windows-with-pghero-and-docker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Monitoring PostgreSQL on Windows with PgHero and Docker"}]},{"@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\/565fa40326c9a1329bcf424186e01a04","name":"Joan Frey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/FRJ_web-min-scaled.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/FRJ_web-min-scaled.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/FRJ_web-min-scaled.jpg","caption":"Joan Frey"},"description":"Joan Frey has more than 8 years of experience in the IT sector, including 5 years as a database and Linux consultant. He is specialized in PostgreSQL high availability (Patroni, etcd, HAProxy, Keepalived) and also manages MariaDB and MySQL environments. His knowledge includes Linux (RHEL, SLES), Windows Server, backup and restore strategies (pgBackRest, mariabackup), Ansible automation, as well as development in Python, Go, TypeScript and SQL. Since 2021, he has been working at dbi services, where he installs, supports and documents database infrastructures for customers, often under SLA contracts, and coaches their internal teams. He also contributes to internal tools such as DMK (Database Management Kit), the Resource Planning ERP and the Yak cloud tool. Before joining dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement (France) in Strasbourg. His branch related experience includes banking, fintech, payment services, telecommunications, aviation, watchmaking, public administration, energy, insurance, pharmaceuticals and public transport.","sameAs":["ree years of experience in the IT sector, specializing in C and C# development, with additional knowledge of Linux and SQL. Prior to dbi services, he was an Analyst Developer Intern at Euro Information D\u00e9veloppement in Strasbourg and an IT Help Desk intern at EuroAirport. He holds a computer engineering degree specializing in information systems from the University of Technology of Belfort-Montb\u00e9liard (UTBM). His industry experience includes banking and aviation."],"url":"https:\/\/www.dbi-services.com\/blog\/author\/joan-frey\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/41528","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\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=41528"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/41528\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=41528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=41528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=41528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}