All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.1255d548-7691.29f9482a4a76cf88fd19.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-7691"],{"/7uHmzM0":(R,N,o)=>{o.d(N,{sV:()=>Ce,$2:()=>it,Fp:()=>De});var O=o("ii0bleBb"),i=o.n(O),e=o("Z7aTuO5B"),p=o("D4SbLiE/"),m=o.n(p),h=o("JnTtTRmZ"),v=o.n(h),s=o("uZqmR+ju"),a=o("/GOzvPf6"),I=o("WE0xQIRH"),g=o("9pdI12pI"),d=o.n(g),E=o("5qbhaJ1A"),u=o("woUyHGxd");const F=m()({displayName:"NodeThroughput",propTypes:{nodeId:i().string.isRequired,longFormat:i().bool},mixins:[v().connect(u.q)],getDefaultProps(){return{longFormat:!1}},UNSAFE_componentWillMount(){this.metricNames={totalIn:"org.graylog2.throughput.input.1-sec-rate",totalOut:"org.graylog2.throughput.output.1-sec-rate"},Object.keys(this.metricNames).forEach(r=>u.K.add(this.props.nodeId,this.metricNames[r]))},componentWillUnmount(){Object.keys(this.metricNames).forEach(r=>u.K.remove(this.props.nodeId,this.metricNames[r]))},_isLoading(){return!this.state.metrics},_formatThroughput(r){return this.props.longFormat?e.createElement("span",null,"Processing ",e.createElement("strong",null,d()(r.totalIn).format("0,0"))," incoming and ",e.createElement("strong",null,d()(r.totalOut).format("0,0"))," outgoing msg/s."):e.createElement("span",null,"In ",d()(r.totalIn).format("0,0")," / Out ",d()(r.totalOut).format("0,0")," msg/s.")},render(){if(this._isLoading())return e.createElement(a.$j,{text:"Loading throughput..."});const{nodeId:r}=this.props,t=this.state.metrics[r],n=E.Z.getValuesForNode(t,this.metricNames);return Object.keys(n).length===0?e.createElement("span",null,"Unable to load throughput."):this._formatThroughput(n)}});var de=o("oCSEoDew"),J=o.n(de),ue=o("CrIFpfDF"),P=o("ty2gyrHp"),b=o("d4kzUuQm"),j=o("8wYeYPUw"),pe=o("+pX1WsJ3"),C=o("l8PdZtMi"),ge=Object.defineProperty,Ee=(r,t,n)=>t in r?ge(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,A=(r,t,n)=>(Ee(r,typeof t!="symbol"?t+"":t,n),n);class W extends e.Component{constructor(){super(...arguments),A(this,"_toggleMessageProcessing",()=>{const{systemOverview:t,node:n}=this.props;window.confirm(`You are about to ${t.is_processing?"pause":"resume"} message processing in this node. Are you sure?`)&&(t.is_processing?C.g.pause(n.node_id):C.g.resume(n.node_id))}),A(this,"_changeLBStatus",t=>()=>{if(window.confirm(`You are about to change the load balancer status for this node to ${t}. Are you sure?`)){const{node:n}=this.props;pe.t.override(n.node_id,t)}})}render(){const{systemOverview:t,node:n}=this.props,l=new(J())(`${n.transport_address}/api-browser/`).normalizePathname().toString();return e.createElement(ue.Z,null,e.createElement(P.J,{to:b.ZP.SYSTEM.NODES.SHOW(n.node_id)},e.createElement(s.Button,null,"Details")),e.createElement(P.J,{to:b.ZP.SYSTEM.METRICS(n.node_id)},e.createElement(s.Button,null,"Metrics")),e.createElement(a.bd,{href:l},"API browser"),e.createElement(s.DropdownButton,{title:"More actions",id:`more-actions-dropdown-${n.node_id}`,pullRight:!0},e.createElement(a.AE,{permissions:"processing:changestate"},e.createElement(s.MenuItem,{onSelect:this._toggleMessageProcessing},t.is_processing?"Pause":"Resume"," message processing")),e.createElement(a.AE,{permissions:"lbstatus:change"},e.createElement(a.Yz,{title:"Override LB status",left:!0},e.createElement(s.MenuItem,{onSelect:this._changeLBStatus("ALIVE")},"ALIVE"),e.createElement(s.MenuItem,{onSelect:this._changeLBStatus("DEAD")},"DEAD"))),e.createElement(a.AE,{permissions:["processing:changestate","lbstatus:change","node:shutdown"],anyPermissions:!0},e.createElement(a.AE,{permissions:["inputs:read","threads:dump"],anyPermissions:!0},e.createElement(s.MenuItem,{divider:!0}))),e.createElement(j.Z,null,e.createElement(a.AE,{permissions:"inputs:read"},e.createElement(P.J,{to:b.ZP.node_inputs(n.node_id)},e.createElement(s.MenuItem,null,"Local message inputs")))),e.createElement(a.AE,{permissions:"threads:dump"},e.createElement(P.J,{to:b.ZP.SYSTEM.THREADDUMP(n.node_id)},e.createElement(s.MenuItem,null,"Get thread dump"))),e.createElement(a.AE,{permissions:"processbuffer:dump"},e.createElement(P.J,{to:b.ZP.SYSTEM.PROCESSBUFFERDUMP(n.node_id)},e.createElement(s.MenuItem,null,"Get process-buffer dump"))),e.createElement(a.AE,{permissions:"loggersmessages:read"},e.createElement(P.J,{to:b.ZP.SYSTEM.SYSTEMLOGS(n.node_id)},e.createElement(s.MenuItem,null,"Get recent system log messages")))))}}A(W,"propTypes",{node:i().object.isRequired,systemOverview:i().object.isRequired});const fe=W;var S=o("J6y4/h8P"),K=o("TJOheZRu");const he=S.default.dl`
  margin-top: 0;
  margin-bottom: 0;

  dt {
    float: left;
  }

  dd {
    margin-left: 180px;
  }
