can’t get check_elasticsearch_health to work

I can’t get this to work! This is how I’m trying:

#./check_elasticsearch_health localhost
CRITICAL – Status is 401
[root@logs:~] #

I think it’s because I have shield in place:

#curl -uadmin:$ES_PASS localhost:9200/_cluster/health?pretty
{
“cluster_name” : “elasticsearch”,
“status” : “green”,
“timed_out” : false,
“number_of_nodes” : 3,
“number_of_data_nodes” : 3,
“active_primary_shards” : 14,
“active_shards” : 28,
“relocating_shards” : 0,
“initializing_shards” : 0,
“unassigned_shards” : 0,
“delayed_unassigned_shards” : 0,
“number_of_pending_tasks” : 0,
“number_of_in_flight_fetch” : 0,
“task_max_waiting_in_queue_millis” : 0,
“active_shards_percent_as_number” : 100.0
}

If I remove shield (temporarily) I can get a status:

#./check_elasticsearch_health localhost
CRITICAL – Status is yellow

Does the script work with shield? What are the flags I can pass to it?