{"action":"created","issue":{"url":"https://api.github.com/repos/harisekhon/nagios-plugins/issues/74","labels_url":"https://api.github.com/repos/harisekhon/nagios-plugins/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/harisekhon/nagios-plugins/issues/74/comments","events_url":"https://api.github.com/repos/harisekhon/nagios-plugins/issues/74/events","html_url":"https://github.com/harisekhon/nagios-plugins/issues/74","id":117254241,"number":74,"title":"Timeout broken in elasticesearch 2.0.0","user":{"login":"djzort","id":937277,"avatar_url":"https://avatars.githubusercontent.com/u/937277?v=3","gravatar_id":"","url":"https://api.github.com/users/djzort","html_url":"https://github.com/djzort","followers_url":"https://api.github.com/users/djzort/followers","following_url":"https://api.github.com/users/djzort/following{/other_user}","gists_url":"https://api.github.com/users/djzort/gists{/gist_id}","starred_url":"https://api.github.com/users/djzort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djzort/subscriptions","organizations_url":"https://api.github.com/users/djzort/orgs","repos_url":"https://api.github.com/users/djzort/repos","events_url":"https://api.github.com/users/djzort/events{/privacy}","received_events_url":"https://api.github.com/users/djzort/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/harisekhon/nagios-plugins/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-17T00:48:21Z","updated_at":"2015-11-17T11:55:16Z","closed_at":"2015-11-17T11:29:10Z","body":"the timeout= parameter now needs a unit, however its not applied consistently. At a minimum the _cluster/health call now does. See also https://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-health.html\r\n\r\nBAD\r\ncurl -sS -XGET 'localhost/_cluster/health?pretty=true&timeout=12'\r\n{\r\n  \"error\" : {\r\n    \"root_cause\" : [ {\r\n      \"type\" : \"parse_exception\",\r\n      \"reason\" : \"Failed to parse setting [timeout] with value [12] as a time value: unit is missing or unrecognized\"\r\n    } ],\r\n    \"type\" : \"parse_exception\",\r\n    \"reason\" : \"Failed to parse setting [timeout] with value [12] as a time value: unit is missing or unrecognized\"\r\n  },\r\n  \"status\" : 400\r\n}\r\n\r\nGOOD\r\ncurl -sS -XGET 'localhost/_cluster/health?pretty=true&timeout=12s'\r\n{\r\n  \"cluster_name\" : \"elasticsearch200-prod\",\r\n  \"status\" : \"green\",\r\n  \"timed_out\" : false,\r\n  \"number_of_nodes\" : 7,\r\n  \"number_of_data_nodes\" : 5,\r\n  \"active_primary_shards\" : 135,\r\n  \"active_shards\" : 270,\r\n  \"relocating_shards\" : 0,\r\n  \"initializing_shards\" : 0,\r\n  \"unassigned_shards\" : 0,\r\n  \"delayed_unassigned_shards\" : 0,\r\n  \"number_of_pending_tasks\" : 0,\r\n  \"number_of_in_flight_fetch\" : 0,\r\n  \"task_max_waiting_in_queue_millis\" : 0,\r\n  \"active_shards_percent_as_number\" : 100.0\r\n}\r\n\r\n\r\nThe generation of the timeout=X parameter is deep in your libraries, i would like to send a PR but i dont want to mess around inside something personal that youre using so widely. \r\n\r\nIt does seem though, that elasticsearch 1.4 also supports (requires?) a unit. As per https://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-health.html\r\n\r\nAlso 0.9 https://www.elastic.co/guide/en/elasticsearch/reference/0.90/cluster-health.html\r\n"},"comment":{"url":"https://api.github.com/repos/harisekhon/nagios-plugins/issues/comments/157349201","html_url":"https://github.com/harisekhon/nagios-plugins/issues/74#issuecomment-157349201","issue_url":"https://api.github.com/repos/harisekhon/nagios-plugins/issues/74","id":157349201,"user":{"login":"djzort","id":937277,"avatar_url":"https://avatars.githubusercontent.com/u/937277?v=3","gravatar_id":"","url":"https://api.github.com/users/djzort","html_url":"https://github.com/djzort","followers_url":"https://api.github.com/users/djzort/followers","following_url":"https://api.github.com/users/djzort/following{/other_user}","gists_url":"https://api.github.com/users/djzort/gists{/gist_id}","starred_url":"https://api.github.com/users/djzort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djzort/subscriptions","organizations_url":"https://api.github.com/users/djzort/orgs","repos_url":"https://api.github.com/users/djzort/repos","events_url":"https://api.github.com/users/djzort/events{/privacy}","received_events_url":"https://api.github.com/users/djzort/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T11:55:16Z","updated_at":"2015-11-17T11:55:16Z","body":"cheers."}}