`,G=({information:r})=>{const t=r.lb_status.toUpperCase();return e.createElement(he,null,e.createElement("dt",null,"Current lifecycle state:"),e.createElement("dd",null,K.Z.capitalizeFirstLetter(r.lifecycle)),e.createElement("dt",null,"Message processing:"),e.createElement("dd",null,r.is_processing?"Enabled":"Disabled"),e.createElement("dt",null,"Load balancer indication:"),e.createElement("dd",{className:t==="DEAD"?"text-danger":""},t))};G.propTypes={information:i().object.isRequired};const ve=G;var U=o("e5reO9iR"),T=o("zkmy/ViL");const ye=S.default.div`
  margin-top: 10px;

  p {
    margin-bottom: 0;
  }
`,L=S.default.span(({theme:r})=>(0,S.css)`
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 2px;
  border: 1px solid;

  &.used-memory {
    background-color: ${r.colors.variant.primary};
    border-color: ${r.colors.variant.dark.primary};
  }

  &.committed-memory {
    background-color: ${r.colors.variant.warning};
    border-color: ${r.colors.variant.dark.warning};
  }

  &.max-memory {
    background-color: ${r.colors.global.background};
    border-color: ${r.colors.gray[80]};
  }
`),Pe=(0,S.default)(U.Z)`
  height: 25px;
  margin-bottom: 5px;
