The monitoring plugin check_es_system, to monitor Elasticsearch nodes and clusters, is now available in the latest version 1.4.
This version catches a 403 error from Elasticsearch, which basically means the used username is not authorized to access the API.
Before this version, the plugin would simply return nonsense, as it didn't handle unauthorized errors properly:
# ./check_es_system.sh -H myescluster.eu-central-1.aws.cloud.es.io -P 9243 -S -t status -u auser -p apassword
parse error: type 'object' has no elements to extract (arg 2)
parse error: type 'object' has no elements to extract (arg 2)
parse error: type 'object' has no elements to extract (arg 2)
parse error: type 'object' has no elements to extract (arg 2)
parse error: type 'object' has no elements to extract (arg 2)
parse error: type 'object' has no elements to extract (arg 2)
parse error: type 'object' has no elements to extract (arg 2)
In the background, the plugin receives the following error message from the API:
{"error":{"root_cause":[{"type":"security_exception","reason":"action' '[cluster:monitor/health]' is unauthorized for user '[auser]"}],"type":"security_exception","reason":"action' '[cluster:monitor/health]' is unauthorized for user '[auser]"},"status":403}
Now with the fix in version 1.4, the plugin correctly returns a meaningful error:
$ ./check_es_system.sh -H myescluster.eu-central-1.aws.cloud.es.io -P 9243 -S -t status -u auser -p apassword
ES SYSTEM CRITICAL - User auser is unauthorized
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder