{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/documentation/pulls/comments/196111204","pull_request_review_id":129602618,"id":196111204,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjExMTIwNA==","diff_hunk":"@@ -0,0 +1,68 @@\n+---\n+title: How to remap custom severity values to the official log status?\n+kind: faq\n+disable_toc: true\n+further_reading:\n+- link: \"logs/log_collection/#custom-log-collection\"\n+  tag: \"Documentation\"\n+  text: Learn more about Log collection with the Agent\n+- link: \"logs/processing\"\n+  tag: \"Documentation\"\n+  text: Learn how to process your logs\n+- link: \"logs/parsing\"\n+  tag: \"Documentation\"\n+  text: Learn more about parsing\n+---\n+\n+By default, the [Log Status Remapper][1] relies on the [Syslog severity standards][2].  \n+However there might be other systems having different severity values that you might want to remap on the official log status.\n+This is possible thanks to the [Category Processor][3] that defines a mapping between your custom values and the expected ones.\n+\n+In this article develop how to do this with 2 examples: Bunyan levels and web access logs.\n+\n+\n+## Web Access logs\n+\n+The status code of the request can be used to determine the log status. Our integrations use the following mapping:\n+\n+* 2xx: OK\n+* 3xx: Notice\n+* 4xx: Warning\n+* 5xx: Error\n+\n+Let's assume the status code of your log is stored in the `http.status_code` attribute.\n+Add a Category Processor in your pipeline that creates a new attribute to reflect the above mapping:\n+\n+{{< img src=\"logs/faq/category_processor.png\" alt=\"Category processor\" responsive=\"true\" popup=\"true\">}}\n+\n+Then add a status remapper that uses the newly created attribute:\n+\n+{{< img src=\"logs/faq/log_status_remapper.png\" alt=\"log status remapper\" responsive=\"true\" popup=\"true\">}}\n+\n+## Bunyan levels\n+\n+Bunyan levels are similar to the Syslog one but with a value multiplied by 10.","path":"content/logs/faq/how-to-remap-custom-severity-values-to-the-official-log-status.md","position":null,"original_position":44,"commit_id":"aeb51b17293bd0896732f34435fb5c0b930906ad","original_commit_id":"5e5ce8790699099e4055d5218bcfa2af40eacfe1","user":{"login":"NBParis","id":26930812,"node_id":"MDQ6VXNlcjI2OTMwODEy","avatar_url":"https://avatars1.githubusercontent.com/u/26930812?v=4","gravatar_id":"","url":"https://api.github.com/users/NBParis","html_url":"https://github.com/NBParis","followers_url":"https://api.github.com/users/NBParis/followers","following_url":"https://api.github.com/users/NBParis/following{/other_user}","gists_url":"https://api.github.com/users/NBParis/gists{/gist_id}","starred_url":"https://api.github.com/users/NBParis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NBParis/subscriptions","organizations_url":"https://api.github.com/users/NBParis/orgs","repos_url":"https://api.github.com/users/NBParis/repos","events_url":"https://api.github.com/users/NBParis/events{/privacy}","received_events_url":"https://api.github.com/users/NBParis/received_events","type":"User","site_admin":false},"body":"Done, thanks","created_at":"2018-06-18T15:00:41Z","updated_at":"2018-06-18T15:00:41Z","html_url":"https://github.com/DataDog/documentation/pull/2632#discussion_r196111204","pull_request_url":"https://api.github.com/repos/DataDog/documentation/pulls/2632","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DataDog/documentation/pulls/comments/196111204"},"html":{"href":"https://github.com/DataDog/documentation/pull/2632#discussion_r196111204"},"pull_request":{"href":"https://api.github.com/repos/DataDog/documentation/pulls/2632"}},"in_reply_to_id":196108488},"pull_request":{"url":"https://api.github.com/repos/DataDog/documentation/pulls/2632","id":194528287,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTI4Mjg3","html_url":"https://github.com/DataDog/documentation/pull/2632","diff_url":"https://github.com/DataDog/documentation/pull/2632.diff","patch_url":"https://github.com/DataDog/documentation/pull/2632.patch","issue_url":"https://api.github.com/repos/DataDog/documentation/issues/2632","number":2632,"state":"open","locked":false,"title":"[Logs FAQ] How to remap custom severity values","user":{"login":"NBParis","id":26930812,"node_id":"MDQ6VXNlcjI2OTMwODEy","avatar_url":"https://avatars1.githubusercontent.com/u/26930812?v=4","gravatar_id":"","url":"https://api.github.com/users/NBParis","html_url":"https://github.com/NBParis","followers_url":"https://api.github.com/users/NBParis/followers","following_url":"https://api.github.com/users/NBParis/following{/other_user}","gists_url":"https://api.github.com/users/NBParis/gists{/gist_id}","starred_url":"https://api.github.com/users/NBParis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NBParis/subscriptions","organizations_url":"https://api.github.com/users/NBParis/orgs","repos_url":"https://api.github.com/users/NBParis/repos","events_url":"https://api.github.com/users/NBParis/events{/privacy}","received_events_url":"https://api.github.com/users/NBParis/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nThis article explains how custom status level can be remapped to the official log status\r\n\r\n### Motivation\r\nThe category remapper was recently added. This was the missing piece to allow such a feature.\r\n\r\n### Preview link\r\nhttps://docs-staging.datadoghq.com/nils/log-faq-custom-status-remapper/\r\n\r\n### Additional Notes\r\n<!-- Anything else we should know when reviewing?-->\r\n","created_at":"2018-06-13T09:46:17Z","updated_at":"2018-06-18T15:00:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b6995dfed3d22ad4f3c97c7137d2348731c1bb0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"l0k0ms","id":3624790,"node_id":"MDQ6VXNlcjM2MjQ3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3624790?v=4","gravatar_id":"","url":"https://api.github.com/users/l0k0ms","html_url":"https://github.com/l0k0ms","followers_url":"https://api.github.com/users/l0k0ms/followers","following_url":"https://api.github.com/users/l0k0ms/following{/other_user}","gists_url":"https://api.github.com/users/l0k0ms/gists{/gist_id}","starred_url":"https://api.github.com/users/l0k0ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l0k0ms/subscriptions","organizations_url":"https://api.github.com/users/l0k0ms/orgs","repos_url":"https://api.github.com/users/l0k0ms/repos","events_url":"https://api.github.com/users/l0k0ms/events{/privacy}","received_events_url":"https://api.github.com/users/l0k0ms/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":794805742,"node_id":"MDU6TGFiZWw3OTQ4MDU3NDI=","url":"https://api.github.com/repos/DataDog/documentation/labels/KB/FAQ","name":"KB/FAQ","color":"fbca04","default":false},{"id":955350618,"node_id":"MDU6TGFiZWw5NTUzNTA2MTg=","url":"https://api.github.com/repos/DataDog/documentation/labels/Logs","name":"Logs","color":"6ac6ed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DataDog/documentation/pulls/2632/commits","review_comments_url":"https://api.github.com/repos/DataDog/documentation/pulls/2632/comments","review_comment_url":"https://api.github.com/repos/DataDog/documentation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/documentation/issues/2632/comments","statuses_url":"https://api.github.com/repos/DataDog/documentation/statuses/aeb51b17293bd0896732f34435fb5c0b930906ad","head":{"label":"DataDog:nils/log-faq-custom-status-remapper","ref":"nils/log-faq-custom-status-remapper","sha":"aeb51b17293bd0896732f34435fb5c0b930906ad","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":2967233,"node_id":"MDEwOlJlcG9zaXRvcnkyOTY3MjMz","name":"documentation","full_name":"DataDog/documentation","owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/documentation","description":"The source for Datadog's documentation site.","fork":false,"url":"https://api.github.com/repos/DataDog/documentation","forks_url":"https://api.github.com/repos/DataDog/documentation/forks","keys_url":"https://api.github.com/repos/DataDog/documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/documentation/teams","hooks_url":"https://api.github.com/repos/DataDog/documentation/hooks","issue_events_url":"https://api.github.com/repos/DataDog/documentation/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/documentation/events","assignees_url":"https://api.github.com/repos/DataDog/documentation/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/documentation/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/documentation/tags","blobs_url":"https://api.github.com/repos/DataDog/documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/documentation/languages","stargazers_url":"https://api.github.com/repos/DataDog/documentation/stargazers","contributors_url":"https://api.github.com/repos/DataDog/documentation/contributors","subscribers_url":"https://api.github.com/repos/DataDog/documentation/subscribers","subscription_url":"https://api.github.com/repos/DataDog/documentation/subscription","commits_url":"https://api.github.com/repos/DataDog/documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/documentation/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/documentation/merges","archive_url":"https://api.github.com/repos/DataDog/documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/documentation/downloads","issues_url":"https://api.github.com/repos/DataDog/documentation/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/documentation/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/documentation/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/documentation/deployments","created_at":"2011-12-12T20:32:29Z","updated_at":"2018-06-18T14:10:03Z","pushed_at":"2018-06-18T15:00:08Z","git_url":"git://github.com/DataDog/documentation.git","ssh_url":"git@github.com:DataDog/documentation.git","clone_url":"https://github.com/DataDog/documentation.git","svn_url":"https://github.com/DataDog/documentation","homepage":"http://docs.datadoghq.com","size":240924,"stargazers_count":47,"watchers_count":47,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":97,"open_issues":8,"watchers":47,"default_branch":"master"}},"base":{"label":"DataDog:master","ref":"master","sha":"e8e7cd09bfd8280be111a5ddc90f62ddd769688f","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":2967233,"node_id":"MDEwOlJlcG9zaXRvcnkyOTY3MjMz","name":"documentation","full_name":"DataDog/documentation","owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataDog/documentation","description":"The source for Datadog's documentation site.","fork":false,"url":"https://api.github.com/repos/DataDog/documentation","forks_url":"https://api.github.com/repos/DataDog/documentation/forks","keys_url":"https://api.github.com/repos/DataDog/documentation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/documentation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/documentation/teams","hooks_url":"https://api.github.com/repos/DataDog/documentation/hooks","issue_events_url":"https://api.github.com/repos/DataDog/documentation/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/documentation/events","assignees_url":"https://api.github.com/repos/DataDog/documentation/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/documentation/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/documentation/tags","blobs_url":"https://api.github.com/repos/DataDog/documentation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/documentation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/documentation/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/documentation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/documentation/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/documentation/languages","stargazers_url":"https://api.github.com/repos/DataDog/documentation/stargazers","contributors_url":"https://api.github.com/repos/DataDog/documentation/contributors","subscribers_url":"https://api.github.com/repos/DataDog/documentation/subscribers","subscription_url":"https://api.github.com/repos/DataDog/documentation/subscription","commits_url":"https://api.github.com/repos/DataDog/documentation/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/documentation/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/documentation/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/documentation/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/documentation/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/documentation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/documentation/merges","archive_url":"https://api.github.com/repos/DataDog/documentation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/documentation/downloads","issues_url":"https://api.github.com/repos/DataDog/documentation/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/documentation/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/documentation/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/documentation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/documentation/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/documentation/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/documentation/deployments","created_at":"2011-12-12T20:32:29Z","updated_at":"2018-06-18T14:10:03Z","pushed_at":"2018-06-18T15:00:08Z","git_url":"git://github.com/DataDog/documentation.git","ssh_url":"git@github.com:DataDog/documentation.git","clone_url":"https://github.com/DataDog/documentation.git","svn_url":"https://github.com/DataDog/documentation","homepage":"http://docs.datadoghq.com","size":240924,"stargazers_count":47,"watchers_count":47,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":97,"open_issues":8,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/documentation/pulls/2632"},"html":{"href":"https://github.com/DataDog/documentation/pull/2632"},"issue":{"href":"https://api.github.com/repos/DataDog/documentation/issues/2632"},"comments":{"href":"https://api.github.com/repos/DataDog/documentation/issues/2632/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/documentation/pulls/2632/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/documentation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/documentation/pulls/2632/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/documentation/statuses/aeb51b17293bd0896732f34435fb5c0b930906ad"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"NBParis"}}