{"action":"opened","issue":{"url":"https://api.github.com/repos/chaos/powerman/issues/29","repository_url":"https://api.github.com/repos/chaos/powerman","labels_url":"https://api.github.com/repos/chaos/powerman/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/chaos/powerman/issues/29/comments","events_url":"https://api.github.com/repos/chaos/powerman/issues/29/events","html_url":"https://github.com/chaos/powerman/issues/29","id":388421639,"node_id":"MDU6SXNzdWUzODg0MjE2Mzk=","number":29,"title":"generate syslog message on power actions","user":{"login":"garlick","id":169947,"node_id":"MDQ6VXNlcjE2OTk0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/169947?v=4","gravatar_id":"","url":"https://api.github.com/users/garlick","html_url":"https://github.com/garlick","followers_url":"https://api.github.com/users/garlick/followers","following_url":"https://api.github.com/users/garlick/following{/other_user}","gists_url":"https://api.github.com/users/garlick/gists{/gist_id}","starred_url":"https://api.github.com/users/garlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlick/subscriptions","organizations_url":"https://api.github.com/users/garlick/orgs","repos_url":"https://api.github.com/users/garlick/repos","events_url":"https://api.github.com/users/garlick/events{/privacy}","received_events_url":"https://api.github.com/users/garlick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-06T22:16:39Z","updated_at":"2018-12-06T22:16:39Z","closed_at":null,"author_association":"MEMBER","body":"From @ofaaland (edited):\r\n\r\n>  I don't see any existing option to tell powerman to log via syslog when it changes power state (power on/off/reset).  I find that I sometimes wish I knew - right now because I'm troubleshooting pacemaker, the successor to heartbeat, and sometimes because I want to tell if someone else is messing with the same cluster I am.  And, it irks me a little that we track lots of other state changes, but not that one.\r\n\r\nThis seems entirely reasonable to me and I'm somewhat surprised that we haven't already done this.  The only potential concern I have is generating a flood of syslog messages when turning a large cluster on and off, e.g. `pm -1 node[0-4095]` should not generate 4K log messages.  Maybe just one for the original request?\r\n\r\nWe should also be sure powermand does not log messages when running from test mode.  One possibility would be to have logging off by default, and then turn it on where it's needed via a new `powerman.conf` option like\r\n```\r\n# Uncomment to enable logging of power on/off requests\r\n# Usage: syslog facility[.level]\r\n# Powerman accepts the same facility[.level] strings or numbers as logger(1)\r\nsyslog local3.info\r\n```"}}
{"actor":{"display_login":"garlick"}}