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

web-interface.assets.bb8c8232-5266.bfbe8e2fa99ffb2a9b9b.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([["bb8c8232-5266"],{"/7uHmzM0":(C,P,o)=>{o.d(P,{dk:()=>Re,GH:()=>it,Op:()=>Oe});var M=o("ii0bleBb"),i=o.n(M),e=o("Z7aTuO5B"),g=o("D4SbLiE/"),u=o.n(g),A=o("JnTtTRmZ"),b=o.n(A),s=o("rIl5IEuP"),a=o("IOI9nV80"),T=o("WE0xQIRH"),p=o("9pdI12pI"),c=o.n(p),E=o("5qbhaJ1A"),d=o("woUyHGxd");const F=u()({displayName:"NodeThroughput",propTypes:{nodeId:i().string.isRequired,longFormat:i().bool},mixins:[b().connect(d.$)],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=>d.p.add(this.props.nodeId,this.metricNames[r]))},componentWillUnmount(){Object.keys(this.metricNames).forEach(r=>d.p.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,c()(r.totalIn).format("0,0"))," incoming and ",e.createElement("strong",null,c()(r.totalOut).format("0,0"))," outgoing msg/s."):e.createElement("span",null,"In ",c()(r.totalIn).format("0,0")," / Out ",c()(r.totalOut).format("0,0")," msg/s.")},render(){if(this._isLoading())return e.createElement(a.y$,{text:"Loading throughput..."});const{nodeId:r}=this.props,t=this.state.metrics[r],n=E.A.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"),G=o.n(de),ue=o("CrIFpfDF"),y=o("ty2gyrHp"),v=o("d4kzUuQm"),j=o("8wYeYPUw"),pe=o("+pX1WsJ3"),D=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,_=(r,t,n)=>(Ee(r,typeof t!="symbol"?t+"":t,n),n);class J extends e.Component{constructor(){super(...arguments),_(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?D.W.pause(n.node_id):D.W.resume(n.node_id))}),_(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.R.override(n.node_id,t)}})}render(){const{systemOverview:t,node:n}=this.props,l=new(G())(`${n.transport_address}/api-browser/`).normalizePathname().toString();return e.createElement(ue.A,null,e.createElement(y.m,{to:v.Ay.SYSTEM.NODES.SHOW(n.node_id)},e.createElement(s.Button,null,"Details")),e.createElement(y.m,{to:v.Ay.SYSTEM.METRICS(n.node_id)},e.createElement(s.Button,null,"Metrics")),e.createElement(a.yr,{href:l},"API browser"),e.createElement(s.DropdownButton,{title:"More actions",id:`more-actions-dropdown-${n.node_id}`,pullRight:!0},e.createElement(a.Wj,{permissions:"processing:changestate"},e.createElement(s.MenuItem,{onSelect:this._toggleMessageProcessing},t.is_processing?"Pause":"Resume"," message processing")),e.createElement(a.Wj,{permissions:"lbstatus:change"},e.createElement(a.bj,{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.Wj,{permissions:["processing:changestate","lbstatus:change","node:shutdown"],anyPermissions:!0},e.createElement(a.Wj,{permissions:["inputs:read","threads:dump"],anyPermissions:!0},e.createElement(s.MenuItem,{divider:!0}))),e.createElement(j.A,null,e.createElement(a.Wj,{permissions:"inputs:read"},e.createElement(y.m,{to:v.Ay.node_inputs(n.node_id)},e.createElement(s.MenuItem,null,"Local message inputs")))),e.createElement(a.Wj,{permissions:"threads:dump"},e.createElement(y.m,{to:v.Ay.SYSTEM.THREADDUMP(n.node_id)},e.createElement(s.MenuItem,null,"Get thread dump"))),e.createElement(a.Wj,{permissions:"processbuffer:dump"},e.createElement(y.m,{to:v.Ay.SYSTEM.PROCESSBUFFERDUMP(n.node_id)},e.createElement(s.MenuItem,null,"Get process-buffer dump"))),e.createElement(a.Wj,{permissions:"loggersmessages:read"},e.createElement(y.m,{to:v.Ay.SYSTEM.SYSTEMLOGS(n.node_id)},e.createElement(s.MenuItem,null,"Get recent system log messages")))))}}_(J,"propTypes",{node:i().object.isRequired,systemOverview:i().object.isRequired});const he=J;var S=o("J6y4/h8P"),z=o("TJOheZRu");const fe=S.default.dl`
  margin-top: 0;
  margin-bottom: 0;

  dt {
    float: left;
  }

  dd {
    margin-left: 180px;
  }
`,K=({information:r})=>{const t=r.lb_status.toUpperCase();return e.createElement(fe,null,e.createElement("dt",null,"Current lifecycle state:"),e.createElement("dd",null,z.A.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))};K.propTypes={information:i().object.isRequired};const ye=K;var U=o("e5reO9iR"),I=o("zkmy/ViL");const ve=S.default.div`
  margin-top: 10px;

  p {
    margin-bottom: 0;
  }
`,$=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]};
  }
`),be=(0,S.default)(U.A)`
  height: 25px;
  margin-bottom: 5px;
`,H=u()({displayName:"JvmHeapUsage",propTypes:{nodeId:i().string.isRequired},mixins:[b().connect(d.$)],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=>d.p.add(r,this.metricNames[t]))},componentWillUnmount(){const{nodeId:r}=this.props;Object.keys(this.metricNames).forEach(t=>d.p.remove(r,this.metricNames[t]))},_extractMetricValues(){const{nodeId:r}=this.props,{metrics:t}=this.state;if(t&&t[r]){const n=E.A.getValuesForNode(t[r],this.metricNames),{maxMemory:l,usedMemory:m,committedMemory:h}=n;return l?(n.usedPercentage=l===0?0:Math.ceil(m/l*100),n.committedPercentage=l===0?0:Math.ceil(h/l*100),n):{usedPercentage:0,committedPercentage:0}}return{}},render(){const{nodeId:r}=this.props,t=this._extractMetricValues(),{usedPercentage:n,committedPercentage:l,usedMemory:m,committedMemory:h,maxMemory:f}=t;let O=[{value:0}],N=e.createElement("p",null,e.createElement(a.y$,{text:"Loading heap usage information..."}));return(n||l)&&(Object.keys(t).length===0?N=e.createElement("p",null,"Heap information unavailable."):(O=[{value:n,bsStyle:"primary"},{value:l-n,bsStyle:"warning"}],N=e.createElement("p",null,"The JVM is using"," ",e.createElement($,{className:"used-memory"}),e.createElement("strong",null," ",I.A.formatBytes(m))," ","of"," ",e.createElement($,{className:"committed-memory"}),e.createElement("strong",null," ",I.A.formatBytes(h))," ","heap space and will not attempt to use more than"," ",e.createElement($,{className:"max-memory"}),e.createElement("strong",null," ",I.A.formatBytes(f))))),e.createElement(ve,{"data-node-id":r},e.createElement(be,{bars:O}),N)}}),Se=u()({displayName:"JournalState",propTypes:{nodeId:i().string.isRequired},mixins:[b().connect(d.$)],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=>d.p.add(this.props.nodeId,this.metricNames[r]))},componentWillUnmount(){Object.keys(this.metricNames).forEach(r=>d.p.remove(this.props.nodeId,this.metricNames[r]))},_isLoading(){return!this.state.metrics},render(){if(this._isLoading())return e.createElement(a.y$,{text:"Loading journal metrics..."});const{nodeId:r}=this.props,t=this.state.metrics[r],n=E.A.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,c()(n.entriesUncommitted).format("0,0")," unprocessed messages")," in ",n.segments," ",e.createElement(a.Fb,{value:n.segments,singular:"segment",plural:"segments"}),"."," ",e.createElement("strong",null,c()(n.append).format("0,0")," messages")," appended, ",e.createElement("strong",null,c()(n.read).format("0,0")," messages")," read in the last second.")}});var Ne=Object.defineProperty,Pe=(r,t,n)=>t in r?Ne(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,Me=(r,t,n)=>(Pe(r,typeof t!="symbol"?t+"":t,n),n);class Y extends e.Component{render(){const{node:t}=this.props,n=e.createElement(a.Gk,{nodeId:t.node_id});if(!this.props.systemOverview)return e.createElement(a.z5,{key:`entry-list-${t.node_id}`,title:n,description:"System information is currently unavailable."});const l=e.createElement(F,{nodeId:t.node_id}),m=e.createElement(Se,{nodeId:t.node_id}),h=e.createElement(he,{node:t,systemOverview:this.props.systemOverview}),f=e.createElement("div",null,e.createElement(s.Col,{md:3},e.createElement(ye,{information:this.props.systemOverview})),e.createElement(s.Col,{md:9},e.createElement(H,{nodeId:this.props.node.node_id})));return e.createElement(a.z5,{key:`entry-list-${t.node_id}`,title:n,titleSuffix:l,description:m,actions:h,contentRow:f})}}Me(Y,"propTypes",{node:i().object.isRequired,systemOverview:i().object});const Ae=Y,Oe=u()({displayName:"NodesList",propTypes:{permissions:i().array.isRequired,nodes:i().object},mixins:[b().connect(T.T)],_isLoading(){const{nodes:r}=this.props,{clusterOverview:t}=this.state;return!(r&&t)},_formatNodes(r,t){return Object.keys(r).map(l=>e.createElement(Ae,{key:l,node:r[l],systemOverview:t[l]}))},render(){if(this._isLoading())return e.createElement(a.y$,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.Fb,{value:r,singular:"is",plural:"are"})," ",r," active ",e.createElement(a.Fb,{value:r,singular:"node",plural:"nodes"})),e.createElement(a.b2,{bsNoItemsStyle:"info",noItemsText:"There are no active nodes.",items:this._formatNodes(this.props.nodes,this.state.clusterOverview)})))}});var Ie=Object.defineProperty,Te=(r,t,n)=>t in r?Ie(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,De=(r,t,n)=>(Te(r,typeof t!="symbol"?t+"":t,n),n);class V extends e.Component{render(){const{node:t}=this.props,n=new(G())(`${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.Wj,{permissions:"threads:dump"},e.createElement(y.m,{to:v.Ay.SYSTEM.THREADDUMP(t.node_id)},e.createElement(s.MenuItem,null,"Get thread dump"))),e.createElement(a.Wj,{permissions:"processbuffer:dump"},e.createElement(y.m,{to:v.Ay.SYSTEM.PROCESSBUFFERDUMP(t.node_id)},e.createElement(s.MenuItem,null,"Get process-buffer dump"))),e.createElement(y.m,{to:v.Ay.SYSTEM.METRICS(t.node_id)},e.createElement(s.MenuItem,null,"Metrics")),e.createElement(j.A,null,e.createElement(a.Wj,{permissions:"loggers:read"},e.createElement(y.m,{to:v.Ay.SYSTEM.LOGGING},e.createElement(s.MenuItem,null,"Configure internal logging")))),e.createElement(s.MenuItem,{href:n,target:"_blank"},e.createElement(a.Gr,null,"API Browser"))))}}De(V,"propTypes",{node:i().object.isRequired});const Re=V;var Ce=o("8fnsnG21");const je=S.default.div(({theme:r})=>(0,S.css)`
  margin-top: ${r.spacings.sm};
  margin-bottom: ${r.spacings.xs};
`),_e=(0,S.default)(a.z2)(({theme:r})=>(0,S.css)`
  margin-bottom: ${r.spacings.xs};
`),Q=r=>`org.graylog2.buffers.${r}`,Ue=r=>`org\\.graylog2\\.buffers\\.${r}\\.|${r}buffer`,Z=({nodeId:r,bufferType:t,title:n})=>{(0,e.useEffect)(()=>{const me=Q(t),ce=[`${me}.usage`,`${me}.size`];return ce.forEach(W=>d.p.add(r,W)),()=>ce.forEach(W=>d.p.remove(r,W))},[r,t]);const{metrics:l}=(0,Ce.P)(d.$);if(!(l!=null&&l[r]))return e.createElement(a.y$,null);const m=Q(t),h=l[r][`${m}.usage`],f=h?h.metric.value:NaN,O=l[r][`${m}.size`],N=O?O.metric.value:NaN,le=!isNaN(f)&&!isNaN(N)?f/N:0,ie=I.A.formatPercentage(le);return e.createElement("div",null,e.createElement(y.m,{to:v.Ay.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(_e,{bars:[{value:le*100,bsStyle:"warning",label:ie}]})),e.createElement("span",null,e.createElement("strong",null,f," messages")," in ",n.toLowerCase(),", ",ie," utilized."))};Z.propTypes={bufferType:i().string.isRequired,nodeId:i().string.isRequired,title:i().node.isRequired};const x=Z;var X=o("fVisTAey"),k=o("E+CaPsQD"),$e=Object.defineProperty,xe=(r,t,n)=>t in r?$e(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,q=(r,t,n)=>(xe(r,typeof t!="symbol"?t+"":t,n),n);class ee extends e.Component{constructor(){super(...arguments),q(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?D.W.pause(this.props.node.node_id):D.W.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.In,{name:"info"}),"\xA0 ",e.createElement(F,{nodeId:this.props.node.node_id,longFormat:!0})):l=e.createElement("span",null,e.createElement(a.In,{name:"warning"}),"\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.$,{page:k.A.PAGES.LOAD_BALANCERS,text:"What does this mean?"})),"Lifecycle state: ",e.createElement("strong",null,z.A.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.$,{page:k.A.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.Wj,{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)))}}q(ee,"propTypes",{node:i().object.isRequired,information:i().object.isRequired});const Le=ee;var Be=o("9oVghaOd"),R=o.n(Be),pt=o("gtXNkEXl"),we=o("MdYBRjRJ"),We=o("jAGDuYSC"),Fe=o("eFxcQyPT"),Ge=o("IA3Ku5lS");const Je=(0,Ge.Bv)("core.Journal",()=>b().createStore({sourceUrl:r=>`/cluster/${r}/journal`,get(r){const t=(0,Fe.Ay)("GET",we.H3(this.sourceUrl(r)));return t.catch(n=>{We.A.error(`Getting journal information on node ${r} failed: ${n}`,"Could not get journal information")}),t}})),ze=(0,S.default)(U.A)`
  margin-bottom: 5px;
  margin-top: 10px;

  ${U.y} {
    min-width: 3em;
  }
`,Ke=u()({displayName:"JournalDetails",propTypes:{nodeId:i().string.isRequired},mixins:[b().connect(d.$)],getInitialState(){return{journalInformation:void 0}},componentDidMount(){const{nodeId:r}=this.props;Je.get(r).then(t=>{this.setState({journalInformation:t},this._listenToMetrics)})},componentWillUnmount(){const{nodeId:r}=this.props;this.metricNames&&Object.keys(this.metricNames).forEach(t=>d.p.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=>d.p.add(r,this.metricNames[n])))},_isLoading(){const{journalInformation:r,metrics:t}=this.state;return!(t&&r)},render(){if(this._isLoading())return e.createElement(a.y$,{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 m=this.metricNames?E.A.getValuesForNode(n,this.metricNames):{};if(Object.keys(m).length===0)return e.createElement(s.Alert,{bsStyle:"warning"},"Journal metrics unavailable.");const h=R()(m.oldestSegment);let f;return m.utilizationRatio>=1&&(f=e.createElement("span",null,e.createElement("strong",null,"Warning!")," The journal utilization is exceeding the maximum size defined."," ",e.createElement(y.N,{to:v.Ay.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.sR,{dateTime:h})),e.createElement("dt",null,"Maximum size:"),e.createElement("dd",null,I.A.formatBytes(l.journal_config.max_size)),e.createElement("dt",null,"Maximum age:"),e.createElement("dd",null,R().duration(l.journal_config.max_age).format("d [days] h [hours] m [minutes]")),e.createElement("dt",null,"Flush policy:"),e.createElement("dd",null,"Every ",c()(l.journal_config.flush_interval).format("0,0")," messages"," ","or ",R().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(ze,{bars:[{value:m.utilizationRatio*100,label:I.A.formatPercentage(m.utilizationRatio)}]}),f,e.createElement("strong",null,c()(m.entriesUncommitted).format("0,0")," unprocessed messages")," ","are currently in the journal, in ",m.segments," segments.",e.createElement("br",null),e.createElement("strong",null,c()(m.append).format("0,0")," messages")," ","have been appended in the last second,"," ",e.createElement("strong",null,c()(m.read).format("0,0")," messages")," have been read in the last second."))}});var He=Object.defineProperty,Ye=(r,t,n)=>t in r?He(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:R()()}),Ve=S.default.dl`
  margin-top: 5px;
  margin-bottom: 0;

  dt {
    float: left;
  }

  dd {
    margin-left: 95px;
  }
`;class L 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:m},jvmInformation:h,node:f}=this.props,{time:O}=this.state;let N;return h?N=e.createElement("span",null,"PID ",h.pid,", ",h.info):N=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,f.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,N),e.createElement("dt",null,"Time:"),e.createElement("dd",null,e.createElement(a.Dc,{dateTime:O,format:"withTz",tz:m})))}}te(L,"propTypes",{node:i().object.isRequired,systemInformation:i().object.isRequired,jvmInformation:i().object}),te(L,"defaultProps",{jvmInformation:void 0});const Qe=L;var Ze=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(Ze.A,{dateTime:n})))};ne.propTypes={node:i().object.isRequired};const ke=ne;var qe=Object.defineProperty,et=(r,t,n)=>t in r?qe(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.Gr,{href:t.url,style:{marginLeft:10}},"Website"))))}render(){if(!this.props.plugins)return e.createElement(a.y$,{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.bQ,{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.Gr,{href:t.link_to_docs},"Documentation"))))}render(){if(!this.props.inputDescriptions)return e.createElement(a.y$,{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.bQ,{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 m;return this.props.inputStates&&(m=`${this.props.inputStates.filter(f=>f.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(Le,{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(H,{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(Ke,{nodeId:t.node_id}))),e.createElement(s.Row,{className:"content"},e.createElement(s.Col,{md:6},e.createElement("h2",null,"System"),e.createElement(Qe,{node:t,systemInformation:n,jvmInformation:this.props.jvmInformation})),e.createElement(s.Col,{md:6},e.createElement("h2",null,"REST API"),e.createElement(ke,{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.A,null,e.createElement("span",{className:"pull-right"},e.createElement(y.m,{to:v.Ay.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,m)),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},WE0xQIRH:(C,P,o)=>{o.d(P,{T:()=>T});var M=o("JnTtTRmZ"),i=o.n(M),e=o("MdYBRjRJ"),g=o("jAGDuYSC"),u=o("eFxcQyPT"),A=o("IA3Ku5lS"),b=o("Vg8s2y9S"),s=o("+pX1WsJ3"),a=o("l8PdZtMi");const T=(0,A.Bv)("core.ClusterOverview",()=>i().createStore({sourceUrl:"/cluster",clusterOverview:void 0,init(){this.cluster(),this.listenTo(a.W,this.cluster),this.listenTo(s.R,this.cluster),this.listenTo(b.j,this.cluster)},getInitialState(){return{clusterOverview:this.clusterOverview}},cluster(){const p=(0,u.Ur)("GET",e.H3(this.sourceUrl));return p.then(c=>{this.clusterOverview=c,this.trigger({clusterOverview:this.clusterOverview})},c=>g.A.error(`Getting cluster overview failed: ${c}`,"Could not get cluster overview")),p},threadDump(p){return(0,u.Ay)("GET",e.H3(`${this.sourceUrl}/${p}/threaddump`)).then(E=>E.threaddump,E=>g.A.error(`Getting thread dump for node '${p}' failed: ${E}`,"Could not get thread dump"))},processbufferDump(p){return(0,u.Ay)("GET",e.H3(`${this.sourceUrl}/${p}/processbufferdump`)).then(E=>E.processbuffer_dump,E=>g.A.error(`Getting process buffer dump for node '${p}' failed: ${E}`,"Could not get process buffer dump"))},systemLogs(p,c){return(0,u.gB)("GET",e.H3(`${this.sourceUrl}/system/loggers/messages/recent/${p}?limit=${c}`)).then(d=>d,d=>g.A.error(`Getting system log messages for node '${p}' failed: ${d}`,"Could not get system log messages"))},jvm(p){const c=(0,u.Ay)("GET",e.H3(`${this.sourceUrl}/${p}/jvm`));return c.catch(E=>g.A.error(`Getting JVM information for node '${p}' failed: ${E}`,"Could not get JVM information")),c}}))},"+pX1WsJ3":(C,P,o)=>{o.d(P,{R:()=>b});var M=o("JnTtTRmZ"),i=o.n(M),e=o("MdYBRjRJ"),g=o("jAGDuYSC"),u=o("eFxcQyPT"),A=o("IA3Ku5lS");const b=(0,A.Bv)("core.SystemLoadBalancer",()=>i().createStore({sourceUrl:s=>`/cluster/${s}/lbstatus`,override(s,a){return(0,u.Ay)("PUT",e.H3(`${this.sourceUrl(s)}/override/${a}`)).then(()=>{this.trigger({}),g.A.success(`Load balancer status successfully changed do '${a}' in node '${s}'`)},T=>{g.A.error(`Changing load balancer status in '${s}' failed: ${T}`,`Could not change load balancer status to '${a}' in node '${s}'`)})}}))},l8PdZtMi:(C,P,o)=>{o.d(P,{W:()=>b});var M=o("JnTtTRmZ"),i=o.n(M),e=o("MdYBRjRJ"),g=o("jAGDuYSC"),u=o("eFxcQyPT"),A=o("IA3Ku5lS");const b=(0,A.Bv)("core.SystemProcessing",()=>i().createStore({sourceUrl:s=>`/cluster/${s}/processing`,pause(s){return(0,u.Ay)("POST",e.H3(`${this.sourceUrl(s)}/pause`)).then(()=>{this.trigger({}),g.A.success(`Message processing paused successfully in '${s}'`)},a=>{g.A.error(`Pausing message processing in '${s}' failed: ${a}`,`Could not pause message processing in node '${s}'`)})},resume(s){return(0,u.Ay)("POST",e.H3(`${this.sourceUrl(s)}/resume`)).then(()=>{this.trigger({}),g.A.success(`Message processing resumed successfully in '${s}'`)},a=>{g.A.error(`Resuming message processing in '${s}' failed: ${a}`,`Could not resume message processing in node '${s}'`)})}}))}}]);})();

//# sourceMappingURL=bb8c8232-5266.bfbe8e2fa99ffb2a9b9b.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy