Is it possible to monitor the number of shards per node using watchers?
I would like to be able to trigger an alert when the result of the GET _cat/allocation?v&h=node,shards returns, for at least one node, a value greater than 500.
Running 'Simulate', I get a certificate error: (certificate_unknown) PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
On the synthetics response you can use the regex to see if output of shards is greater > 499 , on this automatically the synthetics will trigger alert :
Response body contains :
"shards":"(5\d{2}|[6-9]\d{2}|\d{4,})"
If you still plan to use Watcher please share what watcher you are using for which the error was shared?
The curl test is ok:
curl https://127.0.0.1:9200 (external, opens in a new tab or window) -v --cacert /etc/elasticsearch/certs/http_ca.crt Trying 127.0.0.1:9200... Connected to 127.0.0.1 (127.0.0.1) port 9200 (#0)
In the elasticsearch.yml we need to add below entry :
If it is for testing environment can use below (not secure):
xpack.http.ssl.verification_mode: none
For Prod need to use below :
xpack.http.ssl.certificate_authorities: ["/path/to/http_ca.crt"]
Just one more question: On which types of nodes should I configure watchers: hot nodes, masters, etc.? For example, email accounts and xpack.http.ssl.certificate_authorities in elasticsearch.yml.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.