`,z=m()({displayName:"JvmHeapUsage",propTypes:{nodeId:i().string.isRequired},mixins:[v().connect(u.q)],UNSAFE_componentWillMount(){const{nodeId:r}=this.props;this.metricNames={usedMemory:"jvm.memory.heap.used",committedMemory:"jvm.memory.heap.committed",maxMemory:"jvm.memory.heap.max"},Object.keys(this.metricNames).forEach(t=>u.K.add(r,this.metricNames[t]))},componentWillUnmount(){const{nodeId:r}=this.props;Object.keys(this.metricNames).forEach(t=>u.K.remove(r,this.metricNames[t]))},_extractMetricValues(){const{nodeId:r}=this.props,{metrics:t}=this.state;if(t&&t[r]){const n=E.Z.getValuesForNode(t[r],this.metricNames),{maxMemory:l,usedMemory:c,committedMemory:f}=n;return l?(n.usedPercentage=l===0?0:Math.ceil(c/l*100),n.committedPercentage=l===0?0:Math.ceil(f/l*100),n):{usedPercentage:0,committedPercentage:0}}return{}},render(){const{nodeId:r}=this.props,t=this._extractMetricValues(),{usedPercentage:n,committedPercentage:l,usedMemory:c,committedMemory:f,maxMemory:y}=t;let D=[{value:0}],M=e.createElement("p",null,e.createElement(a.$j,{text:"Loading heap usage information..."}));return(n||l)&&(Object.keys(t).length===0?M=e.createElement("p",null,"Heap information unavailable."):(D=[{value:n,bsStyle:"primary"},{value:l-n,bsStyle:"warning"}],M=e.createElement("p",null,"The JVM is using"," ",e.createElement(L,{className:"used-memory"}),e.createElement("strong",null," ",T.Z.formatBytes(c))," ","of"," ",e.createElement(L,{className:"committed-memory"}),e.createElement("strong",null," ",T.Z.formatBytes(f))," ","heap space and will not attempt to use more than"," ",e.createElement(L,{className:"max-memory"}),e.createElement("strong",null," ",T.Z.formatBytes(y))))),e.createElement(ye,{"data-node-id":r},e.createElement(Pe,{bars:D}),M)}}),be=m()({displayName:"JournalState",propTypes:{nodeId:i().string.isRequired},mixins:[v().connect(u.q)],UNSAFE_componentWillMount(){this.metricNames={append:"org.graylog2.journal.append.1-sec-rate",read:"org.graylog2.journal.read.1-sec-rate",segments:"org.graylog2.journal.segments",entriesUncommitted:"org.graylog2.journal.entries-uncommitted"},Object.keys(this.metricNames).forEach(r=>u.K.add(this.props.nodeId,this.metricNames[r]))},componentWillUnmount(){Object.keys(this.metricNames).forEach(r=>u.K.remove(this.props.nodeId,this.metricNames[r]))},_isLoading(){return!this.state.metrics},render(){if(this._isLoading())return e.createElement(a.$j,{text:"Loading journal metrics..."});const{nodeId:r}=this.props,t=this.state.metrics[r],n=E.Z.getValuesForNode(t,this.metricNames);return Object.keys(n).length===0?e.createElement("span",null,"Journal metrics unavailable."):e.createElement("span",null,"The journal contains ",e.createElement("strong",null,d()(n.entriesUncommitted).format("0,0")," unprocessed messages")," in ",n.segments," ",e.createElement(a.qX,{value:n.segments,singular:"segment",plural:"segments"}),"."," ",e.createElement("strong",null,d()(n.append).format("0,0")," messages")," appended, ",e.createElement("strong",null,d()(n.read).format("0,0")," messages")," read in the last second.")}});var Se=Object.defineProperty,Me=(r,t,n)=>t in r?Se(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Ne=(r,t,n)=>(Me(r,typeof t!="symbol"?t+"":t,n),n);class Y extends e.Component{render(){const{node:t}=this.props,n=e.createElement(a.Zv,{nodeId:t.node_id});if(!this.props.systemOverview)return e.createElement(a.S6,{key:`entry-list-${t.node_id}`,title:n,description:"System information is currently unavailable."});const l=e.createElement(F,{nodeId:t.node_id}),c=e.createElement(be,{nodeId:t.node_id}),f=e.createElement(fe,{node:t,systemOverview:this.props.systemOverview}),y=e.createElement("div",null,e.createElement(s.Col,{md:3},e.createElement(ve,{information:this.props.systemOverview})),e.createElement(s.Col,{md:9},e.createElement(z,{nodeId:this.props.node.node_id})));return e.createElement(a.S6,{key:`entry-list-${t.node_id}`,title:n,titleSuffix:l,description:c,actions:f,contentRow:y})}}Ne(Y,"propTypes",{node:i().object.isRequired,systemOverview:i().object});const Oe=Y,De=m()({displayName:"NodesList",propTypes:{permissions:i().array.isRequired,nodes:i().object},mixins:[v().connect(I.i)],_isLoading(){const{nodes:r}=this.props,{clusterOverview:t}=this.state;return!(r&&t)},_formatNodes(r,t){return Object.keys(r).map(l=>e.createElement(Oe,{key:l,node:r[l],systemOverview:t[l]}))},render(){if(this._isLoading())return e.createElement(a.$j,null);const r=Object.keys(this.props.nodes).length;return e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement("h2",null,"There ",e.createElement(a.qX,{value:r,singular:"is",plural:"are"})," ",r," active ",e.createElement(a.qX,{value:r,singular:"node",plural:"nodes"})),e.createElement(a.XO,{bsNoItemsStyle:"info",noItemsText:"There are no active nodes.",items:this._formatNodes(this.props.nodes,this.state.clusterOverview)})))}});var Te=Object.defineProperty,Ie=(r,t,n)=>t in r?Te(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Re=(r,t,n)=>(Ie(r,typeof t!="symbol"?t+"":t,n),n);class V extends e.Component{render(){const{node:t}=this.props,n=new(J())(`${t.transport_address}/api-browser/`).normalizePathname().toString();return e.createElement(s.ButtonGroup,null,e.createElement(s.DropdownButton,{bsStyle:"info",bsSize:"lg",title:"Actions",id:"node-maintenance-actions",pullRight:!0},e.createElement(a.AE,{permissions:"threads:dump"},e.createElement(P.J,{to:b.ZP.SYSTEM.THREADDUMP(t.node_id)},e.createElement(s.MenuItem,null,"Get thread dump"))),e.createElement(a.AE,{permissions:"processbuffer:dump"},e.createElement(P.J,{to:b.ZP.SYSTEM.PROCESSBUFFERDUMP(t.node_id)},e.createElement(s.MenuItem,null,"Get process-buffer dump"))),e.createElement(P.J,{to:b.ZP.SYSTEM.METRICS(t.node_id)},e.createElement(s.MenuItem,null,"Metrics")),e.createElement(j.Z,null,e.createElement(a.AE,{permissions:"loggers:read"},e.createElement(P.J,{to:b.ZP.SYSTEM.LOGGING},e.createElement(s.MenuItem,null,"Configure internal logging")))),e.createElement(s.MenuItem,{href:n,target:"_blank"},e.createElement(a.dL,null,"API Browser"))))}}Re(V,"propTypes",{node:i().object.isRequired});const Ce=V;var _e=o("8fnsnG21");const je=S.default.div(({theme:r})=>(0,S.css)`
  margin-top: ${r.spacings.sm};
  margin-bottom: ${r.spacings.xs};
