{
    "componentChunkName": "component---src-templates-plugin-docs-tsx",
    "path": "/plugins/scm-metrics-prometheus-plugin/docs/3.0.x/en/",
    "result": {"data":{"plugin":{"name":"scm-metrics-prometheus-plugin","displayName":"Prometheus Metrics","description":"Provides metrics to Prometheus","author":"Cloudogu GmbH","documentation":[{"version":"3.0.x","languages":["de","en"]},{"version":"1.0.x","languages":["de","en"]}]},"navigation":{"nodes":[]},"versions":{"group":[{"fieldValue":"1.0.x"},{"fieldValue":"3.0.x"}]},"languages":{"group":[{"fieldValue":"de"},{"fieldValue":"en"}]},"markdownRemark":{"html":"<p>This documentation describes the usage of Prometheus Metrics Plugin. It is available in different languages and versions, which can be selected in the menu on the right.</p>\n<p>In SCM Manager, many components collect metrics that provide useful information and can give insight into the usage of the system. This plugin provides these metrics for the monitoring system <a href=\"https://prometheus.io/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Prometheus</a>.</p>\n<h1 id=\"usage\" style=\"position:relative;\"><a href=\"#usage\" aria-label=\"usage permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Usage</h1>\n<p>To configure Prometheus for use with the plugin, the endpoint must be made known to Prometheus. This can be done either via one of Prometheus's service discovery mechanisms or via the static configuration in <code class=\"language-text\">prometheus.yml</code>. In the following we show the configuration using the static configuration. For more information on Prometheus configuration, have a look at the <a href=\"https://prometheus.io/docs/prometheus/latest/configuration/configuration/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Prometheus Documentation</a>.</p>\n<h2 id=\"static-configuration\" style=\"position:relative;\"><a href=\"#static-configuration\" aria-label=\"static configuration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Static configuration</h2>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">scrape_configs</span><span class=\"token punctuation\">:</span>\n<span class=\"token punctuation\">-</span> <span class=\"token key atrule\">job_name</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'scm-manager'</span>\n  <span class=\"token key atrule\">static_configs</span><span class=\"token punctuation\">:</span>\n  <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">targets</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span> <span class=\"token string\">'scm.hitchhiker.com:8080'</span> <span class=\"token punctuation\">]</span>\n  <span class=\"token key atrule\">scheme</span><span class=\"token punctuation\">:</span> http\n  <span class=\"token key atrule\">metrics_path</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'/scm/api/v2/metrics/prometheus'</span>\n  <span class=\"token key atrule\">basic_auth</span><span class=\"token punctuation\">:</span>\n    <span class=\"token key atrule\">username</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'prometheus'</span>\n    <span class=\"token key atrule\">password</span><span class=\"token punctuation\">:</span> <span class=\"token string\">'secretPwd4Prometheus'</span></code></pre></div>\n<ul>\n<li><code class=\"language-text\">job_name</code>: Unique name for the scrape job</li>\n<li><code class=\"language-text\">static_configs.targets</code>: An array with an entry for the hostname of the SCM-Manager instance including the port</li>\n<li><code class=\"language-text\">scheme</code>: <code class=\"language-text\">http</code> or <code class=\"language-text\">https</code>.</li>\n<li><code class=\"language-text\">metrics_path</code>: Path to the endpoint of the plugin, can be taken from the index (<code class=\"language-text\">/api/v2</code>). The link is located under <code class=\"language-text\">_links.metrics</code> with the name <code class=\"language-text\">prometheus</code>.</li>\n<li><code class=\"language-text\">basic_auth</code>: Username and password of a user with the permission to read the metrics. It is recommended to create a technical user that has only this permission.</li>\n</ul>","description":"This documentation describes the usage of Prometheus Metrics Plugin. It is available in different languages and versions, which can be selected in the menu on…","tableOfContents":"<ul>\n<li>\n<p><a href=\"#usage\">Usage</a></p>\n<ul>\n<li><a href=\"#static-configuration\">Static configuration</a></li>\n</ul>\n</li>\n</ul>","frontmatter":{"title":"Documentation","subtitle":"Prometheus Metrics Plugin Documentation","description":null,"keywords":null,"displayToc":null,"image":null}}},"pageContext":{"name":"scm-metrics-prometheus-plugin","slug":"/plugins/scm-metrics-prometheus-plugin/docs/3.0.x/en/","version":"3.0.x","latestVersion":"3.0.x","latestPageVersion":"3.0.x","language":"en","canonicalPath":"/plugins/scm-metrics-prometheus-plugin/docs/latest/en/","latestRootPath":"/plugins/scm-metrics-prometheus-plugin/docs/3.0.x/en/"}},
    "staticQueryHashes": ["1973669194","2742214048","2956773653","2957019495","698804963"]}