{"action":"created","comment":{"url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/comments/87702528","pull_request_review_id":8306550,"id":87702528,"diff_hunk":"@@ -0,0 +1,226 @@\n+.. _monitoring_features/event_handlers:\n+\n+==============\n+Event Handlers \n+==============\n+\n+\n+Introduction \n+============\n+\n+.. image:: /_static/images///official/images/eventhandlers.png\n+   :scale: 90 %\n+\n+Event handlers are optional system commands (scripts or executables) that are run whenever a host or service state change occurs.\n+\n+An obvious use for event handlers is the ability for Alignak to pro-actively fix problems before anyone is\n+notified. Some other uses for event handlers include:\n+\n+  * Restarting a failed service\n+  * Entering a trouble ticket into a helpdesk system\n+  * Logging event information to a database\n+  * Cycling power on/off a host\n+  * etc.\n+\n+Cycling power on a host that is experiencing problems with an automated script should not be implemented lightly. Consider the consequences of this carefully before implementing automatic reboots. :-)\n+\n+\n+When Are Event Handlers Executed? \n+=================================\n+\n+Event handlers are executed when a service or host:\n+\n+  * Is in a SOFT problem state\n+  * Initially goes into a HARD problem state\n+  * Initially recovers from a SOFT or HARD problem state\n+\n+\n+\n+Event Handler Types \n+===================\n+\n+There are different types of optional event handlers that you can define to handle host and state changes:\n+\n+  * Global host event handler\n+  * Global service event handler\n+  * Host-specific event handlers\n+  * Service-specific event handlers\n+\n+Global host and service event handlers are run for every host or service state change that occurs,\n+immediately prior to any host (or service) specific event handler that may be run.\n+\n+Event handlers offer functionality similar to notifications (launch some command) but are called each\n+state change, soft or hard. This allows to call handler function and react to problems before Alignak\n+raises a hard state and starts sending out notifications.\n+\n+You can specify global event handler commands by using the ``global_host_event_handler`` and ``global_service_event_handler``\n+options in your main configuration file.\n+\n+Individual hosts and services can have their own event handler command that should be run to handle state\n+changes. You can specify an event handler that should be run by using the ``event_handler`` directive in\n+your host and service definitions.\n+These host (and service) specific event handlers are executed immediately after the (optional) global host or service event handler is executed.\n+\n+\n+Enabling Event Handlers ","path":"source/06_monitoring_features/event_handlers.rst","position":65,"original_position":65,"commit_id":"3e4875514606584294f4d49a393ce1a0350d4a1a","original_commit_id":"3e4875514606584294f4d49a393ce1a0350d4a1a","user":{"login":"ddurieux","id":239744,"avatar_url":"https://avatars.githubusercontent.com/u/239744?v=3","gravatar_id":"","url":"https://api.github.com/users/ddurieux","html_url":"https://github.com/ddurieux","followers_url":"https://api.github.com/users/ddurieux/followers","following_url":"https://api.github.com/users/ddurieux/following{/other_user}","gists_url":"https://api.github.com/users/ddurieux/gists{/gist_id}","starred_url":"https://api.github.com/users/ddurieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddurieux/subscriptions","organizations_url":"https://api.github.com/users/ddurieux/orgs","repos_url":"https://api.github.com/users/ddurieux/repos","events_url":"https://api.github.com/users/ddurieux/events{/privacy}","received_events_url":"https://api.github.com/users/ddurieux/received_events","type":"User","site_admin":false},"body":"typo: `Enabling Event Handlers` -> `Enabling event handlers`","created_at":"2016-11-12T23:42:40Z","updated_at":"2016-11-12T23:42:40Z","html_url":"https://github.com/Alignak-monitoring/alignak-doc/pull/17#discussion_r87702528","pull_request_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/comments/87702528"},"html":{"href":"https://github.com/Alignak-monitoring/alignak-doc/pull/17#discussion_r87702528"},"pull_request":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17","id":93433164,"html_url":"https://github.com/Alignak-monitoring/alignak-doc/pull/17","diff_url":"https://github.com/Alignak-monitoring/alignak-doc/pull/17.diff","patch_url":"https://github.com/Alignak-monitoring/alignak-doc/pull/17.patch","issue_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/17","number":17,"state":"open","locked":false,"title":"Update features","user":{"login":"mohierf","id":2932687,"avatar_url":"https://avatars.githubusercontent.com/u/2932687?v=3","gravatar_id":"","url":"https://api.github.com/users/mohierf","html_url":"https://github.com/mohierf","followers_url":"https://api.github.com/users/mohierf/followers","following_url":"https://api.github.com/users/mohierf/following{/other_user}","gists_url":"https://api.github.com/users/mohierf/gists{/gist_id}","starred_url":"https://api.github.com/users/mohierf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mohierf/subscriptions","organizations_url":"https://api.github.com/users/mohierf/orgs","repos_url":"https://api.github.com/users/mohierf/repos","events_url":"https://api.github.com/users/mohierf/events{/privacy}","received_events_url":"https://api.github.com/users/mohierf/received_events","type":"User","site_admin":false},"body":"- distributed configuration and realms\r\n- hosts checks, notifications, downtimes, flapping\r\n- dependencies, network reachability","created_at":"2016-11-12T08:59:30Z","updated_at":"2016-11-12T23:42:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fb4cb0007ec5d546af4b9ff58422aaabf9ca3540","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17/commits","review_comments_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17/comments","review_comment_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/17/comments","statuses_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/statuses/3e4875514606584294f4d49a393ce1a0350d4a1a","head":{"label":"Alignak-monitoring:update-features","ref":"update-features","sha":"3e4875514606584294f4d49a393ce1a0350d4a1a","user":{"login":"Alignak-monitoring","id":12305279,"avatar_url":"https://avatars.githubusercontent.com/u/12305279?v=3","gravatar_id":"","url":"https://api.github.com/users/Alignak-monitoring","html_url":"https://github.com/Alignak-monitoring","followers_url":"https://api.github.com/users/Alignak-monitoring/followers","following_url":"https://api.github.com/users/Alignak-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/Alignak-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/Alignak-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alignak-monitoring/subscriptions","organizations_url":"https://api.github.com/users/Alignak-monitoring/orgs","repos_url":"https://api.github.com/users/Alignak-monitoring/repos","events_url":"https://api.github.com/users/Alignak-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/Alignak-monitoring/received_events","type":"Organization","site_admin":false},"repo":{"id":36066791,"name":"alignak-doc","full_name":"Alignak-monitoring/alignak-doc","owner":{"login":"Alignak-monitoring","id":12305279,"avatar_url":"https://avatars.githubusercontent.com/u/12305279?v=3","gravatar_id":"","url":"https://api.github.com/users/Alignak-monitoring","html_url":"https://github.com/Alignak-monitoring","followers_url":"https://api.github.com/users/Alignak-monitoring/followers","following_url":"https://api.github.com/users/Alignak-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/Alignak-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/Alignak-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alignak-monitoring/subscriptions","organizations_url":"https://api.github.com/users/Alignak-monitoring/orgs","repos_url":"https://api.github.com/users/Alignak-monitoring/repos","events_url":"https://api.github.com/users/Alignak-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/Alignak-monitoring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alignak-monitoring/alignak-doc","description":null,"fork":false,"url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc","forks_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/forks","keys_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/teams","hooks_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/hooks","issue_events_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/events{/number}","events_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/events","assignees_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/assignees{/user}","branches_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/branches{/branch}","tags_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/tags","blobs_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/languages","stargazers_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/stargazers","contributors_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/contributors","subscribers_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/subscribers","subscription_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/subscription","commits_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/contents/{+path}","compare_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/merges","archive_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/downloads","issues_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues{/number}","pulls_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/labels{/name}","releases_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/releases{/id}","deployments_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/deployments","created_at":"2015-05-22T10:34:27Z","updated_at":"2016-10-06T16:33:10Z","pushed_at":"2016-11-12T17:52:24Z","git_url":"git://github.com/Alignak-monitoring/alignak-doc.git","ssh_url":"git@github.com:Alignak-monitoring/alignak-doc.git","clone_url":"https://github.com/Alignak-monitoring/alignak-doc.git","svn_url":"https://github.com/Alignak-monitoring/alignak-doc","homepage":null,"size":6657,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"Alignak-monitoring:master","ref":"master","sha":"62361c4bde75cea1c7d6f345c357e499c2bd5ce0","user":{"login":"Alignak-monitoring","id":12305279,"avatar_url":"https://avatars.githubusercontent.com/u/12305279?v=3","gravatar_id":"","url":"https://api.github.com/users/Alignak-monitoring","html_url":"https://github.com/Alignak-monitoring","followers_url":"https://api.github.com/users/Alignak-monitoring/followers","following_url":"https://api.github.com/users/Alignak-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/Alignak-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/Alignak-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alignak-monitoring/subscriptions","organizations_url":"https://api.github.com/users/Alignak-monitoring/orgs","repos_url":"https://api.github.com/users/Alignak-monitoring/repos","events_url":"https://api.github.com/users/Alignak-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/Alignak-monitoring/received_events","type":"Organization","site_admin":false},"repo":{"id":36066791,"name":"alignak-doc","full_name":"Alignak-monitoring/alignak-doc","owner":{"login":"Alignak-monitoring","id":12305279,"avatar_url":"https://avatars.githubusercontent.com/u/12305279?v=3","gravatar_id":"","url":"https://api.github.com/users/Alignak-monitoring","html_url":"https://github.com/Alignak-monitoring","followers_url":"https://api.github.com/users/Alignak-monitoring/followers","following_url":"https://api.github.com/users/Alignak-monitoring/following{/other_user}","gists_url":"https://api.github.com/users/Alignak-monitoring/gists{/gist_id}","starred_url":"https://api.github.com/users/Alignak-monitoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alignak-monitoring/subscriptions","organizations_url":"https://api.github.com/users/Alignak-monitoring/orgs","repos_url":"https://api.github.com/users/Alignak-monitoring/repos","events_url":"https://api.github.com/users/Alignak-monitoring/events{/privacy}","received_events_url":"https://api.github.com/users/Alignak-monitoring/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Alignak-monitoring/alignak-doc","description":null,"fork":false,"url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc","forks_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/forks","keys_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/teams","hooks_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/hooks","issue_events_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/events{/number}","events_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/events","assignees_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/assignees{/user}","branches_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/branches{/branch}","tags_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/tags","blobs_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/statuses/{sha}","languages_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/languages","stargazers_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/stargazers","contributors_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/contributors","subscribers_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/subscribers","subscription_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/subscription","commits_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/contents/{+path}","compare_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/merges","archive_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/downloads","issues_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues{/number}","pulls_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls{/number}","milestones_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/milestones{/number}","notifications_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/labels{/name}","releases_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/releases{/id}","deployments_url":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/deployments","created_at":"2015-05-22T10:34:27Z","updated_at":"2016-10-06T16:33:10Z","pushed_at":"2016-11-12T17:52:24Z","git_url":"git://github.com/Alignak-monitoring/alignak-doc.git","ssh_url":"git@github.com:Alignak-monitoring/alignak-doc.git","clone_url":"https://github.com/Alignak-monitoring/alignak-doc.git","svn_url":"https://github.com/Alignak-monitoring/alignak-doc","homepage":null,"size":6657,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17"},"html":{"href":"https://github.com/Alignak-monitoring/alignak-doc/pull/17"},"issue":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/17"},"comments":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/Alignak-monitoring/alignak-doc/statuses/3e4875514606584294f4d49a393ce1a0350d4a1a"}}}}
{"actor":{"display_login":"ddurieux"}}