`),Ae=(0,S.default)(a.ko)(({theme:r})=>(0,S.css)`
  margin-bottom: ${r.spacings.xs};
`),H=r=>`org.graylog2.buffers.${r}`,Ue=r=>`org\\.graylog2\\.buffers\\.${r}\\.|${r}buffer`,Q=({nodeId:r,bufferType:t,title:n})=>{(0,e.useEffect)(()=>{const me=H(t),ce=[`${me}.usage`,`${me}.size`];return ce.forEach(Z=>u.K.add(r,Z)),()=>ce.forEach(Z=>u.K.remove(r,Z))},[r,t]);const{metrics:l}=(0,_e.o)(u.q);if(!(l!=null&&l[r]))return e.createElement(a.$j,null);const c=H(t),f=l[r][`${c}.usage`],y=f?f.metric.value:NaN,D=l[r][`${c}.size`],M=D?D.metric.value:NaN,le=!isNaN(y)&&!isNaN(M)?y/M:0,ie=T.Z.formatPercentage(le);return e.createElement("div",null,e.createElement(P.J,{to:b.ZP.filtered_metrics(r,Ue(t))},e.createElement(s.Button,{bsSize:"xsmall",className:"pull-right"},"Metrics")),e.createElement("h3",null,n),e.createElement(je,null,e.createElement(Ae,{bars:[{value:le*100,bsStyle:"warning",label:ie}]})),e.createElement("span",null,e.createElement("strong",null,y," messages")," in ",n.toLowerCase(),", ",ie," utilized."))};Q.propTypes={bufferType:i().string.isRequired,nodeId:i().string.isRequired,title:i().node.isRequired};const x=Q;var X=o("fVisTAey"),q=o("E+CaPsQD"),Le=Object.defineProperty,xe=(r,t,n)=>t in r?Le(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,k=(r,t,n)=>(xe(r,typeof t!="symbol"?t+"":t,n),n);class ee extends e.Component{constructor(){super(...arguments),k(this,"_toggleMessageProcessing",()=>{confirm(`You are about to ${this.props.information.is_processing?"pause":"resume"} message processing in this node. Are you sure?`)&&(this.props.information.is_processing?C.g.pause(this.props.node.node_id):C.g.resume(this.props.node.node_id))})}render(){const{information:t}=this.props,n=t.lb_status.toUpperCase();let l;return t.is_processing?l=e.createElement("span",null,e.createElement(a.JO,{name:"info-circle"}),"\xA0 ",e.createElement(F,{nodeId:this.props.node.node_id,longFormat:!0})):l=e.createElement("span",null,e.createElement(a.JO,{name:"exclamation-triangle"}),"\xA0 Node is ",e.createElement("strong",null,"not")," processing messages"),e.createElement(s.Row,null,e.createElement(s.Col,{md:4},e.createElement(s.Alert,{bsStyle:"info"},e.createElement("span",{className:"pull-right"}," ",e.createElement(X.eb,{page:q.Z.PAGES.LOAD_BALANCERS,text:"What does this mean?"})),"Lifecycle state: ",e.createElement("strong",null,K.Z.capitalizeFirstLetter(this.props.information.lifecycle)))),e.createElement(s.Col,{md:4},e.createElement(s.Alert,{bsStyle:n==="ALIVE"?"success":"danger"},e.createElement("span",{className:"pull-right"}," ",e.createElement(X.eb,{page:q.Z.PAGES.LOAD_BALANCERS,text:"What does this mean?"})),"Marked as ",e.createElement("strong",null,n)," for load balancers")),e.createElement(s.Col,{md:4},e.createElement(s.Alert,{bsStyle:t.is_processing?"success":"danger"},e.createElement(a.AE,{permissions:"processing:changestate"},e.createElement("span",{className:"pull-right"},e.createElement(s.Button,{onClick:this._toggleMessageProcessing,bsSize:"xsmall",bsStyle:t.is_processing?"danger":"success"},t.is_processing?"Pause":"Resume"," processing"))),l)))}}k(ee,"propTypes",{node:i().object.isRequired,information:i().object.isRequired});const $e=ee;var Be=o("9oVghaOd"),_=o.n(Be),pt=o("gtXNkEXl"),we=o("MdYBRjRJ"),Ze=o("jAGDuYSC"),Fe=o("eFxcQyPT"),Je=o("IA3Ku5lS");const We=(0,Je.dS)("core.Journal",()=>v().createStore({sourceUrl:r=>`/cluster/${r}/journal`,get(r){const t=(0,Fe.ZP)("GET",we.DC(this.sourceUrl(r)));return t.catch(n=>{Ze.Z.error(`Getting journal information on node ${r} failed: ${n}`,"Could not get journal information")}),t}})),Ke=(0,S.default)(U.Z)`
  margin-bottom: 5px;
  margin-top: 10px;

  ${U.$} {
    min-width: 3em;
  }
