web-interface.assets.1255d548-795.d36fe8f7feac90546ff7.js Maven / Gradle / Ivy
"use strict";(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-795"],{XyJ0Mvpg:(L,d,t)=>{t.d(d,{Z:()=>I});var e=t("Z7aTuO5B"),D=t("rVdVsuGH");const I=(c,o)=>function(E){const f=(0,D.ZP)(o==null?void 0:o.pageSizes);return e.createElement(c,{...E,paginationQueryParameter:f})}},"y4tK+AhI":(L,d,t)=>{t.d(d,{Z:()=>u});var e=t("Z7aTuO5B"),D=t("9pdI12pI"),h=t.n(D),I=t("9oVghaOd"),c=t.n(I),o=t("J6y4/h8P"),P=t("ty2gyrHp"),E=t("uZqmR+ju"),f=t("/GOzvPf6"),i=t("E+CaPsQD"),p=t("d4kzUuQm"),O=t("fVisTAey"),C=t("l5XbR7Md"),S=Object.defineProperty,T=(s,a,m)=>a in s?S(s,a,{enumerable:!0,configurable:!0,writable:!0,value:m}):s[a]=m,M=(s,a,m)=>(T(s,typeof a!="symbol"?a+"":a,m),m);const v=o.default.div`
display: flex;
justify-content: space-between;
`,R=s=>s===0?"No failed indexing attempts in the last 24 hours.":e.createElement("strong",null,"There were ",h()(s).format("0,0")," failed indexing attempts in the last 24 hours.");class _ extends e.Component{constructor(a){super(a),M(this,"_formatFailuresSummary",()=>e.createElement(E.Alert,{bsStyle:this.state.total===0?"success":"danger"},R(this.state.total),e.createElement(P.J,{to:p.ZP.SYSTEM.INDICES.FAILURES},e.createElement(E.Button,{bsStyle:"info",bsSize:"xs",className:"pull-right"},"Show errors")))),this.state={}}componentDidMount(){const a=c()().subtract(24,"hours");C.X.count(a).then(m=>{this.setState({total:m.count})})}render(){let a;return this.state.total===void 0?a=e.createElement(f.$j,null):a=this._formatFailuresSummary(),e.createElement(E.Row,{className:"content"},e.createElement(E.Col,{md:12},e.createElement(v,null,e.createElement("h2",null,"Indexer failures"),e.createElement(O.eb,{page:i.Z.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."),a))}}const u=_},kEBMGmbZ:(L,d,t)=>{t.d(d,{NM:()=>m,Mn:()=>F,OK:()=>Z,nV:()=>Y});var e=t("Z7aTuO5B"),D=t("DUKaTDO2"),h=t("J6y4/h8P"),I=t("0TVxnHwi"),c=t("/GOzvPf6"),o=t("uZqmR+ju"),P=t("fVisTAey"),E=t("E+CaPsQD"),f=t("U1Iufsob"),i=t("eFxcQyPT"),p=t("MdYBRjRJ"),O=t("q2j1bVbz");const C=(0,h.default)(o.Alert)`
margin-top: 10px;
margin-bottom: 5px;
`,T=({error:n})=>e.createElement(C,{bsStyle:"danger"},"Could not retrieve Elasticsearch cluster health. Fetching Elasticsearch cluster health failed: ",n.message),M=h.default.div`
display: flex;
justify-content: space-between;
`,v="indexerCluster.health",R="indexerCluster.name",_=()=>{const n=p.DC(f.Z.IndexerClusterApiController.health().url);return(0,i.vl)("GET",n)},u=()=>{const n=p.DC(f.Z.IndexerClusterApiController.name().url);return(0,i.vl)("GET",n)},s=n=>{const r={refetchInterval:5e3,retry:0,enabled:n},[{data:l,isFetching:A,error:y,isSuccess:g,isRefetching:U},{data:K,isFetching:$,error:w,isSuccess:q,isRefetching:k}]=(0,D.useQueries)({queries:[{queryKey:[v],queryFn:_,...r},{queryKey:[R],queryFn:u,...r}]});return{health:l,name:K,error:y||w,loading:(A||$)&&!U&&!k,isSuccess:g&&q}},a=({minimal:n})=>{const r=(0,O.Z)(),l=(0,I.rq)(r.permissions,"indexercluster:read"),{health:A,name:y,loading:g,error:U,isSuccess:K}=s(l);return l?e.createElement(o.Row,{className:"content"},e.createElement(o.Col,{md:12},!n&&e.createElement(M,null,e.createElement("h2",null,"Elasticsearch cluster"),e.createElement(P.eb,{page:E.Z.PAGES.CONFIGURING_ES,text:"Elasticsearch setup documentation",displayIcon:!0})),K&&e.createElement(F,{health:A,name:y}),g&&e.createElement("p",null,e.createElement(c.$j,null)),U&&e.createElement(T,{error:U}))):null};a.defaultProps={minimal:!1};const m=a;var N=t("ii0bleBb"),x=t.n(N);const G=(0,h.default)(o.Alert)`
margin-top: 10px;
margin-bottom: 5px;
`,B=({health:n,name:r})=>{const l=n.status.toLowerCase(),A=()=>{switch(l){case"green":return"success";case"yellow":return"warning";case"red":return"danger";default:return"success"}},y=(0,e.useMemo)(()=>{const g=`Elasticsearch cluster ${(r==null?void 0:r.name)||""} is ${l}.`;switch(l){case"green":return g;case"yellow":case"red":return e.createElement("strong",null,g);default:return g}},[l,r]);return e.createElement(G,{bsStyle:A()},y," ","Shards:"," ",n.shards.active," active,"," ",n.shards.initializing," initializing,"," ",n.shards.relocating," relocating,"," ",n.shards.unassigned," unassigned,"," ",e.createElement(P.eb,{page:E.Z.PAGES.CLUSTER_STATUS_EXPLAINED,text:"What does this mean?"}))};B.defaultProps={name:void 0},B.propTypes={health:x().object.isRequired,name:x().object};const F=B;var b=t("4IfE3Ihm"),X=Object.defineProperty,Q=(n,r,l)=>r in n?X(n,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[r]=l,z=(n,r,l)=>(Q(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(b.Z,{dateTime:r.timestamp})),e.createElement("td",null,r.index),e.createElement("td",null,r.letter_id),e.createElement("td",null,r.message))}}z(W,"propTypes",{failure:x().object.isRequired});const Z=W;var ee=t("y4tK+AhI"),j=Object.defineProperty,V=(n,r,l)=>r in n?j(n,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[r]=l,J=(n,r,l)=>(V(n,typeof r!="symbol"?r+"":r,l),l);class H extends e.Component{render(){return this.props.failures.length===0?e.createElement(o.Alert,{bsStyle:"success"},e.createElement(c.JO,{name:"check-circle"})," Hurray! There are not any indexer failures."):e.createElement("div",{className:"scrollable-table"},e.createElement(o.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(Z,{key:`indexer-failure-${r.letter_id}`,failure:r})))))}}J(H,"propTypes",{failures:x().arrayOf(x().object).isRequired});const Y=H},ck17yDCE:(L,d,t)=>{t.r(d),t.d(d,{default:()=>R});var e=t("Z7aTuO5B"),D=t("ii0bleBb"),h=t.n(D),I=t("9pdI12pI"),c=t.n(I),o=t("9oVghaOd"),P=t.n(o),E=t("uZqmR+ju"),f=t("E+CaPsQD"),i=t("/GOzvPf6"),p=t("kEBMGmbZ"),O=t("XyJ0Mvpg"),C=t("l5XbR7Md"),S=Object.defineProperty,T=(_,u,s)=>u in _?S(_,u,{enumerable:!0,configurable:!0,writable:!0,value:s}):_[u]=s,M=(_,u,s)=>(T(_,typeof u!="symbol"?u+"":u,s),s);class v extends e.Component{constructor(u){super(u),M(this,"loadData",(s=this.props.paginationQueryParameter.page,a=this.props.paginationQueryParameter.pageSize)=>{C.X.list(a,(s-1)*a).then(m=>{this.setState({failures:m.failures})})}),M(this,"_onChangePaginatedList",(s,a)=>{this.loadData(s,a)}),this.state={}}componentDidMount(){C.X.count(P()().subtract(10,"years")).then(u=>{this.setState({total:u.count})}),this.loadData()}render(){return this.state.total===void 0||!this.state.failures?e.createElement(i.$j,null):e.createElement(i.$4,{title:"Indexer failures"},e.createElement("span",null,e.createElement(i.mr,{title:"Indexer failures",documentationLink:{title:"Indexer failures documentation",path:f.Z.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 ",c()(this.state.total).format("0,0")," indexer failures.")),e.createElement(E.Row,{className:"content"},e.createElement(E.Col,{md:12},e.createElement(i.l9,{totalItems:this.state.total,onChange:this._onChangePaginatedList,pageSize:this.defaultPageSize},e.createElement(p.nV,{failures:this.state.failures}))))))}}M(v,"propTypes",{paginationQueryParameter:h().object.isRequired});const R=(0,O.Z)(v)},l5XbR7Md:(L,d,t)=>{t.d(d,{X:()=>f});var e=t("JnTtTRmZ"),D=t.n(e),h=t("9oVghaOd"),I=t.n(h),c=t("MdYBRjRJ"),o=t("U1Iufsob"),P=t("eFxcQyPT"),E=t("IA3Ku5lS");const f=(0,E.dS)("core.IndexerFailures",()=>D().createStore({listenables:[],list(i,p){const O=c.DC(o.Z.IndexerFailuresApiController.list(i,p).url);return(0,P.ZP)("GET",O)},count(i){const O=(i.format?i:I()(i)).format("YYYY-MM-DDTHH:mm:ss.SSS"),C=c.DC(o.Z.IndexerFailuresApiController.count(O).url);return(0,P.ZP)("GET",C)}}))}}]);})();
//# sourceMappingURL=1255d548-795.d36fe8f7feac90546ff7.js.map
© 2015 - 2024 Weber Informatics LLC | Privacy Policy