{"id":10216,"date":"2023-06-23T01:43:43","date_gmt":"2023-06-23T08:43:43","guid":{"rendered":"https:\/\/www.couchbase.com\/developers\/tutorials\/configure-prometheus-alerts\/"},"modified":"2023-06-23T01:43:43","modified_gmt":"2023-06-23T08:43:43","slug":"configure-prometheus-alerts","status":"publish","type":"tutorials","link":"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/","title":{"rendered":"Configure Prometheus Alerts"},"content":{"rendered":"\n<h3 id=\"h-configure-prometheus-to-use-alertmanager\" class=\"wp-block-heading\">Configure Prometheus to use AlertManager<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the <code>prometheus.yml<\/code> file from the server that Prometheus is installed on and add the following YAML below the <code>global:<\/code> block and before the <code>scrape_configs:<\/code> block.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo vi \/etc\/prometheus\/prometheus.yml\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code language-yaml\"><code># Alertmanager configuration\nalerting:\n  alertmanagers:\n  - static_configs:\n    - targets:\n      - &lt;alertmanager-ip&gt;:9093\n    scheme: http\n    timeout: 10s\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-configure-prometheus-to-monitor-alertmanager\" class=\"wp-block-heading\">Configure Prometheus to Monitor AlertManager<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the <code>prometheus.yml<\/code> file and add the following under the <code>scrape_configs:<\/code> block.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo vi \/etc\/prometheus\/prometheus.yml\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code language-yaml\"><code>  - job_name: alertmanager\n    honor_labels: true\n    honor_timestamps: true\n    scheme: http\n    scrape_interval: 60s\n    scrape_timeout: 55s\n    metrics_path: \/metrics\n    static_configs:\n    - targets: [&#039;localhost:9093&#039;]\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Prometheus<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo systemctl restart prometheus\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-create-prometheus-rules\" class=\"wp-block-heading\">Create Prometheus Rules<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a rules directory for Prometheus to reference.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo mkdir -p \/etc\/prometheus\/rules\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Copy all of the example rules into the directory:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo cp \/opt\/couchbase_exporter\/prometheus\/rules\/*.yml \/etc\/prometheus\/rules\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Set the permissions so that the prometheus user is the owner.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo chown -R prometheus:prometheus \/etc\/prometheus\/rules\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that all of the rules are valid by using <code>promtool<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>promtool check rules \/etc\/prometheus\/rules\/*.yml\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output should show SUCCESS for all rules files, similar to the following:<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>Checking \/etc\/prometheus\/rules\/couchbase.analytics.rules.yml\n  SUCCESS: 2 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.bucket.rules.yml\n  SUCCESS: 10 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.eventing.rules.yml\n  SUCCESS: 2 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.fts.rules.yml\n  SUCCESS: 2 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.index.rules.yml\n  SUCCESS: 2 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.query.rules.yml\n  SUCCESS: 4 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.system.rules.yml\n  SUCCESS: 4 rules found\n\nChecking \/etc\/prometheus\/rules\/couchbase.xdcr.rules.yml\n  SUCCESS: 4 rules found\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-configure-prometheus-rules\" class=\"wp-block-heading\">Configure Prometheus Rules<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The rules files exist, now prometheus needs to be configured to use them. Add the following YAML after the <code>alerting:<\/code> block and before the <code>scrape_configs:<\/code> block.<\/p>\n\n\n\n<pre class=\"wp-block-code language-yaml\"><code># Load rules once and periodically evaluate them according\n# to the global evaluation_interval.\nrule_files:\n  - &quot;rules\/couchbase.*.rules.yml&quot;\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo vi \/etc\/prometheus\/prometheus.yml\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Validate the configuration changes using <code>promtool<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>promtool check config \/etc\/prometheus\/prometheus.yml\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Restart Prometheus so the configuration change is picked up.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>sudo systemctl restart prometheus\n<\/code><\/pre>\n\n\n\n<h3 id=\"h-access-prometheus-ui\" class=\"wp-block-heading\">Access Prometheus UI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the Prometheus UI and go to the &#8220;Alerts&#8221; tab.<\/p>\n\n\n\n<pre class=\"wp-block-code language-bash\"><code>http:\/\/&lt;prometheus-ip&gt;:9090\/alerts\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should be able to see all of the configured alerts in the UI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img decoding=\"async\" src=\".\/assets\/prometheus-alerts-ui.png\" alt=\"Prometheus Alerts UI\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Disclaimer:<\/strong> The rules that have been provided are for example purposes only. Alerts should be configured and tailored specific to your use-case and environments. Please review the documentation for <a href=\"https:\/\/prometheus.io\/docs\/prometheus\/latest\/configuration\/alerting_rules\/\">adding your own custom Prometheus alerting rules<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configure Prometheus to use AlertManager Edit the prometheus.yml file from the server that Prometheus is installed on and add the following YAML below the global: block and before the scrape_configs: block. Configure Prometheus to Monitor AlertManager Edit the prometheus.yml file and add the following under the scrape_configs: block. Restart Prometheus Create Prometheus Rules Create a [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"_acf":"","footnotes":""},"tutorial-languages":[551],"tutorial-tags":[553,571,563,570],"tutorial-technologies":[554],"tutorial-types":[555],"class_list":["post-10216","tutorials","type-tutorials","status-publish","hentry","tutorial-languages-any","tutorial-tags-configuration","tutorial-tags-monitoring","tutorial-tags-observability","tutorial-tags-prometheus","tutorial-technologies-server","tutorial-types-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Configure Prometheus Alerts - Couchbase<\/title>\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.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configure Prometheus Alerts\" \/>\n<meta property=\"og:description\" content=\"Configure Prometheus to use AlertManager Edit the prometheus.yml file from the server that Prometheus is installed on and add the following YAML below the global: block and before the scrape_configs: block. Configure Prometheus to Monitor AlertManager Edit the prometheus.yml file and add the following under the scrape_configs: block. Restart Prometheus Create Prometheus Rules Create a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/\" \/>\n<meta property=\"og:site_name\" content=\"Couchbase\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Couchbase\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/10\/Cloud-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2548\" \/>\n\t<meta property=\"og:image:height\" content=\"1171\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@couchbase\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/\",\"name\":\"Configure Prometheus Alerts - Couchbase\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/#website\"},\"datePublished\":\"2023-06-23T08:43:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure Prometheus Alerts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/\",\"name\":\"Couchbase\",\"description\":\"The Operational Data Platform for AI\u2122\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/#organization\"},\"alternateName\":\"Couchbase, Inc.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/#organization\",\"name\":\"Couchbase\",\"alternateName\":\"Couchbase, Inc.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Couchbase_Logo_Couchbase_Token_Red-1.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/Couchbase_Logo_Couchbase_Token_Red-1.png\",\"width\":1129,\"height\":1129,\"caption\":\"Couchbase\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ko\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Couchbase\\\/\",\"https:\\\/\\\/x.com\\\/couchbase\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/CouchbaseServer\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/couchbase\\\/\",\"https:\\\/\\\/github.com\\\/couchbase\\\/\",\"https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Couchbase,_Inc.\"],\"description\":\"Couchbase is a database software company headquartered in San Jose, California, providing an operational data platform for AI used by hundreds of global enterprises.\",\"legalName\":\"Couchbase, Inc.\",\"foundingDate\":\"2011-01-01\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Configure Prometheus Alerts - Couchbase","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.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/","og_locale":"ko_KR","og_type":"article","og_title":"Configure Prometheus Alerts","og_description":"Configure Prometheus to use AlertManager Edit the prometheus.yml file from the server that Prometheus is installed on and add the following YAML below the global: block and before the scrape_configs: block. Configure Prometheus to Monitor AlertManager Edit the prometheus.yml file and add the following under the scrape_configs: block. Restart Prometheus Create Prometheus Rules Create a [&hellip;]","og_url":"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/","og_site_name":"Couchbase","article_publisher":"https:\/\/www.facebook.com\/Couchbase\/","og_image":[{"width":2548,"height":1171,"url":"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/10\/Cloud-2.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@couchbase","twitter_misc":{"Est. reading time":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/","url":"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/","name":"Configure Prometheus Alerts - Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/ko\/#website"},"datePublished":"2023-06-23T08:43:43+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/ko\/developers\/tutorials\/configure-prometheus-alerts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/"},{"@type":"ListItem","position":2,"name":"Configure Prometheus Alerts"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/ko\/#website","url":"https:\/\/www.couchbase.com\/ko\/","name":"\ucf54\uc6b0\uce58\ubca0\uc774\uc2a4","description":"The Operational Data Platform for AI\u2122","publisher":{"@id":"https:\/\/www.couchbase.com\/ko\/#organization"},"alternateName":"Couchbase, Inc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/ko\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/ko\/#organization","name":"\ucf54\uc6b0\uce58\ubca0\uc774\uc2a4","alternateName":"Couchbase, Inc.","url":"https:\/\/www.couchbase.com\/ko\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.couchbase.com\/ko\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/11\/Couchbase_Logo_Couchbase_Token_Red-1.png","contentUrl":"https:\/\/www.couchbase.com\/wp-content\/uploads\/2026\/11\/Couchbase_Logo_Couchbase_Token_Red-1.png","width":1129,"height":1129,"caption":"Couchbase"},"image":{"@id":"https:\/\/www.couchbase.com\/ko\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Couchbase\/","https:\/\/x.com\/couchbase","https:\/\/www.youtube.com\/c\/CouchbaseServer","https:\/\/www.linkedin.com\/company\/couchbase\/","https:\/\/github.com\/couchbase\/","https:\/\/en.wikipedia.org\/wiki\/Couchbase,_Inc."],"description":"Couchbase\ub294 \uce98\ub9ac\ud3ec\ub2c8\uc544\uc8fc \uc0cc\ud638\uc138\uc5d0 \ubcf8\uc0ac\ub97c \ub454 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \ud68c\uc0ac\ub85c, \uc218\ubc31 \uac1c\uc758 \uae00\ub85c\ubc8c \uae30\uc5c5\uc5d0\uc11c \ud65c\uc6a9\ud558\ub294 \uc778\uacf5\uc9c0\ub2a5\uc744 \uc704\ud55c \uc6b4\uc601 \ub370\uc774\ud130 \ud50c\ub7ab\ud3fc\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.","legalName":"Couchbase, Inc.","foundingDate":"2011-01-01"}]}},"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorials\/10216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorials"}],"about":[{"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/types\/tutorials"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorials\/10216\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/media?parent=10216"}],"wp:term":[{"taxonomy":"tutorial-languages","embeddable":true,"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorial-languages?post=10216"},{"taxonomy":"tutorial-tags","embeddable":true,"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorial-tags?post=10216"},{"taxonomy":"tutorial-technologies","embeddable":true,"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorial-technologies?post=10216"},{"taxonomy":"tutorial-types","embeddable":true,"href":"https:\/\/www.couchbase.com\/ko\/wp-json\/wp\/v2\/tutorial-types?post=10216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}