`,Ge=m()({displayName:"JournalDetails",propTypes:{nodeId:i().string.isRequired},mixins:[v().connect(u.q)],getInitialState(){return{journalInformation:void 0}},componentDidMount(){const{nodeId:r}=this.props;We.get(r).then(t=>{this.setState({journalInformation:t},this._listenToMetrics)})},componentWillUnmount(){const{nodeId:r}=this.props;this.metricNames&&Object.keys(this.metricNames).forEach(t=>u.K.remove(r,this.metricNames[t]))},_listenToMetrics(){const{nodeId:r}=this.props,{journalInformation:t}=this.state;t.enabled&&(this.metricNames={append:"org.graylog2.journal.append.1-sec-rate",read:"org.graylog2.journal.read.1-sec-rate",segments:"org.graylog2.journal.segments",entriesUncommitted:"org.graylog2.journal.entries-uncommitted",utilizationRatio:"org.graylog2.journal.utilization-ratio",oldestSegment:"org.graylog2.journal.oldest-segment"},Object.keys(this.metricNames).forEach(n=>u.K.add(r,this.metricNames[n])))},_isLoading(){const{journalInformation:r,metrics:t}=this.state;return!(t&&r)},render(){if(this._isLoading())return e.createElement(a.$j,{text:"Loading journal metrics..."});const{nodeId:r}=this.props,{metrics:t}=this.state,n=t[r],{journalInformation:l}=this.state;if(!l.enabled)return e.createElement(s.Alert,{bsStyle:"warning"},"The disk journal is disabled on this node.");const c=this.metricNames?E.Z.getValuesForNode(n,this.metricNames):{};if(Object.keys(c).length===0)return e.createElement(s.Alert,{bsStyle:"warning"},"Journal metrics unavailable.");const f=_()(c.oldestSegment);let y;return c.utilizationRatio>=1&&(y=e.createElement("span",null,e.createElement("strong",null,"Warning!")," The journal utilization is exceeding the maximum size defined."," ",e.createElement(P.r,{to:b.ZP.SYSTEM.OVERVIEW},"Click here")," for more information.",e.createElement("br",null))),e.createElement(s.Row,{className:"row-sm"},e.createElement(s.Col,{md:6},e.createElement("h3",null,"Configuration"),e.createElement("dl",{className:"system-journal"},e.createElement("dt",null,"Path:"),e.createElement("dd",null,l.journal_config.directory),e.createElement("dt",null,"Earliest entry:"),e.createElement("dd",null,e.createElement(a.ij,{dateTime:f})),e.createElement("dt",null,"Maximum size:"),e.createElement("dd",null,T.Z.formatBytes(l.journal_config.max_size)),e.createElement("dt",null,"Maximum age:"),e.createElement("dd",null,_().duration(l.journal_config.max_age).format("d [days] h [hours] m [minutes]")),e.createElement("dt",null,"Flush policy:"),e.createElement("dd",null,"Every ",d()(l.journal_config.flush_interval).format("0,0")," messages"," ","or ",_().duration(l.journal_config.flush_age).format("h [hours] m [minutes] s [seconds]")))),e.createElement(s.Col,{md:6},e.createElement("h3",null,"Utilization"),e.createElement(Ke,{bars:[{value:c.utilizationRatio*100,label:T.Z.formatPercentage(c.utilizationRatio)}]}),y,e.createElement("strong",null,d()(c.entriesUncommitted).format("0,0")," unprocessed messages")," ","are currently in the journal, in ",c.segments," segments.",e.createElement("br",null),e.createElement("strong",null,d()(c.append).format("0,0")," messages")," ","have been appended in the last second,"," ",e.createElement("strong",null,d()(c.read).format("0,0")," messages")," have been read in the last second."))}});var ze=Object.defineProperty,Ye=(r,t,n)=>t in r?ze(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,te=(r,t,n)=>(Ye(r,typeof t!="symbol"?t+"":t,n),n);const re=()=>({time:_()()}),Ve=S.default.dl`
  margin-top: 5px;
  margin-bottom: 0;

  dt {
    float: left;
  }

  dd {
    margin-left: 95px;
  }
