{"action":"created","issue":{"url":"https://api.github.com/repos/sirensolutions/kaae/issues/16","repository_url":"https://api.github.com/repos/sirensolutions/kaae","labels_url":"https://api.github.com/repos/sirensolutions/kaae/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/sirensolutions/kaae/issues/16/comments","events_url":"https://api.github.com/repos/sirensolutions/kaae/issues/16/events","html_url":"https://github.com/sirensolutions/kaae/issues/16","id":170386746,"number":16,"title":"Preparation for Kibana 5","user":{"login":"lmangani","id":1423657,"avatar_url":"https://avatars.githubusercontent.com/u/1423657?v=3","gravatar_id":"","url":"https://api.github.com/users/lmangani","html_url":"https://github.com/lmangani","followers_url":"https://api.github.com/users/lmangani/followers","following_url":"https://api.github.com/users/lmangani/following{/other_user}","gists_url":"https://api.github.com/users/lmangani/gists{/gist_id}","starred_url":"https://api.github.com/users/lmangani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmangani/subscriptions","organizations_url":"https://api.github.com/users/lmangani/orgs","repos_url":"https://api.github.com/users/lmangani/repos","events_url":"https://api.github.com/users/lmangani/events{/privacy}","received_events_url":"https://api.github.com/users/lmangani/received_events","type":"User","site_admin":false},"labels":[{"id":482924063,"url":"https://api.github.com/repos/sirensolutions/kaae/labels/5.0","name":"5.0","color":"fbca04","default":false},{"id":372324962,"url":"https://api.github.com/repos/sirensolutions/kaae/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true},{"id":426572218,"url":"https://api.github.com/repos/sirensolutions/kaae/labels/testers%20wanted","name":"testers wanted","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-08-10T10:42:09Z","updated_at":"2016-11-27T16:29:26Z","closed_at":null,"body":"Since the Gentlemen at Elastic decided to make everyone's life a living hell with Kibana too, some preparation steps are required to guarantee KAAE surviving the hop and keeping up with their insanity-based version checks and undocumented API changes. \r\n\r\nReference: https://siren.solutions/in-kibana-5-all-your-plugins-will-break-at-each-and-every-update/\r\n\r\nAll and every community input, help or suggestion extremely welcome\r\n\r\nEDIT: Development branch for [5.0](https://github.com/elasticfence/kaae/tree/5.0) now available\r\n\r\n### Installation Steps\r\n```\r\ncd KIBANA5_HOME/plugins\r\n# If the plugins folder does not exist, change to installedPlugins and continue.\r\ngit clone -b 5.0 --single-branch https://github.com/sirensolutions/kaae.git kaae\r\ncd kaae\r\nnpm install\r\n```\r\nImportant: If you have any problem with the plugin version (like a warning message \"it expected Kibana version \"x.x.x\", and found \"5.0.0-rc1\"\") only change the value of the \"version\" tag on the KAAE package.json to your Kibana version\r\n\r\n### Unistall:\r\n```\r\ncd KIBANA5_HOME\r\nrm -rf plugins/kaae/\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/sirensolutions/kaae/issues/comments/263131607","html_url":"https://github.com/sirensolutions/kaae/issues/16#issuecomment-263131607","issue_url":"https://api.github.com/repos/sirensolutions/kaae/issues/16","id":263131607,"user":{"login":"fbaligand","id":3750300,"avatar_url":"https://avatars.githubusercontent.com/u/3750300?v=3","gravatar_id":"","url":"https://api.github.com/users/fbaligand","html_url":"https://github.com/fbaligand","followers_url":"https://api.github.com/users/fbaligand/followers","following_url":"https://api.github.com/users/fbaligand/following{/other_user}","gists_url":"https://api.github.com/users/fbaligand/gists{/gist_id}","starred_url":"https://api.github.com/users/fbaligand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbaligand/subscriptions","organizations_url":"https://api.github.com/users/fbaligand/orgs","repos_url":"https://api.github.com/users/fbaligand/repos","events_url":"https://api.github.com/users/fbaligand/events{/privacy}","received_events_url":"https://api.github.com/users/fbaligand/received_events","type":"User","site_admin":false},"created_at":"2016-11-27T16:29:26Z","updated_at":"2016-11-27T16:29:26Z","body":"Then  I tried this watcher :\r\n```\r\n{\r\n  \"_index\": \"watcher\",\r\n  \"_type\": \"watch\",\r\n  \"_id\": \"watcher1\",\r\n  \"_score\": 1,\r\n  \"_source\": {\r\n    \"trigger\": {\r\n      \"schedule\": {\r\n        \"later\": \"every 1 minute\"\r\n      }\r\n    },\r\n    \"input\": {\r\n      \"search\": {\r\n        \"request\": {\r\n          \"index\": \"logstash*\",\r\n          \"body\": {\r\n            \"query\": {\r\n              \"query_string\": {\r\n                \"analyze_wildcard\": true,\r\n                \"query\": \"_type:request\"\r\n              }\r\n            },\r\n            \"size\": 3\r\n          }\r\n        }\r\n      }\r\n    },\r\n    \"condition\": {\r\n      \"script\": {\r\n        \"script\": \"payload.hits.total > 0\"\r\n      }\r\n    },\r\n    \"transform\": {},\r\n    \"actions\": {\r\n      \"to_console\": {\r\n        \"throttle_period\": \"1m\",\r\n        \"console\": {\r\n          \"priority\": \"WARN\",\r\n          \"message\": \"Series Alarm {{ payload._id}} > 0: {{ payload.hits.total }}\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nAnd when execution time happened, here the result logs :\r\n```\r\n  log   [16:21:00.004] [info][status][KaaE] Executing watch: watcher1\r\n  log   [16:21:00.015] [info][status][KaaE] Action Report requires Email Settings! Reports Disabled.\r\n  log   [16:21:00.026] [info][status][KaaE] Processing action: to_console\r\n  log   [16:21:00.032] [info][status][KaaE] Console Payload: {\"took\":3,\"timed_out\":false,\"_shards\":{\"total\":10,\"successful\":10,\"failed\":0},\"hits\":{\"total\":2,\"max_score\":1,\"hits\":[{\"_index\":\"logstash-2016.11.05\",\"_type\":\"request\",\"_id\":\"r2\",\"_score\":1,\"_source\":{\"@timestamp\":\"2016-11-05T19:01:01.000Z\",\"message\":\"message2\",\"msg\":\"msg2\",\"request_uri\":\"/r2\",\"sql_duration\":13,\"ws_duration\":25,\"java_duration\":19}},{\"_index\":\"logstash-2016.11.05\",\"_type\":\"request\",\"_id\":\"r1\",\"_score\":1,\"_source\":{\"@timestamp\":\"2016-11-05T21:01:01.000Z\",\"message\":\"message1\",\"msg\":\"msg1\",\"request_uri\":\"/r1\",\"sql_duration\":12,\"ws_duration\":24,\"java_duration\":18}}]}}\r\n  log   [16:21:00.033] [info][status][KaaE] Storing Alarm to ES with type:to_console\r\n```\r\n\r\nAnd then, when I go to \"Alarms\" tab, I can see the generated alarm line.\r\nWhen next executions happen, new lines are added in \"Alarms\" tab.\r\nIf I click on an Alarm line, I can see the payload.\r\n\r\n=> So all of this just works fine !!!"}}
{"actor":{"display_login":"fbaligand"}}