{"id":8317,"date":"2022-04-05T13:21:17","date_gmt":"2022-04-05T06:21:17","guid":{"rendered":"http:\/\/dung.nguyen"},"modified":"2024-07-26T15:31:06","modified_gmt":"2024-07-26T08:31:06","slug":"monitoring-system-for-windows-servers-by-implementing-prometheus-grafana","status":"publish","type":"post","link":"https:\/\/nois.vn\/vi\/monitoring-system-for-windows-servers-by-implementing-prometheus-grafana\/","title":{"rendered":"How to Set Up a Monitoring System for Windows Servers by Implementing Prometheus &amp; Grafana"},"content":{"rendered":"\n<p>One day, my boss tasked me with a straightforward request: &#8220;Help me set up a monitoring system to track and monitor the system, assess its stability, and provide early warnings in case of any issues.&#8221; Upon receiving this request, I immediately thought of several tools currently available, such as Kibana and Nagios. However, during the solution-building process, a colleague suggested Grafana. After researching, I found Grafana to be a suitable fit for my requirements and began exploring solutions to apply it.&nbsp;<\/p>\n\n\n\n<p>In this article, we will focus on the following issues:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What is a monitoring system?&nbsp;<\/li>\n\n\n\n<li>Why do we need a monitoring system?&nbsp;<\/li>\n\n\n\n<li>Characteristics of a monitoring system&nbsp;<\/li>\n\n\n\n<li>Grafana &amp; Prometheus&nbsp;<\/li>\n\n\n\n<li>Creating a simple dashboard from Grafana and Prometheus&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What is a monitoring system?&nbsp;<\/h2>\n\n\n\n<p>A monitoring system is a software or hardware component capable of continuously tracking and recording the states and operations of a system.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why do we need a monitoring system?&nbsp;<\/h2>\n\n\n\n<p>In the past, administrators\/developers would only intervene when a system encountered errors. This led to numerous risks in troubleshooting or involved using only a few small tools that could not provide a comprehensive view, resulting in a waste of time and money.&nbsp;<\/p>\n\n\n\n<p>A monitoring system is a suitable solution, helping administrators\/developers easily track and assess the system comprehensively (analyzing CPU, RAM, disk, etc.), thereby building a stable system and quickly responding to any occurring incidents. Additionally, the centralized management feature of monitoring systems ensures that you will receive immediate notifications in case of any issues, helping you resolve them quickly, saving time, and providing peace of mind for the system.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prometheus &amp; Grafana Overview<\/h2>\n\n\n\n<p><strong>Prometheus<\/strong> and <strong>Grafana<\/strong> are two widely used software tools in monitoring systems, addressing essential needs such as data collection, stability assessment, and early warning when one or more system targets encounter issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Prometheus<\/h3>\n\n\n\n<p>Originally developed at SoundCloud, Prometheus is an open-source system monitoring and alerting tool. In 2012, many companies and organizations supported Prometheus, leading to significant project growth and a large user base. Today, it&#8217;s no longer an independent project but is developed by numerous companies and utilizes Google&#8217;s GoLang source code. Prometheus is fully open-source and licensed under the Apache 2 License on GitHub.<\/p>\n\n\n\n<p>Prometheus employs a powerful query language to pull metrics from nodes and then transfers data to Grafana for web-based visualization.<\/p>\n\n\n\n<p>Prometheus includes a built-in exporter that outputs metrics about the Prometheus service to the URL: http:\/\/localhost:9090\/metrics. However, to obtain other metrics, Prometheus relies on third-party exporters or those developed by individual contributors.<\/p>\n\n\n\n<p>Reactive problem-solving using small tools can lead to significant risks and a lack of comprehensive system oversight, resulting in time and cost inefficiencies.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"917\" height=\"657\" src=\"\/wp-content\/uploads\/2021\/09\/1-1.png\" alt=\"\" class=\"wp-image-8321\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/1-1.png 917w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/1-1-300x215.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/1-1-768x550.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/1-1-18x12.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/1-1-720x516.png 720w\" sizes=\"(max-width: 917px) 100vw, 917px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Grafana<\/h3>\n\n\n\n<p>Grafana is a Container Monitoring Software solution offering a feature set and cost that is well-suited for both small and medium-sized enterprises (SMEs) as well as larger corporations. Grafana is highly regarded by both users and experts in the DevOps Software field.<\/p>\n\n\n\n<p>Grafana focuses on time-series data. You can visualize data or create alerts from existing data sources. In addition to Prometheus, Grafana can also utilize various other databases including Elasticsearch, InfluxDB, OpenTSDB, Graphite, and more.<\/p>\n\n\n\n<p>Grafana is known for its built-in support for authentication and access control. You can also connect your Grafana instance to an external Lightweight Directory Access Protocol (LDAP) server or SQL server for better access control in enterprise settings.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"960\" height=\"771\" src=\"\/wp-content\/uploads\/2021\/09\/2.png\" alt=\"\" class=\"wp-image-8322\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/2.png 960w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/2-300x241.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/2-768x617.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/2-15x12.png 15w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/2-720x578.png 720w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>Key features of Grafana:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Visualize:<\/strong> Create various visualizations such as tables, charts, and gauges.<\/li>\n\n\n\n<li><strong>Alert:<\/strong> Set up alerts and notifications through email, Microsoft Teams, Slack, Telegram, and more.<\/li>\n\n\n\n<li><strong>Unify:<\/strong> Integrate with multiple data sources like Prometheus, InfluxDB, ElasticSearch, and Graphite.<\/li>\n\n\n\n<li><strong>Open:<\/strong> Open-source, compatible with various operating systems, and available as a Docker image.<\/li>\n\n\n\n<li><strong>Extend:<\/strong> Offers a wide range of plugins, dashboard templates, and easy integration with other platforms.<\/li>\n\n\n\n<li><strong>Collaborate:<\/strong> Facilitates teamwork and collaboration.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a simple Dashboard with Grafana and Prometheus<\/h2>\n\n\n\n<p>In this section, we will create a basic dashboard to monitor a Windows server using Grafana and Prometheus.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"700\" height=\"267\" src=\"\/wp-content\/uploads\/2021\/09\/3.png\" alt=\"\" class=\"wp-image-8323\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/3.png 700w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/3-300x114.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/3-18x7.png 18w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Set up Prometheus<\/h3>\n\n\n\n<p>You can use Prometheus via Docker or a pre-compiled binary file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"643\" src=\"\/wp-content\/uploads\/2021\/09\/4-1024x643.png\" alt=\"\" class=\"wp-image-8324\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/4-1024x643.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/4-300x188.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/4-768x482.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/4-18x12.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/4-720x452.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/4.png 1137w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We will use the pre-compiled binary file for Windows. After downloading and extracting, it will look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"192\" src=\"\/wp-content\/uploads\/2021\/09\/5.png\" alt=\"\" class=\"wp-image-8325\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/5.png 636w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/5-300x91.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/5-18x5.png 18w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/figure>\n\n\n\n<p>\u0110\u1ec3 s\u1eed d\u1ee5ng Prometheus, ch\u00fang ta m\u1edf file\u00a0<strong>prometheus.exe<\/strong>\u00a0\u1edf th\u1eed m\u1ee5c g\u1ed1c v\u00e0 truy c\u1eadp \u0111\u01b0\u1eddng d\u1eabn <a href=\"http:\/\/localhost:9090\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:9090\/<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"512\" src=\"\/wp-content\/uploads\/2021\/09\/6.png\" alt=\"\" class=\"wp-image-8326\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/6.png 979w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/6-300x157.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/6-768x402.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/6-18x9.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/6-720x377.png 720w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Installing Grafana<\/h3>\n\n\n\n<p>Similar to Prometheus, there are multiple ways to install Grafana.<\/p>\n\n\n\n<p>In this case, we will install it through Windows: https:\/\/grafana.com\/grafana\/download<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"652\" src=\"\/wp-content\/uploads\/2021\/09\/8-1024x652.png\" alt=\"\" class=\"wp-image-8328\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8-1024x652.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8-300x191.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8-768x489.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8-18x12.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8-720x459.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8.png 1237w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After downloading the installation file, please follow the instructions to install it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"387\" src=\"\/wp-content\/uploads\/2021\/09\/9.png\" alt=\"\" class=\"wp-image-8330\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/9.png 495w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/9-300x235.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/9-15x12.png 15w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/figure>\n\n\n\n<p>After installation, you can access the application at: http:\/\/localhost:3000\/<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"\/wp-content\/uploads\/2021\/09\/10-1024x555.png\" alt=\"\" class=\"wp-image-8331\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10-1024x555.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10-300x163.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10-768x416.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10-1536x832.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10-18x10.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10-720x390.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/10.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Connecting Grafana to Prometheus<\/h3>\n\n\n\n<p>Grafana supports multiple data sources, so to integrate data from Prometheus, you&#8217;ll need to add a new data source. To do this, navigate to: http:\/\/localhost:3000\/datasources\/new (Configuration -> Data Source -> Add data source).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"\/wp-content\/uploads\/2021\/09\/11-1024x555.png\" alt=\"\" class=\"wp-image-8332\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11-1024x555.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11-300x163.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11-768x416.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11-1536x832.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11-18x10.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11-720x390.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/11.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then select Prometheus, fill in the configuration information (URL), and save.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"\/wp-content\/uploads\/2021\/09\/12-1024x555.png\" alt=\"\" class=\"wp-image-8333\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12-1024x555.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12-300x163.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12-768x416.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12-1536x832.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12-18x10.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12-720x390.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/12.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Monitoring Windows Server<\/h3>\n\n\n\n<p>To monitor Windows Server, we need to utilize a third-party tool: windows_exporter (wmi_exporter) to enable Prometheus to collect metrics. For more details, please refer to:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/prometheus-community\/windows_exporter\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/prometheus-community\/windows_exporter<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"856\" height=\"818\" src=\"\/wp-content\/uploads\/2021\/09\/13.png\" alt=\"\" class=\"wp-image-8334\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/13.png 856w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/13-300x287.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/13-768x734.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/13-13x12.png 13w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/13-720x688.png 720w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/figure>\n\n\n\n<p><strong>Step 1: Download the latest version of wmi_exporter from:<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/prometheus-community\/windows_exporter\/releases\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/prometheus-community\/windows_exporter\/releases<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1001\" height=\"258\" src=\"\/wp-content\/uploads\/2021\/09\/14.png\" alt=\"\" class=\"wp-image-8335\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/14.png 1001w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/14-300x77.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/14-768x198.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/14-18x5.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/14-720x186.png 720w\" sizes=\"(max-width: 1001px) 100vw, 1001px\" \/><\/figure>\n\n\n\n<p>There are 2 versions of wmi_exporter:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>wmi_exporter.exe:<\/strong> Used to run and utilize default configurations.<\/li>\n\n\n\n<li><strong>wmi_exporter.msi:<\/strong> Installs via cmd\/psh and uses advanced configurations.<\/li>\n<\/ul>\n\n\n\n<p>We will install via CMD. After downloading, open CMD and run the following command:<\/p>\n\n\n\n<p><code>msiexec \/i windows_exporter-0.16.0-amd64.msi ENABLED_COLLECTORS=\"ad,adfs,cache,cpu,cpu_info,cs,container,dfsr,dhcp,dns,fsrmquota,iis,logical_disk,logon,memory,msmq,mssql,netframework_clrexceptions,netframework_clrinterop,netframework_clrjit,netframework_clrloading,netframework_clrlocksandthreads,netframework_clrmemory,netframework_clrremoting,netframework_clrsecurity,net,os,process,remote_fx,service,tcp,time,vmware\" TEXTFILE_DIR=\"C:\\custom_metrics\"<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"512\" src=\"\/wp-content\/uploads\/2021\/09\/15.png\" alt=\"\" class=\"wp-image-8336\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/15.png 979w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/15-300x157.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/15-768x402.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/15-18x9.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/15-720x377.png 720w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<p>After installation, there will be a service called &#8216;windows_exporter&#8217; running in the Services.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"154\" src=\"\/wp-content\/uploads\/2021\/09\/16-1024x154.png\" alt=\"\" class=\"wp-image-8337\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/16-1024x154.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/16-300x45.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/16-768x116.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/16-18x3.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/16-720x109.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/16.png 1048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 2: Check Metric<\/strong><\/p>\n\n\n\n<p>Access the link http:\/\/localhost:9182<\/p>\n\n\n\n<p><strong>Step 3: Create a job in Prometheus to monitor Windows Server<\/strong><\/p>\n\n\n\n<p>Edit the prometheus.yml file, and add the following content:<\/p>\n\n\n\n<p>&nbsp;<code> - job_name: 'windows'<\/code><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;<code> static_configs:<\/code><\/p>\n\n\n\n<p>&nbsp;&nbsp;<code>&nbsp; - targets: ['localhost:9182']<\/code><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code> labels:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <code>hostname: DC01<\/code><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code> type: windows<\/code><\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code> company: XYZDG<\/code><\/p>\n\n\n\n<p>Here&#8217;s the result:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"446\" height=\"289\" src=\"\/wp-content\/uploads\/2021\/09\/17.png\" alt=\"\" class=\"wp-image-8338\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/17.png 446w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/17-300x194.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/17-18x12.png 18w\" sizes=\"(max-width: 446px) 100vw, 446px\" \/><\/figure>\n\n\n\n<p><strong>Step 4: Restart Prometheus Application<\/strong><\/p>\n\n\n\n<p>After restarting Prometheus, we access the URL http:\/\/localhost:9090\/targets (Status\/Targets) again. We will see 2 jobs running:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"287\" src=\"\/wp-content\/uploads\/2021\/09\/18-1024x287.png\" alt=\"\" class=\"wp-image-8339\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18-1024x287.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18-300x84.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18-768x215.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18-1536x430.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18-18x5.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18-720x202.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/18.png 1556w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 5: Create a Windows Server Monitoring Dashboard on Grafana<\/strong><\/p>\n\n\n\n<p>This step describes how to use the import function to import a pre-built dashboard. You can find various dashboards on the Grafana website at the following link:<\/p>\n\n\n\n<p><a href=\"https:\/\/grafana.com\/grafana\/dashboards?dataSource=prometheus&amp;search=windows_exporter\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/grafana.com\/grafana\/dashboards?dataSource=prometheus&amp;search=windows_exporter<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"\/wp-content\/uploads\/2021\/09\/19-1024x555.png\" alt=\"\" class=\"wp-image-8340\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19-1024x555.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19-300x163.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19-768x416.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19-1536x832.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19-18x10.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19-720x390.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/19.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Now we use <a href=\"https:\/\/grafana.com\/grafana\/dashboards\/14694\" target=\"_blank\" rel=\"noreferrer noopener\">Windows Exporter Dashboard<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"564\" src=\"\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image-1024x564.png\" alt=\"\" class=\"wp-image-8329\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image-1024x564.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image-300x165.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image-768x423.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image-18x10.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image-720x396.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/8dd96b57354fc7cf8374e6613675c8680aa7de06d99129e0c420db16fd743a48-image.png 1221w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Load the corresponding dashboard and select the appropriate data source.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"\/wp-content\/uploads\/2021\/09\/20-1024x555.png\" alt=\"\" class=\"wp-image-8341\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20-1024x555.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20-300x163.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20-768x416.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20-1536x832.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20-18x10.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20-720x390.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/20.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>After successful import, we will have the following results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"619\" src=\"\/wp-content\/uploads\/2021\/09\/21-1024x619.png\" alt=\"\" class=\"wp-image-8342\" srcset=\"https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21-1024x619.png 1024w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21-300x181.png 300w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21-768x464.png 768w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21-1536x928.png 1536w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21-18x12.png 18w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21-720x435.png 720w, https:\/\/nois.vn\/wp-content\/uploads\/2021\/09\/21.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>In this article, we&#8217;ve provided an overview of essential knowledge about Monitoring systems, introduced Grafana in combination with Prometheus, and guided you through setting up monitoring for Windows servers.<\/p>\n\n\n\n<p>In upcoming articles, we&#8217;ll delve into configuring alerts through Microsoft Teams, Telegram, or integrating data from various sources, as well as discussing the implementation of this system within a DevOps workflow.<\/p>\n\n\n\n<p>Please note that this content is based on our research and implementation experience, and there may be some inaccuracies. We welcome your feedback and comments.<\/p>\n\n\n\n<p>Thank you for taking the time to read our article.<\/p>\n\n\n\n<p><strong>Author: Phong Pham, Senior Software Developer at New Ocean IS<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One day, my boss tasked me with a straightforward request: &#8220;Help me set up a monitoring system to track and monitor the system, assess its stability, and provide early warnings in case of any issues.&#8221; Upon receiving this request, I immediately thought of several tools currently available, such as Kibana and Nagios. However, during the [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":12607,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[58],"tags":[60,62,61,63],"class_list":["post-8317","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-knowledge","tag-granfana","tag-monitoring-system","tag-promethues","tag-windows-server"],"_links":{"self":[{"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/posts\/8317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/comments?post=8317"}],"version-history":[{"count":2,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/posts\/8317\/revisions"}],"predecessor-version":[{"id":34607,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/posts\/8317\/revisions\/34607"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/media\/12607"}],"wp:attachment":[{"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/media?parent=8317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/categories?post=8317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nois.vn\/vi\/wp-json\/wp\/v2\/tags?post=8317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}