`;class $ extends e.Component{constructor(t){super(t),this.state=re()}componentDidMount(){this.interval=setInterval(()=>this.setState(re()),1e3)}componentWillUnmount(){clearTimeout(this.interval)}render(){const{systemInformation:{hostname:t,version:n,codename:l,timezone:c},jvmInformation:f,node:y}=this.props,{time:D}=this.state;let M;return f?M=e.createElement("span",null,"PID ",f.pid,", ",f.info):M=e.createElement("span",null,"JMV information for this node is unavailable."),e.createElement(Ve,null,e.createElement("dt",null,"Hostname:"),e.createElement("dd",null,t),e.createElement("dt",null,"Node ID:"),e.createElement("dd",null,y.node_id),e.createElement("dt",null,"Version:"),e.createElement("dd",null,n,", codename ",e.createElement("em",null,l)),e.createElement("dt",null,"JVM:"),e.createElement("dd",null,M),e.createElement("dt",null,"Time:"),e.createElement("dd",null,e.createElement(a.EK,{dateTime:D,format:"withTz",tz:c})))}}te($,"propTypes",{node:i().object.isRequired,systemInformation:i().object.isRequired,jvmInformation:i().object}),te($,"defaultProps",{jvmInformation:void 0});const He=$;var Qe=o("4IfE3Ihm");const Xe=S.default.dl`
  margin-top: 5px;
  margin-bottom: 0;

  dt {
    float: left;
  }

  dd {
    margin-left: 150px;
  }
