{"action":"opened","issue":{"url":"https://api.github.com/repos/untergeek/zabbix-grab-bag/issues/8","labels_url":"https://api.github.com/repos/untergeek/zabbix-grab-bag/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/untergeek/zabbix-grab-bag/issues/8/comments","events_url":"https://api.github.com/repos/untergeek/zabbix-grab-bag/issues/8/events","html_url":"https://github.com/untergeek/zabbix-grab-bag/issues/8","id":115225676,"number":8,"title":"Batch mode problems","user":{"login":"4erpak","id":11191742,"avatar_url":"https://avatars.githubusercontent.com/u/11191742?v=3","gravatar_id":"","url":"https://api.github.com/users/4erpak","html_url":"https://github.com/4erpak","followers_url":"https://api.github.com/users/4erpak/followers","following_url":"https://api.github.com/users/4erpak/following{/other_user}","gists_url":"https://api.github.com/users/4erpak/gists{/gist_id}","starred_url":"https://api.github.com/users/4erpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4erpak/subscriptions","organizations_url":"https://api.github.com/users/4erpak/orgs","repos_url":"https://api.github.com/users/4erpak/repos","events_url":"https://api.github.com/users/4erpak/events{/privacy}","received_events_url":"https://api.github.com/users/4erpak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-05T07:39:17Z","updated_at":"2015-11-05T07:39:17Z","closed_at":null,"body":"Houston we have a problem :-)\r\nWhen i disabled in userparameter file only this record:\r\n#UserParameter=es_stats_batch[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini batch --name $1\r\nNO NEW(health,clusterstats,nodeinfo,nodestats) data appear in zabbix except zabbix-agent check \"health[status]\".\r\nI don't want monitor this batch commands, i lost whole day to figure out what's going on, because in logs i'm not seen any useful info:\r\n\r\n2015-11-05 06:53:22,421 INFO               elasticsearch    log_request_success:63   GET http://127.0.0.1:9200/ [status:200 request:0.002s]\r\n2015-11-05 06:53:22,421 DEBUG              elasticsearch    log_request_success:65   > None\r\n2015-11-05 06:53:22,421 DEBUG              elasticsearch    log_request_success:66   < {\r\n  \"status\" : 200,\r\n  \"name\" : \"logs\",\r\n  \"version\" : {\r\n    \"number\" : \"1.1.2\", (Yeah we used so old elastic :) )\r\n    \"build_hash\" : \"e511f7b28b77c4d99175905fac65bffbf4c80cf7\",\r\n    \"build_timestamp\" : \"2014-05-22T12:27:39Z\",\r\n    \"build_snapshot\" : false,\r\n    \"lucene_version\" : \"4.7\"\r\n  },\r\n  \"tagline\" : \"You Know, for Search\"\r\n}\r\n\r\n2015-11-05 06:53:22,421 DEBUG      es_stats_zabbix.utils          check_version:77   Detected Elasticsearch version 1.1.2\r\n2015-11-05 06:53:22,422 INFO             es_stats_zabbix                 single:114  Single key: health[status]\r\n2015-11-05 06:53:22,422 DEBUG      es_stats_zabbix.utils              parse_key:142  API: health  Node: None  Key: status\r\n2015-11-05 06:53:22,423 DEBUG         urllib3.util.retry               from_int:155  Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0)\r\n2015-11-05 06:53:22,424 DEBUG     urllib3.connectionpool          _make_request:385  \"GET /_cluster/health HTTP/1.1\" 200 223\r\nWhere is zbxsender? )) ^^\r\n\r\nUserparameter output:\r\nUserParameter=health[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single health[$1]\r\nUserParameter=clusterstats[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single clusterstats[$1]\r\nUserParameter=clusterstate[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single clusterstate[$1]\r\nUserParameter=nodestats[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single nodestats[$1]\r\nUserParameter=nodeinfo[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single nodeinfo[$1]\r\n#UserParameter=es_stats_batch[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini batch --name $1\r\n\r\nes_stats_ini output:\r\n[logging]\r\n;debug setting is overridden by the command-line arg, if present\r\ndebug = True\r\nloglevel = DEBUG\r\n\r\n;logfile = /path/to/logfile\r\nlogfile = /tmp/es_out.log\r\n\r\n; can be default or logstash (JSON logging)\r\nlogformat = default\r\n\r\nBut when batch mode enabled, only items which are in this sections[30,60sec and five minutes] working. Other items not working.\r\n\r\nUserparameter output:\r\nUserParameter=health[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single health[$1]\r\nUserParameter=clusterstats[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single clusterstats[$1]\r\nUserParameter=clusterstate[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single clusterstate[$1]\r\nUserParameter=nodestats[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single nodestats[$1]\r\nUserParameter=nodeinfo[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini single nodeinfo[$1]\r\nUserParameter=es_stats_batch[*],/usr/bin/es_stats_zabbix --configuration /etc/zabbix/scripts/es_stats_zabbix.ini batch --name $1\r\n\r\nAnd es_ini output:\r\n[thirty_seconds]\r\nserver = my_zabbix_server\r\nport = 10051\r\nhost = my_monitored_host\r\n\r\nkey1  = health[unassigned_shards]\r\nkey2  = health[relocating_shards]\r\nkey3  = health[initializing_shards]\r\nkey4  = health[delayed_unassigned_shards]\r\n\r\n[sixty_seconds]\r\nserver = my_zabbix_server\r\nport = 10051\r\nhost = my_monitored_host\r\n\r\nkey1  = clusterstats[indices.docs.count]\r\nkey2  = clusterstats[indices.fielddata.evictions]\r\nkey3  = clusterstats[indices.fielddata.memory_size_in_bytes]\r\nkey4  = clusterstats[indices.filter_cache.evictions]\r\nkey5  = clusterstats[indices.filter_cache.memory_size_in_bytes]\r\n\r\n[five_minutes]\r\nserver = my_zabbix_server\r\nport = 10051\r\nhost = my_monitored_host\r\n\r\nkey1  = health[number_of_nodes]\r\nkey2  = health[active_primary_shards]\r\nkey3  = health[active_shards]\r\nkey4  = health[number_of_data_nodes]\r\nkey5  = clusterstats[indices.store.size_in_bytes]\r\nkey6  = clusterstats[indices.count]\r\n\r\nWhen these batches commented nothing working again:\r\n;server = my_zabbix_server\r\n;port = 10051\r\n;host = my_monitored_host\r\n\r\nlogs output:\r\ncli:70   Job starting.\r\n2015-11-05 07:29:54,449 DEBUG            es_stats_zabbix                    cli:71   Logging config args: {'debug': 'False', 'logformat': 'default', 'logfile': '/tmp/es_out.log', 'loglevel': 'DEBUG'}\r\n2015-11-05 07:29:54,449 DEBUG            es_stats_zabbix                    cli:71   Logging config args: {'debug': 'False', 'logformat': 'default', 'logfile': '/tmp/es_out.log', 'loglevel': 'DEBUG'}\r\n2015-11-05 07:29:54,449 DEBUG            es_stats_zabbix                    cli:74   Elasticsearch config args: {'http_auth': None, 'certificate': None, 'host': '127.0.0.1', 'timeout': 10, 'use_ssl': False, 'master_only': False, 'port': 9200, 'ssl_no_validate': False}\r\n2015-11-05 07:29:54,449 DEBUG      es_stats_zabbix.utils             get_client:99   kwargs = {'http_auth': None, 'certificate': None, 'host': '127.0.0.1', 'timeout': 10, 'use_ssl': False, 'master_only': False, 'port': 9200, 'ssl_no_validate': False}\r\n2015-11-05 07:29:54,450 INFO       es_stats_zabbix.utils             get_client:100  Initializing Elasticsearch client.\r\n2015-11-05 07:29:54,453 DEBUG      es_stats_zabbix.utils          check_version:77   Detected Elasticsearch version 1.1.2\r\n2015-11-05 07:29:54,453 DEBUG            es_stats_zabbix                  batch:128  Batch mode with named batch: thirty_seconds [the same for 60 sec and 5min]\r\n2015-11-05 07:29:54,453 DEBUG            es_stats_zabbix                  batch:134  Batch config args: {'key3': 'health[initializing_shards]', 'key1': 'health[unassigned_shards]', 'key2': 'health[relocating_shards]', 'key4': 'health[delayed_unassigned_shards]'}\r\n2015-11-05 07:30:02,401 INFO             es_stats_zabbix                    cli:70   Job starting."}}