1"use strict";(self.webpackChunkmetricshub_doc=self.webpackChunkmetricshub_doc||[]).push([["20482"],{81048(e,r,n){n.r(r),n.d(r,{metadata:()=>t,default:()=>g,frontMatter:()=>u,contentTitle:()=>d,toc:()=>m,assets:()=>h});var t=JSON.parse('{"id":"installation/installing-on-docker","title":"Installing on Docker","description":"How to install MetricsHub on Docker.","source":"@site/docs/installation/installing-on-docker.md","sourceDirName":"installation","slug":"/installation/installing-on-docker","permalink":"/docs/latest/installation/installing-on-docker","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Installing on Docker","description":"How to install MetricsHub on Docker.","keywords":["install","docker","container","enterprise","community"]},"sidebar":"docsSidebar","previous":{"title":"Installing on Linux","permalink":"/docs/latest/installation/installing-on-linux"},"next":{"title":"Upgrade Notes","permalink":"/docs/latest/upgrade-notes"}}'),i=n(74848),s=n(28453),o=n(39677),a=n(57250),l=n(18528),c=n(28919);let u={title:"Installing on Docker",description:"How to install MetricsHub on Docker.",keywords:["install","docker","container","enterprise","community"]},d="Installing on Docker",h={},m=[{value:"Pulling the Image",id:"pulling-the-image",level:2},{value:"Preparing the Configuration",id:"preparing-the-configuration",level:2},{value:"Starting the Container",id:"starting-the-container",level:2},{value:"Docker Compose",id:"docker-compose",level:2},{value:"Managing Containers",id:"managing-containers",level:2},{value:"Upgrading",id:"upgrading",level:2},{value:"Pulling the Image",id:"pulling-the-image-1",level:2},{value:"Preparing the Configuration",id:"preparing-the-configuration-1",level:2},{value:"Starting the Container",id:"starting-the-container-1",level:2},{value:"Docker Compose",id:"docker-compose-1",level:2},{value:"Managing Containers",id:"managing-containers-1",level:2},{value:"Upgrading",id:"upgrading-1",level:2},{value:"Next Steps",id:"next-steps",level:2}];function p(e){let r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"installing-on-docker",children:"Installing on Docker"})}),"\n",(0,i.jsx)(r.p,{children:"This guide covers running MetricsHub as a Docker container. You can use Docker directly or Docker Compose."}),"\n",(0,i.jsxs)(o.A,{children:[(0,i.jsxs)(a.A,{value:"community",label:(0,i.jsx)(l.A,{edition:"community"}),children:[(0,i.jsx)(r.h2,{id:"pulling-the-image",children:"Pulling the Image"}),(0,i.jsx)(r.p,{children:"Pull the Community image from Docker Hub:"}),(0,i.jsx)(c.A,{language:"bash",children:"docker pull metricshub/metricshub-community:{{communityVersion}}"}),(0,i.jsx)(r.h2,{id:"preparing-the-configuration",children:"Preparing the Configuration"}),(0,i.jsx)(r.p,{children:"Create directories and download example configuration:"}),(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"mkdir -p /opt/metricshub/{logs,config,security}\ncd /opt/metricshub\nwget -O ./config/metricshub.yaml https://metricshub.com/docs/latest/resources/config/linux/metricshub-example.yaml\n"})}),(0,i.jsx)(r.p,{children:"Set permissions (container runs as UID 1000):"}),(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"chown -R 1000:1000 /opt/metricshub && chmod -R 775 /opt/metricshub\n"})}),(0,i.jsx)(r.h2,{id:"starting-the-container",children:"Starting the Container"}),(0,i.jsx)(c.A,{language:"bash",children:`cd /opt/metricshub && docker run -d \\ 2 --name=metricshub-community \\ 3 -p 31888:31888 \\ 4 -v $(pwd)/config:/opt/metricshub/lib/config \\ 5 -v $(pwd)/logs:/opt/metricshub/lib/logs \\ 6 -v $(pwd)/security:/opt/metricshub/lib/security \\ 7 metricshub/metricshub-community:{{communityVersion}} 8`}),(0,i.jsx)(r.h2,{id:"docker-compose",children:"Docker Compose"}),(0,i.jsxs)(r.p,{children:["For easier management, you can use Docker Compose. Create a ",(0,i.jsx)(r.code,{children:"docker-compose.yaml"})," file in ",(0,i.jsx)(r.code,{children:"/opt/metricshub"}),":"]}),(0,i.jsx)(c.A,{language:"yaml",children:`services: 9 metricshub:
10 image: metricshub/metricshub-community:{{communityVersion}} 11 container_name: metricshub-community 12 ports: 13 - 31888:31888 # MetricsHub Web UI 14 volumes: 15 - ./logs:/opt/metricshub/lib/logs 16 - ./config:/opt/metricshub/lib/config 17 - ./security:/opt/metricshub/lib/security 18 restart: unless-stopped 19`}),(0,i.jsxs)(r.p,{children:["Start with ",(0,i.jsx)(r.code,{children:"docker compose up -d"}),"."]}),(0,i.jsx)(r.h2,{id:"managing-containers",children:"Managing Containers"}),(0,i.jsx)(r.p,{children:"Use these commands to manage your MetricsHub container:"}),(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker stop metricshub-community\ndocker start metricshub-community\ndocker restart metricshub-community\ndocker logs metricshub-community\n"})}),(0,i.jsx)(r.h2,{id:"upgrading",children:"Upgrading"}),(0,i.jsx)(r.p,{children:"To upgrade to a newer version:"}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["Stop and remove the existing container:","\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker stop metricshub-community && docker rm metricshub-community\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["Pull the latest image:","\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker pull metricshub/metricshub-community:latest\n"})}),"\n"]}),"\n",(0,i.jsx)(r.li,{children:"Start with your existing configuration (same command as initial start)"}),"\n"]}),(0,i.jsx)(r.p,{children:"Your configuration files are preserved in the mounted volumes."})]}),(0,i.jsxs)(a.A,{value:"enterprise",label:(0,i.jsx)(l.A,{edition:"enterprise"}),children:[(0,i.jsx)(r.h2,{id:"pulling-the-image-1",children:"Pulling the Image"}),(0,i.jsx)(r.p,{children:"Login to the Enterprise registry with credentials from your onboarding email:"}),(0,i.jsx)(c.A,{language:"bash",children:`docker login docker.metricshub.com 20docker pull docker.metricshub.com/metricshub-enterprise:{{enterpriseVersion}} 21`}),(0,i.jsx)(r.h2,{id:"preparing-the-configuration-1",children:"Preparing the Configuration"}),(0,i.jsx)(r.p,{children:"Create directories and download example configuration:"}),(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"mkdir -p /opt/metricshub/{logs,config,otel,security}\ncd /opt/metricshub\nwget -O ./config/metricshub.yaml https://metricshub.com/docs/latest/resources/config/linux/metricshub-example.yaml\nwget -O ./otel/otel-config.yaml https://metricshub.com/docs/latest/resources/config/otel/otel-config-example.yaml\n"})}),(0,i.jsx)(r.p,{children:"Set permissions (container runs as UID 1000):"}),(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"chown -R 1000:1000 /opt/metricshub && chmod -R 775 /opt/metricshub\n"})}),(0,i.jsx)(r.h2,{id:"starting-the-container-1",children:"Starting the Container"}),(0,i.jsx)(c.A,{language:"bash",children:`cd /opt/metricshub && docker run -d \\ 22 --name=metricshub-enterprise \\ 23 -p 24375:24375 -p 13133:13133 -p 31888:31888 \\ 24 -v $(pwd)/config:/opt/metricshub/lib/config \\ 25 -v $(pwd)/otel/otel-config.yaml:/opt/metricshub/lib/otel/otel-config.yaml \\ 26 -v $(pwd)/logs:/opt/metricshub/lib/logs \\ 27 -v $(pwd)/security:/opt/metricshub/lib/security \\ 28 --hostname=localhost \\ 29 docker.metricshub.com/metricshub-enterprise:{{enterpriseVersion}} 30`}),(0,i.jsx)(r.h2,{id:"docker-compose-1",children:"Docker Compose"}),(0,i.jsxs)(r.p,{children:["For easier management, you can use Docker Compose. Create a ",(0,i.jsx)(r.code,{children:"docker-compose.yaml"})," file in ",(0,i.jsx)(r.code,{children:"/opt/metricshub"}),":"]}),(0,i.jsx)(c.A,{language:"bash",children:`services: 31 metricshub: 32 image: docker.metricshub.com/metricshub-enterprise:{{enterpriseVersion}} 33 container_name: metricshub-enterprise 34 hostname: localhost 35 ports: 36 - 13133:13133 # OTel Collector HealthCheck 37 - 24375:24375 # OTel Collector Prometheus Exporter 38 - 31888:31888 # MetricsHub Web UI 39 volumes: 40 - ./logs:/opt/metricshub/lib/logs 41 - ./config:/opt/metricshub/lib/config 42 - ./otel/otel-config.yaml:/opt/metricshub/lib/otel/otel-config.yaml 43 - ./security:/opt/metricshub/lib/security 44 restart: unless-stopped 45`}),(0,i.jsxs)(r.p,{children:["Start with ",(0,i.jsx)(r.code,{children:"docker
45compose up -d"}),"."]}),(0,i.jsx)(r.h2,{id:"managing-containers-1",children:"Managing Containers"}),(0,i.jsx)(r.p,{children:"Use these commands to manage your MetricsHub container:"}),(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker stop metricshub-enterprise\ndocker start metricshub-enterprise\ndocker restart metricshub-enterprise\ndocker logs metricshub-enterprise\n"})}),(0,i.jsx)(r.h2,{id:"upgrading-1",children:"Upgrading"}),(0,i.jsx)(r.p,{children:"To upgrade to a newer version:"}),(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:["Stop and remove the existing container:","\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker stop metricshub-enterprise && docker rm metricshub-enterprise\n"})}),"\n"]}),"\n",(0,i.jsxs)(r.li,{children:["Pull the latest image:","\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-bash",children:"docker pull docker.metricshub.com/metricshub-enterprise:latest\n"})}),"\n"]}),"\n",(0,i.jsx)(r.li,{children:"Start with your existing configuration (same command as initial start)"}),"\n"]}),(0,i.jsx)(r.p,{children:"Your configuration files are preserved in the mounted volumes."})]})]}),"\n",(0,i.jsx)(r.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,i.jsx)(r.p,{children:"Once running, you're ready to configure MetricsHub:"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"../configuration/resource-settings",children:"Configure your resources"})," \u2014 define what to monitor"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/docs/latest/configuration/sending-telemetry-to-observability-platforms",children:"Set up telemetry export"})," \u2014 choose where to send metrics"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"../operating-web-interface",children:"Access the Web UI"})," \u2014 manage and monitor from your browser"]}),"\n"]})]})}function g(e={}){let{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}},57250(e,r,n){n.d(r,{A:()=>a});var t=n(74848);n(96540);var i=n(34164),s=n(57663);function o({children:e,className:r,hidden:n}){return(0,t.jsx)("div",{role:"tabpanel",className:(0,i.A)("tabItem_Ymn6",r),hidden:n,children:e})}function a({children:e,className:r,value:n}){let{selectedValue:i,lazy:l}=(0,s.uc)(),c=n===i;return!c&&l?null:(0,t.jsx)(o,{className:r,hidden:!c,children:e})}},50773(e,r,n){n.d(r,{A:()=>h});var t=n(74848);n(96540);var i=n(34164),s=n(88287),o=n(57663),a=n(28584),l=n(19863);function c({className:e}){let{selectedValue:r,selectValue:n,tabValues:s,block:l}=(0,o.uc)(),u=[],{blockElementScrollPositionUntilNextRender:d}=(0,a.a_)(),h=e=>{let t=e.currentTarget,i=s[u.indexOf(t)].value;i!==r&&(d(t),n(i))},m=e=>{let r=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{let n=u.indexOf(e.currentTarget)+1;r=u[n]??u[0];break}case"ArrowLeft":{let n=u.indexOf(e.currentTarget)-1;r=u[n]??u[u.length-1]}}r?.focus()};return(0,t.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":l},e),children:s.map(({value:e,label:n,attributes:s})=>(0,t.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{u.push(e)},onKeyDown:m,onClick:h,...s,className:(0,i.A)("tabs__item","tabItem_LNqP",s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function u({children:e}){return(0,t.jsx)("div",{className:"margin-top--md",children:e})}function d({className:e,children:r}){return(0,t.jsxs)("div",{className:(0,i.A)(s.G.tabs.container,"tabs-container","tabList__CuJ"),children:[(0,t.jsx)(c,{className:e}),(0,t.jsx)(u,{children:r})]})}function h(e){let r=(0,l.A)(),n=(0,o.OC)(e);return(0,t.jsx)(o.O_,{value:n,children:(0,t.jsx)(d,{className:e.className,children:(0,o.vT)(e.children)})},String(r))}},57663(e,r,n){n.d(r,{OC:()=>h,O_:()=>g,uc:()=>p,vT:()=>u});var t=n(74848),i=n(96540),s=n(56347),o=n(99989),a=n(96629),l=n(80618),c=n(41367);function u(e){return i.Children.toArray(e).filter(e=>"\n"!==e)}function d({value:e,tabValues:r}){return r.some(r=>r.value===e)}function h(e){let r,{defaultValue:n,queryString:t=!1,groupId:u}=e,h=function(e){let{values:r,children:n}=e;return(0,i.useMemo)(()=>{let e=r??i.Children.toArray(n).flatMap(e=>{if(!e)return[];if((0,i.isValidElement)(e)&&function(e){let{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return[e];
45let r="string"==typeof e.type?e.type:e.type.name;throw Error(`Docusaurus error: Bad <Tabs> child <${r}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop. 46If you do not want to pass on a "value" prop to the direct children of <Tabs>, you can also pass an explicit <Tabs values={...}> prop.`)}).map(({props:{value:e,label:r,attributes:n,default:t}})=>({value:e,label:r,attributes:n,default:t})),t=(0,l.XI)(e,(e,r)=>e.value===r.value);if(t.length>0)throw Error(`Docusaurus error: Duplicate values "${t.map(e=>`'${e.value}'`).join(", ")}" found in <Tabs>. Every value needs to be unique.`);return e},[r,n])}(e),[m,p]=(0,i.useState)(()=>(function({defaultValue:e,tabValues:r}){if(0===r.length)throw Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!d({value:e,tabValues:r}))throw Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${r.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}let n=r.find(e=>e.default)??r[0];if(!n)throw Error("Unexpected error: 0 tabValues");return n.value})({defaultValue:n,tabValues:h})),[g,b]=function({queryString:e=!1,groupId:r}){let n=(0,s.W6)(),t=function({queryString:e=!1,groupId:r}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!r)throw Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:e,groupId:r});return[(0,a.aZ)(t),(0,i.useCallback)(e=>{if(!t)return;let r=new URLSearchParams(n.location.search);r.set(t,e),n.replace({...n.location,search:r.toString()})},[t,n])]}({queryString:t,groupId:u}),[x,f]=function({groupId:e}){let r=e?`docusaurus.tab.${e}`:null,[n,t]=(0,c.Dv)(r);return[n,(0,i.useCallback)(e=>{r&&t.set(e)},[r,t])]}({groupId:u}),j=d({value:r=g??x,tabValues:h})?r:null;return(0,o.A)(()=>{j&&p(j)},[j]),{selectedValue:m,selectValue:(0,i.useCallback)(e=>{if(!d({value:e,tabValues:h}))throw Error(`Can't select invalid tab value=${e}`);p(e),b(e),f(e)},[b,f,h]),tabValues:h,lazy:e.lazy??!1,block:e.block??!1}}let m=(0,i.createContext)(null);function p(){let e=i.useContext(m);if(!e)throw Error("useTabsContext() must be used within a Tabs component");return e}function g(e){return(0,t.jsx)(m.Provider,{value:e.value,children:e.children})}},28919(e,r,n){n.d(r,{A:()=>o});var t=n(74848);n(96540);var i=n(1113),s=n(10898);function o({language:e="text",children:r}){let{siteConfig:n}=(0,s.A)(),a=String(r).replace(/\{\{\s*([^}]+?)\s*\}\}/g,(e,r)=>{let t=n.customFields?.[r];return("string"==typeof t?t:void 0)||`UNKNOWN_${r}`});return(0,t.jsx)(i.A,{language:e,children:a})}},18528(e,r,n){n.d(r,{A:()=>o});var t=n(74848);n(96540);var i=n(39197),s=n(81223);function o({edition:e}){let r="enterprise"===e;return(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[r?(0,t.jsx)(i.ymh,{}):(0,t.jsx)(s.JOh,{}),r?"Enterprise Edition":"Community Edition"]})}},39677(e,r,n){n.d(r,{A:()=>s});var t=n(74848);n(96540);var i=n(50773);function s({children:e,groupId:r="edition"}){return(0,t.jsx)(i.A,{groupId:r,defaultValue:"community",queryString:"edition",children:e})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.