`,ne=({node:r})=>{const{transport_address:t,last_seen:n}=r;return e.createElement(Xe,null,e.createElement("dt",null,"Transport address:"),e.createElement("dd",null,t),e.createElement("dt",null,"Last seen:"),e.createElement("dd",null,e.createElement(Qe.Z,{dateTime:n})))};ne.propTypes={node:i().object.isRequired};const qe=ne;var ke=Object.defineProperty,et=(r,t,n)=>t in r?ke(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,B=(r,t,n)=>(et(r,typeof t!="symbol"?t+"":t,n),n);class se extends e.Component{constructor(){super(...arguments),B(this,"_headerCellFormatter",t=>e.createElement("th",null,t)),B(this,"_pluginInfoFormatter",t=>e.createElement("tr",{key:t.name},e.createElement("td",{className:"limited"},t.name),e.createElement("td",{className:"limited"},t.version),e.createElement("td",{className:"limited"},t.author),e.createElement("td",{className:"limited",style:{width:"50%"}},t.description,"\xA0\xA0",e.createElement(a.dL,{href:t.url,style:{marginLeft:10}},"Website"))))}render(){if(!this.props.plugins)return e.createElement(a.$j,{text:"Loading plugins on this node..."});if(this.props.plugins.length===0)return e.createElement(s.Alert,{bsStyle:"info"},"This node has not any installed plugins.");const t=["Name","Version","Author","Description"];return e.createElement(a.wQ,{id:"plugin-list",rowClassName:"row-sm",className:"table-hover table-condensed table-striped",headers:t,headerCellFormatter:this._headerCellFormatter,sortByKey:"name",rows:this.props.plugins,dataRowFormatter:this._pluginInfoFormatter,filterLabel:"Filter",filterKeys:[]})}}B(se,"propTypes",{plugins:i().array});const tt=se;var rt=Object.defineProperty,nt=(r,t,n)=>t in r?rt(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,w=(r,t,n)=>(nt(r,typeof t!="symbol"?t+"":t,n),n);class oe extends e.Component{constructor(){super(...arguments),w(this,"_headerCellFormatter",t=>e.createElement("th",null,t)),w(this,"_inputTypeFormatter",t=>e.createElement("tr",{key:t.type},e.createElement("td",{className:"limited"},t.name),e.createElement("td",{className:"limited"},t.type),e.createElement("td",{className:"limited",style:{width:150}},t.link_to_docs&&e.createElement(a.dL,{href:t.link_to_docs},"Documentation"))))}render(){if(!this.props.inputDescriptions)return e.createElement(a.$j,{text:"Loading input types..."});if(Object.keys(this.props.inputDescriptions).length===0)return e.createElement(s.Alert,{bsStyle:"warning"},"Input types are unavailable.");const t=["Name","Type","Documentation"],n=Object.keys(this.props.inputDescriptions).map(l=>this.props.inputDescriptions[l]);return e.createElement(a.wQ,{id:"input-types-list",rowClassName:"row-sm",className:"table-hover table-condensed table-striped",headers:t,headerCellFormatter:this._headerCellFormatter,sortByKey:"name",rows:n,dataRowFormatter:this._inputTypeFormatter,filterLabel:"Filter",filterKeys:[]})}}w(oe,"propTypes",{inputDescriptions:i().object});const st=oe;var ot=Object.defineProperty,at=(r,t,n)=>t in r?ot(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,lt=(r,t,n)=>(at(r,typeof t!="symbol"?t+"":t,n),n);class ae extends e.Component{render(){const{node:t}=this.props,{systemOverview:n}=this.props;let l;this.props.plugins&&(l=`${this.props.plugins.length} plugins installed`);let c;return this.props.inputStates&&(c=`${this.props.inputStates.filter(y=>y.state.toUpperCase()==="RUNNING").length} inputs running on this node`),e.createElement("div",null,e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement($e,{node:t,information:n}))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement("h2",{style:{marginBottom:5}},"Memory/Heap usage"),e.createElement(z,{nodeId:t.node_id}))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement("h2",null,"Buffers"),e.createElement("p",{className:"description"},"Buffers are built to cache small amounts of messages for a very short time (usually milliseconds) on their way through the different processors."),e.createElement(s.Row,null,e.createElement(s.Col,{md:4},e.createElement(x,{nodeId:t.node_id,title:"Input buffer",bufferType:"input"})),e.createElement(s.Col,{md:4},e.createElement(x,{nodeId:t.node_id,title:"Process buffer",bufferType:"process"})),e.createElement(s.Col,{md:4},e.createElement(x,{nodeId:t.node_id,title:"Output buffer",bufferType:"output"}))))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement("h2",null,"Disk Journal"),e.createElement("p",{className:"description"},"Incoming messages are written to the disk journal to ensure they are kept safe in case of a server failure. The journal also helps keeping Graylog working if any of the outputs is too slow to keep up with the message rate or whenever there is a peak in incoming messages. It makes sure that Graylog does not buffer all of those messages in main memory and avoids overly long garbage collection pauses that way."),e.createElement(Ge,{nodeId:t.node_id}))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:6},e.createElement("h2",null,"System"),e.createElement(He,{node:t,systemInformation:n,jvmInformation:this.props.jvmInformation})),e.createElement(s.Col,{md:6},e.createElement("h2",null,"REST API"),e.createElement(qe,{node:t}))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement("h2",null,"Installed plugins ",e.createElement("small",null,l)),e.createElement(tt,{plugins:this.props.plugins}))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:12},e.createElement(j.Z,null,e.createElement("span",{className:"pull-right"},e.createElement(P.J,{to:b.ZP.node_inputs(t.node_id)},e.createElement(s.Button,{bsStyle:"success",bsSize:"small"},"Manage inputs")))),e.createElement("h2",{style:{marginBottom:15}},"Available input types ",e.createElement("small",null,c)),e.createElement(st,{inputDescriptions:this.props.inputDescriptions}))))}}lt(ae,"propTypes",{node:i().object.isRequired,systemOverview:i().object.isRequired,jvmInformation:i().object,plugins:i().array,inputDescriptions:i().object,inputStates:i().array});const it=ae},"5qbhaJ1A":(R,N,o)=>{o.d(N,{Z:()=>i});const i={getValuesForNode(e,p){if(e==null||Object.keys(e).length===0)return{};const m={};return Object.keys(p).forEach(h=>{const v=p[h],s=e[v];s&&(s.type==="gauge"?m[h]=s.metric.value:s.type==="counter"?m[h]=s.metric.count:s.type==="meter"||s.type==="timer"?m[h]=s.metric.rate.total:m[h]=null)}),m}}},WE0xQIRH:(R,N,o)=>{o.d(N,{i:()=>I});var O=o("JnTtTRmZ"),i=o.n(O),e=o("MdYBRjRJ"),p=o("jAGDuYSC"),m=o("eFxcQyPT"),h=o("IA3Ku5lS"),v=o("Vg8s2y9S"),s=o("+pX1WsJ3"),a=o("l8PdZtMi");const I=(0,h.dS)("core.ClusterOverview",()=>i().createStore({sourceUrl:"/cluster",clusterOverview:void 0,init(){this.cluster(),this.listenTo(a.g,this.cluster),this.listenTo(s.t,this.cluster),this.listenTo(v.S,this.cluster)},getInitialState(){return{clusterOverview:this.clusterOverview}},cluster(){const g=(0,m.vl)("GET",e.DC(this.sourceUrl));return g.then(d=>{this.clusterOverview=d,this.trigger({clusterOverview:this.clusterOverview})},d=>p.Z.error(`Getting cluster overview failed: ${d}`,"Could not get cluster overview")),g},threadDump(g){return(0,m.ZP)("GET",e.DC(`${this.sourceUrl}/${g}/threaddump`)).then(E=>E.threaddump,E=>p.Z.error(`Getting thread dump for node '${g}' failed: ${E}`,"Could not get thread dump"))},processbufferDump(g){return(0,m.ZP)("GET",e.DC(`${this.sourceUrl}/${g}/processbufferdump`)).then(E=>E.processbuffer_dump,E=>p.Z.error(`Getting process buffer dump for node '${g}' failed: ${E}`,"Could not get process buffer dump"))},systemLogs(g,d){return(0,m.wR)("GET",e.DC(`${this.sourceUrl}/system/loggers/messages/recent/${g}?limit=${d}`)).then(u=>u,u=>p.Z.error(`Getting system log messages for node '${g}' failed: ${u}`,"Could not get system log messages"))},jvm(g){const d=(0,m.ZP)("GET",e.DC(`${this.sourceUrl}/${g}/jvm`));return d.catch(E=>p.Z.error(`Getting JVM information for node '${g}' failed: ${E}`,"Could not get JVM information")),d}}))},"+pX1WsJ3":(R,N,o)=>{o.d(N,{t:()=>v});var O=o("JnTtTRmZ"),i=o.n(O),e=o("MdYBRjRJ"),p=o("jAGDuYSC"),m=o("eFxcQyPT"),h=o("IA3Ku5lS");const v=(0,h.dS)("core.SystemLoadBalancer",()=>i().createStore({sourceUrl:s=>`/cluster/${s}/lbstatus`,override(s,a){return(0,m.ZP)("PUT",e.DC(`${this.sourceUrl(s)}/override/${a}`)).then(()=>{this.trigger({}),p.Z.success(`Load balancer status successfully changed do '${a}' in node '${s}'`)},I=>{p.Z.error(`Changing load balancer status in '${s}' failed: ${I}`,`Could not change load balancer status to '${a}' in node '${s}'`)})}}))},l8PdZtMi:(R,N,o)=>{o.d(N,{g:()=>v});var O=o("JnTtTRmZ"),i=o.n(O),e=o("MdYBRjRJ"),p=o("jAGDuYSC"),m=o("eFxcQyPT"),h=o("IA3Ku5lS");const v=(0,h.dS)("core.SystemProcessing",()=>i().createStore({sourceUrl:s=>`/cluster/${s}/processing`,pause(s){return(0,m.ZP)("POST",e.DC(`${this.sourceUrl(s)}/pause`)).then(()=>{this.trigger({}),p.Z.success(`Message processing paused successfully in '${s}'`)},a=>{p.Z.error(`Pausing message processing in '${s}' failed: ${a}`,`Could not pause message processing in node '${s}'`)})},resume(s){return(0,m.ZP)("POST",e.DC(`${this.sourceUrl(s)}/resume`)).then(()=>{this.trigger({}),p.Z.success(`Message processing resumed successfully in '${s}'`)},a=>{p.Z.error(`Resuming message processing in '${s}' failed: ${a}`,`Could not resume message processing in node '${s}'`)})}}))}}]);})();

//# sourceMappingURL=1255d548-7691.29f9482a4a76cf88fd19.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy