web-interface.assets.bb8c8232-5336.aa2b9c2fe1d44614db07.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["bb8c8232-5336"],{"y4tK+AhI":(U,_,t)=>{t.d(_,{A:()=>i});var e=t("Z7aTuO5B"),O=t("9pdI12pI"),m=t.n(O),M=t("9oVghaOd"),h=t.n(M),u=t("J6y4/h8P"),I=t("ty2gyrHp"),c=t("rIl5IEuP"),p=t("IOI9nV80"),o=t("E+CaPsQD"),P=t("d4kzUuQm"),f=t("fVisTAey"),D=t("l5XbR7Md"),L=Object.defineProperty,v=(a,s,E)=>s in a?L(a,s,{enumerable:!0,configurable:!0,writable:!0,value:E}):a[s]=E,g=(a,s,E)=>(v(a,typeof s!="symbol"?s+"":s,E),E);const A=u.default.div`
display: flex;
justify-content: space-between;
`,x=a=>a===0?"No failed indexing attempts in the last 24 hours.":e.createElement("strong",null,"There were ",m()(a).format("0,0")," failed indexing attempts in the last 24 hours.");class d extends e.Component{constructor(s){super(s),g(this,"_formatFailuresSummary",()=>e.createElement(c.Alert,{bsStyle:this.state.total===0?"success":"danger"},x(this.state.total),e.createElement(I.m,{to:P.Ay.SYSTEM.INDICES.FAILURES},e.createElement(c.Button,{bsStyle:"info",bsSize:"xs",className:"pull-right"},"Show errors")))),this.state={}}componentDidMount(){const s=h()().subtract(24,"hours");D.a.count(s).then(E=>{this.setState({total:E.count})})}render(){let s;return this.state.total===void 0?s=e.createElement(p.y$,null):s=this._formatFailuresSummary(),e.createElement(c.Row,{className:"content"},e.createElement(c.Col,{md:12},e.createElement(A,null,e.createElement("h2",null,"Indexer failures"),e.createElement(f.$,{page:o.A.PAGES.INDEXER_FAILURES,text:"Indexer failures documentation",displayIcon:!0})),e.createElement("p",{className:"description"},"Every message that was not successfully indexed will be logged as an indexer failure."),s))}}const i=d},kEBMGmbZ:(U,_,t)=>{t.d(_,{gp:()=>E,g7:()=>K,O5:()=>H,ht:()=>J});var e=t("Z7aTuO5B"),O=t("DUKaTDO2"),m=t("J6y4/h8P"),M=t("yGRmSjYM"),h=t("IOI9nV80"),u=t("rIl5IEuP"),I=t("fVisTAey"),c=t("E+CaPsQD"),p=t("U1Iufsob"),o=t("eFxcQyPT"),P=t("MdYBRjRJ"),f=t("q2j1bVbz");const D=(0,m.default)(u.Alert)`
margin-top: 10px;
margin-bottom: 5px;
`,v=({error:n})=>e.createElement(D,{bsStyle:"danger"},"Could not retrieve Elasticsearch cluster health. Fetching Elasticsearch cluster health failed: ",n.message),g=m.default.div`
display: flex;
justify-content: space-between;
`,A="indexerCluster.health",x="indexerCluster.name",d=()=>{const n=P.H3(p.A.IndexerClusterApiController.health().url);return(0,o.Ur)("GET",n)},i=()=>{const n=P.H3(p.A.IndexerClusterApiController.name().url);return(0,o.Ur)("GET",n)},a=n=>{const r={refetchInterval:5e3,retry:0,enabled:n},[{data:l,isFetching:R,error:y,isSuccess:C,isRefetching:S},{data:F,isFetching:Z,error:w,isSuccess:q,isRefetching:k}]=(0,O.useQueries)({queries:[{queryKey:[A],queryFn:d,...r},{queryKey:[x],queryFn:i,...r}]});return{health:l,name:F,error:y||w,loading:(R||Z)&&!S&&!k,isSuccess:C&&q}},s=({minimal:n})=>{const r=(0,f.A)(),l=(0,M.Nn)(r.permissions,"indexercluster:read"),{health:R,name:y,loading:C,error:S,isSuccess:F}=a(l);return l?e.createElement(u.Row,{className:"content"},e.createElement(u.Col,{md:12},!n&&e.createElement(g,null,e.createElement("h2",null,"Elasticsearch cluster"),e.createElement(I.$,{page:c.A.PAGES.CONFIGURING_ES,text:"Elasticsearch setup documentation",displayIcon:!0})),F&&e.createElement(K,{health:R,name:y}),C&&e.createElement("p",null,e.createElement(h.y$,null)),S&&e.createElement(v,{error:S}))):null};s.defaultProps={minimal:!1};const E=s;var b=t("ii0bleBb"),T=t.n(b);const G=(0,m.default)(u.Alert)`
margin-top: 10px;
margin-bottom: 5px;
`,B=({health:n,name:r})=>{const l=n.status.toLowerCase(),R=()=>{switch(l){case"green":return"success";case"yellow":return"warning";case"red":return"danger";default:return"success"}},y=(0,e.useMemo)(()=>{const C=`Elasticsearch cluster ${(r==null?void 0:r.name)||""} is ${l}.`;switch(l){case"green":return C;case"yellow":case"red":return e.createElement("strong",null,C);default:return C}},[l,r]);return e.createElement(G,{bsStyle:R()},y," ","Shards:"," ",n.shards.active," active,"," ",n.shards.initializing," initializing,"," ",n.shards.relocating," relocating,"," ",n.shards.unassigned," unassigned,"," ",e.createElement(I.$,{page:c.A.PAGES.CLUSTER_STATUS_EXPLAINED,text:"What does this mean?"}))};B.defaultProps={name:void 0},B.propTypes={health:T().object.isRequired,name:T().object};const K=B;var Q=t("4IfE3Ihm"),X=Object.defineProperty,z=(n,r,l)=>r in n?X(n,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[r]=l,V=(n,r,l)=>(z(n,typeof r!="symbol"?r+"":r,l),l);class W extends e.Component{render(){const{failure:r}=this.props;return e.createElement("tr",null,e.createElement("td",null,e.createElement(Q.A,{dateTime:r.timestamp})),e.createElement("td",null,r.index),e.createElement("td",null,r.letter_id),e.createElement("td",null,r.message))}}V(W,"propTypes",{failure:T().object.isRequired});const H=W;var ee=t("y4tK+AhI"),Y=Object.defineProperty,$=(n,r,l)=>r in n?Y(n,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[r]=l,j=(n,r,l)=>($(n,typeof r!="symbol"?r+"":r,l),l);class N extends e.Component{render(){return this.props.failures.length===0?e.createElement(u.Alert,{bsStyle:"success"},e.createElement(h.In,{name:"check_circle"})," Hurray! There are not any indexer failures."):e.createElement("div",{className:"scrollable-table"},e.createElement(u.Table,{className:"indexer-failures",striped:!0,hover:!0,condensed:!0},e.createElement("thead",null,e.createElement("tr",null,e.createElement("th",{style:{width:200}},"Timestamp"),e.createElement("th",null,"Index"),e.createElement("th",null,"Letter ID"),e.createElement("th",null,"Error message"))),e.createElement("tbody",null,this.props.failures.map(r=>e.createElement(H,{key:`indexer-failure-${r.letter_id}`,failure:r})))))}}j(N,"propTypes",{failures:T().arrayOf(T().object).isRequired});const J=N},ck17yDCE:(U,_,t)=>{t.r(_),t.d(_,{default:()=>x});var e=t("Z7aTuO5B"),O=t("ii0bleBb"),m=t.n(O),M=t("9pdI12pI"),h=t.n(M),u=t("9oVghaOd"),I=t.n(u),c=t("rIl5IEuP"),p=t("E+CaPsQD"),o=t("IOI9nV80"),P=t("kEBMGmbZ"),f=t("XyJ0Mvpg"),D=t("l5XbR7Md"),L=Object.defineProperty,v=(d,i,a)=>i in d?L(d,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):d[i]=a,g=(d,i,a)=>(v(d,typeof i!="symbol"?i+"":i,a),a);class A extends e.Component{constructor(i){super(i),g(this,"loadData",(a=this.props.paginationQueryParameter.page,s=this.props.paginationQueryParameter.pageSize)=>{D.a.list(s,(a-1)*s).then(E=>{this.setState({failures:E.failures})})}),g(this,"_onChangePaginatedList",(a,s)=>{this.loadData(a,s)}),this.state={}}componentDidMount(){D.a.count(I()().subtract(10,"years")).then(i=>{this.setState({total:i.count})}),this.loadData()}render(){return this.state.total===void 0||!this.state.failures?e.createElement(o.y$,null):e.createElement(o.Qc,{title:"Indexer failures"},e.createElement("span",null,e.createElement(o.zY,{title:"Indexer failures",documentationLink:{title:"Indexer failures documentation",path:p.A.PAGES.INDEXER_FAILURES}},e.createElement("span",null,"This is a list of message index attempts that failed. A failure means that a message you sent to Graylog was"," ","properly processed but writing it to the Elasticsearch cluster failed. Note that the list is capped to a size"," ","of 50 MB so it will contain a lot of failure logs but not necessarily all that ever occurred.",e.createElement("br",null),"Collection containing a total of ",h()(this.state.total).format("0,0")," indexer failures.")),e.createElement(c.Row,{className:"content"},e.createElement(c.Col,{md:12},e.createElement(o.OW,{totalItems:this.state.total,onChange:this._onChangePaginatedList,pageSize:this.defaultPageSize},e.createElement(P.ht,{failures:this.state.failures}))))))}}g(A,"propTypes",{paginationQueryParameter:m().object.isRequired});const x=(0,f.A)(A)},l5XbR7Md:(U,_,t)=>{t.d(_,{a:()=>p});var e=t("JnTtTRmZ"),O=t.n(e),m=t("9oVghaOd"),M=t.n(m),h=t("MdYBRjRJ"),u=t("U1Iufsob"),I=t("eFxcQyPT"),c=t("IA3Ku5lS");const p=(0,c.Bv)("core.IndexerFailures",()=>O().createStore({listenables:[],list(o,P){const f=h.H3(u.A.IndexerFailuresApiController.list(o,P).url);return(0,I.Ay)("GET",f)},count(o){const f=(o.format?o:M()(o)).format("YYYY-MM-DDTHH:mm:ss.SSS"),D=h.H3(u.A.IndexerFailuresApiController.count(f).url);return(0,I.Ay)("GET",D)}}))}}]);})();
//# sourceMappingURL=bb8c8232-5336.aa2b9c2fe1d44614db07.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy