Forum Discussion
5 years ago
We have 3 datasources that we use for our internal Elk clusters. Maybe they can help you or at least point you in the right direction for writing your own. This is the one for shard health.
<?xml version="1.0" encoding="UTF-8" ?> <feed version="1.0" hasPendingRequests="false" > <company></company> <status>200</status> <errmsg>OK</errmsg> <interval>0</interval> <entry type="predatasource"> <version>1573572263</version> <name>Elasticsearch_Cluster_Shards_veri</name> <displayedas>Cluster Shards_veri</displayedas> <description>Monitors Elasticsearch Cluster shard health.</description> <collector>webpage</collector> <hasMultiInstances>false</hasMultiInstances> <schedule>60</schedule> <appliesTo>hasCategory("elasticsearch") or system.deviceId == "6986"</appliesTo> <wildcardauto>false</wildcardauto> <wildcardpersist>false</wildcardpersist> <wildcardlinuxscript></wildcardlinuxscript> <wildcardlinuxcmdline></wildcardlinuxcmdline> <wildcardwinscript></wildcardwinscript> <wildcardwincmdline></wildcardwincmdline> <wildcardgroovyscript></wildcardgroovyscript> <wildcardschedule>1440</wildcardschedule> <wildcarddisable>false</wildcarddisable> <wildcarddeleteinactive>false</wildcarddeleteinactive> <agdmethod>none</agdmethod> <agdparams></agdparams> <group></group> <tags>cluster,shards,elasticsearch,health</tags> <technology></technology> <adlist><![CDATA[{"agdmethod":"none","agdparams":"","id":0,"filters":[],"params":{}}]]></adlist> <schemaVersion>2</schemaVersion> <dataSourceType>1</dataSourceType> <attributes> <attribute> <name>ip</name> <value></value> <comment></comment> </attribute> <attribute> <name>port</name> <value>9200</value> <comment></comment> </attribute> <attribute> <name>followRedirect</name> <value>false</value> <comment></comment> </attribute> <attribute> <name>connectTimeout</name> <value>1000</value> <comment></comment> </attribute> <attribute> <name>readTimeout</name> <value>1000</value> <comment></comment> </attribute> <attribute> <name>request</name> <value>GET /_cluster/health?pretty&human HTTP/1.0</value> <comment></comment> </attribute> <attribute> <name>ssl</name> <value>N</value> <comment></comment> </attribute> </attributes> <datapoints> <datapoint> <name>active_primary_shards</name> <dataType>7</dataType> <type>2</type> <postprocessormethod>json</postprocessormethod> <postprocessorparam>active_primary_shards</postprocessorparam> <usevalue>body</usevalue> <alertexpr></alertexpr> <alertmissing>1</alertmissing> <alertsubject></alertsubject> <alertbody></alertbody> <enableanomalyalertsuppression></enableanomalyalertsuppression> <adadvsettingenabled>false</adadvsettingenabled> <warnadadvsetting></warnadadvsetting> <erroradadvsetting></erroradadvsetting> <criticaladadvsetting></criticaladadvsetting> <description>Number of active primary shards.</description> <maxvalue></maxvalue> <minvalue>0</minvalue> <userparam1></userparam1> <userparam2></userparam2> <userparam3></userparam3> <iscomposite>false</iscomposite> <rpn></rpn> <alertTransitionIval>0</alertTransitionIval> <alertClearTransitionIval>0</alertClearTransitionIval> </datapoint> <datapoint> <name>active_shards</name> <dataType>7</dataType> <type>2</type> <postprocessormethod>json</postprocessormethod> <postprocessorparam>active_shards</postprocessorparam> <usevalue>body</usevalue> <alertexpr></alertexpr> <alertmissing>1</alertmissing> <alertsubject></alertsubject> <alertbody></alertbody> <enableanomalyalertsuppression></enableanomalyalertsuppression> <adadvsettingenabled>false</adadvsettingenabled> <warnadadvsetting></warnadadvsetting> <erroradadvsetting></erroradadvsetting> <criticaladadvsetting></criticaladadvsetting> <description>Number of active shards.</description> <maxvalue></maxvalue> <minvalue>0</minvalue> <userparam1></userparam1> <userparam2></userparam2> <userparam3></userparam3> <iscomposite>false</iscomposite> <rpn></rpn> <alertTransitionIval>0</alertTransitionIval> <alertClearTransitionIval>0</alertClearTransitionIval> </datapoint> <datapoint> <name>initializing_shards</name> <dataType>7</dataType> <type>2</type> <postprocessormethod>json</postprocessormethod> <postprocessorparam>initializing_shards</postprocessorparam> <usevalue>body</usevalue> <alertexpr></alertexpr> <alertmissing>1</alertmissing> <alertsubject></alertsubject> <alertbody></alertbody> <enableanomalyalertsuppression></enableanomalyalertsuppression> <adadvsettingenabled>false</adadvsettingenabled> <warnadadvsetting></warnadadvsetting> <erroradadvsetting></erroradadvsetting> <criticaladadvsetting></criticaladadvsetting> <description>Number of initializing shards.</description> <maxvalue></maxvalue> <minvalue>0</minvalue> <userparam1></userparam1> <userparam2></userparam2> <userparam3></userparam3> <iscomposite>false</iscomposite> <rpn></rpn> <alertTransitionIval>0</alertTransitionIval> <alertClearTransitionIval>0</alertClearTransitionIval> </datapoint> <datapoint> <name>relocating_shards</name> <dataType>7</dataType> <type>2</type> <postprocessormethod>json</postprocessormethod> <postprocessorparam>relocating_shards</postprocessorparam> <usevalue>body</usevalue> <alertexpr></alertexpr> <alertmissing>1</alertmissing> <alertsubject></alertsubject> <alertbody></alertbody> <enableanomalyalertsuppression></enableanomalyalertsuppression> <adadvsettingenabled>false</adadvsettingenabled> <warnadadvsetting></warnadadvsetting> <erroradadvsetting></erroradadvsetting> <criticaladadvsetting></criticaladadvsetting> <description>Number of relocating shards.</description> <maxvalue></maxvalue> <minvalue>0</minvalue> <userparam1></userparam1> <userparam2></userparam2> <userparam3></userparam3> <iscomposite>false</iscomposite> <rpn></rpn> <alertTransitionIval>0</alertTransitionIval> <alertClearTransitionIval>0</alertClearTransitionIval> </datapoint> <datapoint> <name>unassigned_shards</name> <dataType>7</dataType> <type>2</type> <postprocessormethod>json</postprocessormethod> <postprocessorparam>unassigned_shards</postprocessorparam> <usevalue>body</usevalue> <alertexpr></alertexpr> <alertmissing>1</alertmissing> <alertsubject></alertsubject> <alertbody></alertbody> <enableanomalyalertsuppression></enableanomalyalertsuppression> <adadvsettingenabled>false</adadvsettingenabled> <warnadadvsetting></warnadadvsetting> <erroradadvsetting></erroradadvsetting> <criticaladadvsetting></criticaladadvsetting> <description>Number of unassigned shards.</description> <maxvalue></maxvalue> <minvalue></minvalue> <userparam1></userparam1> <userparam2></userparam2> <userparam3></userparam3> <iscomposite>false</iscomposite> <rpn></rpn> <alertTransitionIval>0</alertTransitionIval> <alertClearTransitionIval>0</alertClearTransitionIval> </datapoint> </datapoints> <graphs> <graph> <name>Shards</name> <title>Shards</title> <verticallabel>shards</verticallabel> <rigid>false</rigid> <maxvalue>NaN</maxvalue> <minvalue>0.0</minvalue> <displayprio>1</displayprio> <timescale>1day</timescale> <base1024>false</base1024> <graphdatapoints> <graphdatapoint> <name>active_primary_shards</name> <datapointname>active_primary_shards</datapointname> <cf>2</cf> </graphdatapoint> <graphdatapoint> <name>active_shards</name> <datapointname>active_shards</datapointname> <cf>2</cf> </graphdatapoint> <graphdatapoint> <name>initializing_shards</name> <datapointname>initializing_shards</datapointname> <cf>2</cf> </graphdatapoint> <graphdatapoint> <name>relocating_shards</name> <datapointname>relocating_shards</datapointname> <cf>2</cf> </graphdatapoint> <graphdatapoint> <name>unassigned_shards</name> <datapointname>unassigned_shards</datapointname> <cf>2</cf> </graphdatapoint> </graphdatapoints> <graphvirtualdatapoints> </graphvirtualdatapoints> <graphdatas> <graphdata> <type>1</type> <legend>Active Primary</legend> <color>red</color> <datapointname>active_primary_shards</datapointname> <isvirtualdatapoint>false</isvirtualdatapoint> </graphdata> <graphdata> <type>1</type> <legend>Active</legend> <color>orange</color> <datapointname>active_shards</datapointname> <isvirtualdatapoint>false</isvirtualdatapoint> </graphdata> <graphdata> <type>1</type> <legend>Initializing</legend> <color>yellow</color> <datapointname>initializing_shards</datapointname> <isvirtualdatapoint>false</isvirtualdatapoint> </graphdata> <graphdata> <type>1</type> <legend>Relocating</legend> <color>green</color> <datapointname>relocating_shards</datapointname> <isvirtualdatapoint>false</isvirtualdatapoint> </graphdata> <graphdata> <type>1</type> <legend>Unassigned</legend> <color>blue</color> <datapointname>unassigned_shards</datapointname> <isvirtualdatapoint>false</isvirtualdatapoint> </graphdata> </graphdatas> </graph> </graphs> <overviewgraphs> </overviewgraphs> <scripts> </scripts> </entry> </feed>
Related Content
- 10 months ago
- 7 months ago
- 2 years ago
- 11 months ago