{"action":"created","issue":{"url":"https://api.github.com/repos/sirensolutions/kaae/issues/69","repository_url":"https://api.github.com/repos/sirensolutions/kaae","labels_url":"https://api.github.com/repos/sirensolutions/kaae/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/sirensolutions/kaae/issues/69/comments","events_url":"https://api.github.com/repos/sirensolutions/kaae/issues/69/events","html_url":"https://github.com/sirensolutions/kaae/issues/69","id":191967485,"number":69,"title":"Cannot read property 'clear' of undefined","user":{"login":"phachon","id":19726268,"avatar_url":"https://avatars.githubusercontent.com/u/19726268?v=3","gravatar_id":"","url":"https://api.github.com/users/phachon","html_url":"https://github.com/phachon","followers_url":"https://api.github.com/users/phachon/followers","following_url":"https://api.github.com/users/phachon/following{/other_user}","gists_url":"https://api.github.com/users/phachon/gists{/gist_id}","starred_url":"https://api.github.com/users/phachon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phachon/subscriptions","organizations_url":"https://api.github.com/users/phachon/orgs","repos_url":"https://api.github.com/users/phachon/repos","events_url":"https://api.github.com/users/phachon/events{/privacy}","received_events_url":"https://api.github.com/users/phachon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-28T10:20:36Z","updated_at":"2016-11-30T02:53:30Z","closed_at":null,"body":"I have a problem in using kaae.\r\nI can't find any other way to solve that:\r\nHere's my error message\r\n\r\n```\r\nUnhandled rejection TypeError: Cannot read property 'clear' of undefined\r\n    at /usr/local/elk/kibana-4.6.1/installedPlugins/kaae/server/lib/scheduler.js:50:39\r\n    at arrayEach (/usr/local/elk/kibana-4.6.1/installedPlugins/kaae/node_modules/lodash/index.js:1289:13)\r\n    at Function.<anonymous> (/usr/local/elk/kibana-4.6.1/installedPlugins/kaae/node_modules/lodash/index.js:3345:13)\r\n    at /usr/local/elk/kibana-4.6.1/installedPlugins/kaae/server/lib/scheduler.js:48:11\r\n    at tryCatcher (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/util.js:26:23)\r\n    at Promise._settlePromiseFromHandler (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/promise.js:503:31)\r\n    at Promise._settlePromiseAt (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/promise.js:577:18)\r\n    at Promise._settlePromises (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/promise.js:693:14)\r\n    at Async._drainQueue (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/async.js:123:16)\r\n    at Async._drainQueues (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/async.js:133:10)\r\n    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/elk/kibana-4.6.1/node_modules/bluebird/js/main/async.js:15:14)\r\n    at processImmediate [as _immediateCallback] (timers.js:383:17)\r\n\r\n```\r\nHere's my kaae watcher config:\r\n\r\n```\r\n{\r\n  \"_index\": \"watcher\",\r\n  \"_type\": \"watch\",\r\n  \"_id\": \"new_watcher_9emulp85f\",\r\n  \"_score\": 1,\r\n  \"_source\": {\r\n    \"trigger\": {\r\n      \"schedule\": {\r\n        \"later\": \"every 5 minutes\"\r\n      }\r\n    },\r\n    \"input\": {\r\n      \"search\": {\r\n        \"request\": {\r\n          \"index\": [\r\n            \"logstash-nginx\"\r\n          ],\r\n          \"body\": {}\r\n        }\r\n      }\r\n    },\r\n    \"condition\": {\r\n      \"script\": {\r\n        \"script\": \"payload.hits.total > 10\"\r\n      }\r\n    },\r\n    \"transform\": {},\r\n    \"actions\": {\r\n      \"email_admin\": {\r\n        \"throttle_period\": \"15m\",\r\n        \"email\": {\r\n          \"to\": \"phachon@163.com\",\r\n          \"subject\": \"KaaE Alarm test\",\r\n          \"priority\": \"high\",\r\n          \"body\": \"Found {{payload.hits.total}} Events\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\nHow should I modify the configuration?\r\nThanks..."},"comment":{"url":"https://api.github.com/repos/sirensolutions/kaae/issues/comments/263768446","html_url":"https://github.com/sirensolutions/kaae/issues/69#issuecomment-263768446","issue_url":"https://api.github.com/repos/sirensolutions/kaae/issues/69","id":263768446,"user":{"login":"phachon","id":19726268,"avatar_url":"https://avatars.githubusercontent.com/u/19726268?v=3","gravatar_id":"","url":"https://api.github.com/users/phachon","html_url":"https://github.com/phachon","followers_url":"https://api.github.com/users/phachon/followers","following_url":"https://api.github.com/users/phachon/following{/other_user}","gists_url":"https://api.github.com/users/phachon/gists{/gist_id}","starred_url":"https://api.github.com/users/phachon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phachon/subscriptions","organizations_url":"https://api.github.com/users/phachon/orgs","repos_url":"https://api.github.com/users/phachon/repos","events_url":"https://api.github.com/users/phachon/events{/privacy}","received_events_url":"https://api.github.com/users/phachon/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T02:53:30Z","updated_at":"2016-11-30T02:53:30Z","body":"@lmangani , I finally found the cause of the problem by looking at the source code.\r\n\r\ndefault kaae config.json\r\n\r\n```\r\n\"settings\" : {\r\n    \"email\" : {\r\n       \"user\":  \"username\", \r\n       \"password\":  \"password\", \r\n       \"host\":  \"smtp.server.com\", \r\n       \"ssl\":   true,\r\n       \"active\":    false\r\n    },\r\n``` \r\nbecause \"active\": false .....\r\n\r\nserver/lib/actions.js in 186 line \r\n```\r\nif (!email_server || !config.settings.email.active) {\r\n                server.log(['status', 'info', 'Kaae', 'email'], 'Delivery Disabled!');\r\n            }\r\n            else {\r\n                server.log(['status', 'info', 'Kaae', 'email'], 'Delivering to Mail Server');\r\n                email_server.send({\r\n                    text: body,\r\n                    from: action.email.from,\r\n                    to: action.email.to,\r\n                    subject: subject\r\n                }, function (err, message) {\r\n                    server.log(['status', 'info', 'Kaae', 'email'], err || message);\r\n                });\r\n            }\r\n```\r\nso, my server log still print 'Delivery Disabled!'.\r\n\r\nI changed 'active': true , finally succeeded.\r\n\r\nAnyway,thank you very much.\r\n\r\n "}}
{"actor":{"display_login":"phachon"}}