{"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\/ja\/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 rules directory for Prometheus to reference. Copy all of the example rules into the directory: Set the permissions so that the prometheus user is the owner. Verify that all of the rules are valid by using promtool The output should show SUCCESS for all rules files, similar to the following: Configure Prometheus Rules The rules [&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\/ja\/developers\/tutorials\/configure-prometheus-alerts\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\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 rules directory for Prometheus to reference. Copy all of the example rules into the directory: Set the permissions so that the prometheus user is the owner. Verify that all of the rules are valid by using promtool The output should show SUCCESS for all rules files, similar to the following: Configure Prometheus Rules The rules [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/ja\/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\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/\",\"name\":\"Configure Prometheus Alerts - Couchbase\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/#website\"},\"datePublished\":\"2023-06-23T08:43:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/developers\\\/tutorials\\\/configure-prometheus-alerts\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/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\\\/ja\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/\",\"name\":\"Couchbase\",\"description\":\"The Operational Data Platform for AI\u2122\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/#organization\"},\"alternateName\":\"Couchbase, Inc.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/#organization\",\"name\":\"Couchbase\",\"alternateName\":\"Couchbase, Inc.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/ja\\\/#\\\/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\\\/ja\\\/#\\\/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\/ja\/developers\/tutorials\/configure-prometheus-alerts\/","og_locale":"ja_JP","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 rules directory for Prometheus to reference. Copy all of the example rules into the directory: Set the permissions so that the prometheus user is the owner. Verify that all of the rules are valid by using promtool The output should show SUCCESS for all rules files, similar to the following: Configure Prometheus Rules The rules [&hellip;]","og_url":"https:\/\/www.couchbase.com\/ja\/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\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/ja\/developers\/tutorials\/configure-prometheus-alerts\/","url":"https:\/\/www.couchbase.com\/ja\/developers\/tutorials\/configure-prometheus-alerts\/","name":"Configure Prometheus Alerts - Couchbase","isPartOf":{"@id":"https:\/\/www.couchbase.com\/ja\/#website"},"datePublished":"2023-06-23T08:43:43+00:00","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/ja\/developers\/tutorials\/configure-prometheus-alerts\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/ja\/developers\/tutorials\/configure-prometheus-alerts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/ja\/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\/ja\/#website","url":"https:\/\/www.couchbase.com\/ja\/","name":"Couchbase","description":"The Operational Data Platform for AI\u2122","publisher":{"@id":"https:\/\/www.couchbase.com\/ja\/#organization"},"alternateName":"Couchbase, Inc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/ja\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/ja\/#organization","name":"Couchbase","alternateName":"Couchbase, Inc.","url":"https:\/\/www.couchbase.com\/ja\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.couchbase.com\/ja\/#\/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\/ja\/#\/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\u306f\u30ab\u30ea\u30d5\u30a9\u30eb\u30cb\u30a2\u5dde\u30b5\u30f3\u30ce\u30bc\u306b\u672c\u793e\u3092\u7f6e\u304f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u4f01\u696d\u3067\u3001\u6570\u767e\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u4f01\u696d\u304c\u4f7f\u7528\u3059\u308bAI\u7528\u306e\u904b\u7528\u30c7\u30fc\u30bf\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002.","legalName":"Couchbase, Inc.","foundingDate":"2011-01-01"}]}},"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorials\/10216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorials"}],"about":[{"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/types\/tutorials"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorials\/10216\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/media?parent=10216"}],"wp:term":[{"taxonomy":"tutorial-languages","embeddable":true,"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorial-languages?post=10216"},{"taxonomy":"tutorial-tags","embeddable":true,"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorial-tags?post=10216"},{"taxonomy":"tutorial-technologies","embeddable":true,"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorial-technologies?post=10216"},{"taxonomy":"tutorial-types","embeddable":true,"href":"https:\/\/www.couchbase.com\/ja\/wp-json\/wp\/v2\/tutorial-types?post=10216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}