{"action":"created","issue":{"url":"https://api.github.com/repos/keboola/syrup-queue/issues/7","repository_url":"https://api.github.com/repos/keboola/syrup-queue","labels_url":"https://api.github.com/repos/keboola/syrup-queue/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/keboola/syrup-queue/issues/7/comments","events_url":"https://api.github.com/repos/keboola/syrup-queue/issues/7/events","html_url":"https://github.com/keboola/syrup-queue/issues/7","id":164313110,"node_id":"MDU6SXNzdWUxNjQzMTMxMTA=","number":7,"title":"Remove node kill queue Cloudwatch alarm when instance is terminated.","user":{"login":"Halama","id":903531,"node_id":"MDQ6VXNlcjkwMzUzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/903531?v=4","gravatar_id":"","url":"https://api.github.com/users/Halama","html_url":"https://github.com/Halama","followers_url":"https://api.github.com/users/Halama/followers","following_url":"https://api.github.com/users/Halama/following{/other_user}","gists_url":"https://api.github.com/users/Halama/gists{/gist_id}","starred_url":"https://api.github.com/users/Halama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Halama/subscriptions","organizations_url":"https://api.github.com/users/Halama/orgs","repos_url":"https://api.github.com/users/Halama/repos","events_url":"https://api.github.com/users/Halama/events{/privacy}","received_events_url":"https://api.github.com/users/Halama/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"MiroCillik","id":1488015,"node_id":"MDQ6VXNlcjE0ODgwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1488015?v=4","gravatar_id":"","url":"https://api.github.com/users/MiroCillik","html_url":"https://github.com/MiroCillik","followers_url":"https://api.github.com/users/MiroCillik/followers","following_url":"https://api.github.com/users/MiroCillik/following{/other_user}","gists_url":"https://api.github.com/users/MiroCillik/gists{/gist_id}","starred_url":"https://api.github.com/users/MiroCillik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiroCillik/subscriptions","organizations_url":"https://api.github.com/users/MiroCillik/orgs","repos_url":"https://api.github.com/users/MiroCillik/repos","events_url":"https://api.github.com/users/MiroCillik/events{/privacy}","received_events_url":"https://api.github.com/users/MiroCillik/received_events","type":"User","site_admin":false},"assignees":[{"login":"MiroCillik","id":1488015,"node_id":"MDQ6VXNlcjE0ODgwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1488015?v=4","gravatar_id":"","url":"https://api.github.com/users/MiroCillik","html_url":"https://github.com/MiroCillik","followers_url":"https://api.github.com/users/MiroCillik/followers","following_url":"https://api.github.com/users/MiroCillik/following{/other_user}","gists_url":"https://api.github.com/users/MiroCillik/gists{/gist_id}","starred_url":"https://api.github.com/users/MiroCillik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiroCillik/subscriptions","organizations_url":"https://api.github.com/users/MiroCillik/orgs","repos_url":"https://api.github.com/users/MiroCillik/repos","events_url":"https://api.github.com/users/MiroCillik/events{/privacy}","received_events_url":"https://api.github.com/users/MiroCillik/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-07-07T13:48:09Z","updated_at":"2019-02-08T13:54:12Z","closed_at":null,"author_association":"MEMBER","body":"Pro každou EC2 instanci na které běží syrup queue je vytvořena SQS fronta která poslouchá SNS (pub-sub) do které jdou příkazy pro killování jobů. https://github.com/keboola/syrup-queue/blob/master/Command/InitKillQueueCommand.php\r\n\r\nSpolu s frontou je založen AWS alarm který řve pokud jsou ve frontě nezpracované zprávy. \r\nAlarm je kvůli tomu že občas se stalo že výběr zpráv z fronty \"vytuhnul\" a killování přestalo fungovat.\r\nProblém je v tom že alarm se po vypnutí instance sám nezruší a místo toho zařve a flloduje #support_maintenance kde je potom potřeba ověřovat jestli jde o planý poplach nebo ne. Alarm je v případě že šlo o vypnutí instance poté nutné smazat ručně.\r\n\r\nMožnosti fixu:\r\n- alarm nezakládat. Zjistit proč docházelo k \"vytuhnutí\"\r\n- alarm zachovat ale automaticky mazat po vypnutí instance. (např. nějaký cron který kontroluje alarmy vs. instance)\r\n"},"comment":{"url":"https://api.github.com/repos/keboola/syrup-queue/issues/comments/461809823","html_url":"https://github.com/keboola/syrup-queue/issues/7#issuecomment-461809823","issue_url":"https://api.github.com/repos/keboola/syrup-queue/issues/7","id":461809823,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2MTgwOTgyMw==","user":{"login":"MiroCillik","id":1488015,"node_id":"MDQ6VXNlcjE0ODgwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1488015?v=4","gravatar_id":"","url":"https://api.github.com/users/MiroCillik","html_url":"https://github.com/MiroCillik","followers_url":"https://api.github.com/users/MiroCillik/followers","following_url":"https://api.github.com/users/MiroCillik/following{/other_user}","gists_url":"https://api.github.com/users/MiroCillik/gists{/gist_id}","starred_url":"https://api.github.com/users/MiroCillik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiroCillik/subscriptions","organizations_url":"https://api.github.com/users/MiroCillik/orgs","repos_url":"https://api.github.com/users/MiroCillik/repos","events_url":"https://api.github.com/users/MiroCillik/events{/privacy}","received_events_url":"https://api.github.com/users/MiroCillik/received_events","type":"User","site_admin":false},"created_at":"2019-02-08T13:54:12Z","updated_at":"2019-02-08T13:54:12Z","author_association":"MEMBER","body":"Pozeram na to mazanie CW alarmov. \r\nBola by to teda Serverless miniapka, ktora nahodi ten CW Event, ktory bude reagovat na prepnutie EC2 instancie do stavu `terminated` a Lambda funkciu, ktora zmaze prislusny `syrup-queue-kill-alarm`.\r\nhttps://serverless.com/framework/docs/providers/aws/events/cloudwatch-event/\r\n\r\nTento event sa vypali vzdy, ked sa nejaka (kterakoliv) EC2 instancia prepne do stavu \"terminated\". Neda sa tam totiz pouzit prefix ale len `any` alebo `specific id`:\r\n![Alt text](https://monosnap.com/image/dggsXskODaPgEt6b4aGeiu4xuIr3OF.png)\r\n\r\nV tej Lambde potom vyberiem z eventu id instancie a pozriem ci pre nu existuje `syrup-queue-kill-alarm`. Ak existuje, tak tento alarm zmazem.\r\nMoze to kontrolovat aj podla prefixu tej instancie `syrup-*`.\r\n\r\n\r\n"}}
{"actor":{"display_login":"MiroCillik"}}