{"id":904,"date":"2023-02-20T01:47:00","date_gmt":"2023-02-20T01:47:00","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=904"},"modified":"2023-02-20T01:47:00","modified_gmt":"2023-02-20T01:47:00","slug":"how-to-setup-and-push-serverapplication-logs-to-aws-cloudwatch","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=904","title":{"rendered":"How To Push ec2 Logs to Cloudwatch [Logs And Metrics]"},"content":{"rendered":"<p>In this blog, I will show you how to push ec2 logs to Cloudwatch using the Cloudwatch agent. You can also send ec2 system metrics to cloudwatch.<\/p>\n<p>This article walks you through the steps involved in configuring the Cloudwatch agent on an ec2 instance and configuring it to push the logs and metrics generated by the applications &amp; system services.<\/p>\n<p>Here is what you are going to learn in this blog.<\/p>\n<h2 id=\"aws-cloud-watch-agent-use-cases\">AWS Cloud Watch Agent Use Cases<\/h2>\n<p>AWS Cloudwatch logs service has the capability to store custom logs and process metrics generated from your application instances. Here are some example use cases for custom logs and metrics<\/p>\n<ol>\n<li>Web server  (Nginx, Apache, etc ) access or error logs can be pushed to Cloudwatch logs it acts as central log management for your applications running on AWS<\/li>\n<li>Custom application logs (java, python, etc) can be pushed to cloudwatch and you can set up custom dashboards and alerts based on log patterns.<\/li>\n<li>Ec2 instance metrics\/custom system metrics\/ app metrics can be pushed to cloudwatch.<\/li>\n<\/ol>\n<h2 id=\"application-logs-to-aws-cloudwatch-workflow\">Application Logs To AWS Cloudwatch Workflow<\/h2>\n<p>You can send logs from any number of ec2 sources to Cloudwatch. All you need to have is a Cloudwatch agent running on your instance.<\/p>\n<p>Here is what you have to do<\/p>\n<ol>\n<li>Create a custom ec2 IAM role with Cloudwatch log write access<\/li>\n<li>Install Cloudwatch logs ec2 agent<\/li>\n<li>Configure log sources in the Cloudwatch agent configuration file.<\/li>\n<li>Start the agent with the configuration file.<\/li>\n<li>Validate logs in the Cloudwatch dashboard.<\/li>\n<\/ol>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note: <\/strong><\/b>In an actual project implemention the cloudwatch ec2 agent and configuration would be part of the AMI (Golden Image) or AMI packaging tool like <a href=\"https:\/\/devopscube.com\/packer-tutorial-for-beginners\/\" rel=\"noreferrer noopener\">packer<\/a>.<\/div>\n<\/div>\n<figure class=\"kg-card kg-image-card kg-card-hascaption\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/app_cloudwatch_logs-min-1-1.png\" class=\"kg-image\" alt=\"Application Logs To Cloudwatch\" loading=\"lazy\" width=\"905\" height=\"585\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/app_cloudwatch_logs-min-1-1.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/app_cloudwatch_logs-min-1-1.png 905w\" sizes=\"auto, (min-width: 720px) 720px\"><figcaption><span style=\"white-space: pre-wrap;\">Click to view in HD<\/span><\/figcaption><\/figure>\n<p>Let&#8217;s get started with the setup.<\/p>\n<h2 id=\"create-an-iam-role-for-cloudwatch-agent\">Create an IAM role for Cloudwatch Agent<\/h2>\n<p>To set up AWS custom logs, first, you need to create and add a custom ec2 IAM role to your instance. This IAM role will have policies with write access to the Cloudwatch service so that all the logs from ec2 instances can be shipped to Cloudwatch. <\/p>\n<p>Before creating a role, you need to create a custom policy.<\/p>\n<p><strong>Step 1:<\/strong> Head over to AWS IAM &#8211;&gt; Policies&#8211;&gt; Create Policy<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-7-49.png\" class=\"kg-image\" alt=\"Create policy for cloudwatch custom logs\" loading=\"lazy\" width=\"619\" height=\"189\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-7-49.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-7-49.png 619w\"><\/figure>\n<p><strong>Step 2:<\/strong> Select the JSON option<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-5-57.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"841\" height=\"296\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-5-57.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-5-57.png 841w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p><strong>Step 3:<\/strong> Copy the following content in the policy block. We are allowing the required permissions and the logs arn details. Read <a href=\"https:\/\/devopscube.com\/aws-arn-guide\/\" rel=\"noreferrer noopener\">AWS arn detailed guide<\/a> to know more about arn.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\">{<br \/> &#8220;Version&#8221;: &#8220;2012-10-17&#8221;,<br \/> &#8220;Statement&#8221;: [<br \/> {<br \/> &#8220;Effect&#8221;: &#8220;Allow&#8221;,<br \/> &#8220;Action&#8221;: [<br \/> &#8220;logs:CreateLogGroup&#8221;,<br \/> &#8220;logs:CreateLogStream&#8221;,<br \/> &#8220;logs:PutLogEvents&#8221;,<br \/> &#8220;logs:DescribeLogStreams&#8221;<br \/> ],<br \/> &#8220;Resource&#8221;: [<br \/> &#8220;arn:aws:logs:*:*:*&#8221;<br \/> ]<br \/> }<br \/> ]<br \/>}<\/div>\n<\/div>\n<p>On the next page, add a tag to the policy. Give a name, and description for your policy, and click <code>Next<\/code><\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-16-37.png\" class=\"kg-image\" alt=\"Cloudwatch policy tag\" loading=\"lazy\" width=\"571\" height=\"268\"><\/figure>\n<p>On the next page, add a policy name, and description and click create policy.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-17-31.png\" class=\"kg-image\" alt=\"create IAM policy for pushing cloudwatch logs\" loading=\"lazy\" width=\"603\" height=\"513\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-17-31.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-17-31.png 603w\"><\/figure>\n<p>Once you create the policy, you need to create a role with the custom policy you have created.<\/p>\n<p><strong>Step 4:<\/strong> Head over to AWS IAM &#8211;&gt; Roles &#8211;&gt; Create Role and select options as shown below.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-6-39.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"1043\" height=\"432\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-6-39.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-6-39.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-6-39.png 1043w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<p><strong>Step 5: <\/strong>From the filter, select &#8220;Customer Managed&#8221; and <strong>select the Policy <\/strong>you created in step 3.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-7-51.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"608\" height=\"243\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-7-51.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-7-51.png 608w\"><\/figure>\n<p><strong>Step 6: <\/strong>Next, enter a role name and create the role.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-8-42.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"605\" height=\"268\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-8-42.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-8-42.png 605w\"><\/figure>\n<h2 id=\"add-the-cloudwatch-role-to-the-instance\">Add the Cloudwatch Role to the Instance<\/h2>\n<p>Follow the steps given below to add the custom IAM role to the ec2 instance where you want to set up the cloud watch agent.<\/p>\n<ol>\n<li>Head over to ec2 and select the instance in which you want to configure the custom logs.<\/li>\n<li>Right-click for options and select <code>Security<\/code> and then choose <code>Modify IAM Role<\/code> option.<\/li>\n<li>Select the custom cloud watch IAM role from the dropdown and save it.<\/li>\n<\/ol>\n<h2 id=\"install-cloudwatch-logs-agent\">Install Cloudwatch Logs Agent<\/h2>\n<p>SSH into the ec2 instance and follow the steps given below.<\/p>\n<p><strong>Step 1:<\/strong> Head over to the <a href=\"https:\/\/docs.aws.amazon.com\/AmazonCloudWatch\/latest\/monitoring\/verify-CloudWatch-Agent-Package-Signature.html?ref=devopscube.com\" rel=\"noreferrer noopener\">Cloudwatch agent downloads page<\/a>. You can select region-wise packages as well.<\/p>\n<p><strong>Step 2: <\/strong>Download the appropriate agent installation file.<\/p>\n<p>In my case it&#8217;s ubuntu. I am downloading the latest Ubuntu package and installing it.<\/p>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\">wget https:\/\/s3.amazonaws.com\/amazoncloudwatch-agent\/ubuntu\/amd64\/latest\/amazon-cloudwatch-agent.deb sudo dpkg -i amazon-cloudwatch-agent.deb<\/div>\n<\/div>\n<p>Redhat users,<\/p>\n<pre><code>https:\/\/s3.amazonaws.com\/amazoncloudwatch-agent\/redhat\/amd64\/latest\/amazon-cloudwatch-agent.rpm\nrpm -U amazon-cloudwatch-agent.rpm<\/code><\/pre>\n<h2 id=\"configure-cloudwatch-agent\">Configure Cloudwatch Agent<\/h2>\n<p>After the installation, you can find all the cloudwatch agent-related config files and executables in the following location.<\/p>\n<pre><code>\/opt\/aws\/amazon-cloudwatch-agent<\/code><\/pre>\n<p>Here is the tree structure of the files present in the directory.<\/p>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-19-32.png\" class=\"kg-image\" alt=\"AWS cloudwatch agent executables and config files\" loading=\"lazy\" width=\"427\" height=\"449\"><\/figure>\n<p>If you are just starting with a cloud watch agent, it is better to run the cloud watch agent wizard that helps you create the log agent configurations.<\/p>\n<pre><code>sudo \/opt\/aws\/amazon-cloudwatch-agent\/bin\/amazon-cloudwatch-agent-config-wizard<\/code><\/pre>\n<p>It prompts you with all the agent-related questions. Execute the following command to start the wizard.<\/p>\n<p>For the question, Do you want to store the config in the SSM parameter store?, select No.<\/p>\n<p>The final config files get stored in the following location<\/p>\n<pre><code>\/opt\/aws\/amazon-cloudwatch-agent\/bin\/config.json<\/code><\/pre>\n<p>If you want to collect the system metrics, install collected on your server.<\/p>\n<pre><code>sudo apt-get update -y\nsudo apt-get install collectd<\/code><\/pre>\n<p>In my case, I am going to replace the default <code>config.json<\/code> with a custom <code>config.json<\/code> that collects the following logs and system metrics using collectd.<\/p>\n<ol>\n<li>Cloudwatch agent logs<\/li>\n<li>System logs from \/var\/log\/messages<\/li>\n<li>Nginx access logs from \/var\/log\/nginx\/access.log<\/li>\n<li>Nginx error logs from \/var\/log\/nginx\/error.log<\/li>\n<\/ol>\n<div class=\"kg-card kg-callout-card kg-callout-card-grey\">\n<div class=\"kg-callout-text\"><b><strong style=\"white-space: pre-wrap;\">Note: <\/strong><\/b>Install Nginx, if you want to follow the following configs for testing purposes. Or you can use you can replace the log locations with your applcation log path.<\/div>\n<\/div>\n<p>Here is the final cloudwatch agent config.<\/p>\n<pre><code>{\n\t\"agent\": {\n\t  \"metrics_collection_interval\": 10,\n\t  \"run_as_user\": \"root\"\n\t},\n\t\"logs\": {\n\t  \"logs_collected\": {\n\t\t\"files\": {\n\t\t  \"collect_list\": [\n\t\t\t{\n\t\t\t  \"file_path\": \"\/opt\/aws\/amazon-cloudwatch-agent\/logs\/amazon-cloudwatch-agent.log\",\n\t\t\t  \"log_group_name\": \"\/apps\/CloudWatchAgentLog\/\",\n\t\t\t  \"log_stream_name\": \"{ip_address}_{instance_id}\",\n\t\t\t  \"timezone\": \"Local\"\n\t\t\t},\n\t\t\t{\n\t\t\t  \"file_path\": \"\/var\/log\/messages\",\n\t\t\t  \"log_group_name\": \"\/apps\/system\/messages\",\n\t\t\t  \"log_stream_name\": \"{ip_address}_{instance_id}\",\n\t\t\t  \"timestamp_format\": \"%b %d %H:%M:%S\",\n\t\t\t  \"timezone\": \"Local\"\n\t\t\t},\n\t\t\t{\n\t\t\t  \"file_path\": \"\/var\/log\/nginx\/access.log\",\n\t\t\t  \"log_group_name\": \"\/apps\/webservers\/nginx\/access\",\n\t\t\t  \"log_stream_name\": \"{ip_address}_{instance_id}\",\n\t\t\t  \"timestamp_format\": \"%d\/%b\/%Y:%H:%M:%S %z\",\n\t\t\t  \"timezone\": \"Local\"\n\t\t\t}\n\t\t  ]\n\t\t}\n\t  }\n\t},\n\t\"metrics\": {\n\t  \"aggregation_dimensions\": [\n\t\t[\n\t\t  \"InstanceId\"\n\t\t]\n\t  ],\n\t  \"append_dimensions\": {\n\t\t\"AutoScalingGroupName\": \"${aws:AutoScalingGroupName}\",\n\t\t\"ImageId\": \"${aws:ImageId}\",\n\t\t\"InstanceId\": \"${aws:InstanceId}\",\n\t\t\"InstanceType\": \"${aws:InstanceType}\"\n\t  },\n\t  \"metrics_collected\": {\n\t\t\"collectd\": {\n\t\t  \"metrics_aggregation_interval\": 60\n\t\t},\n\t\t\"disk\": {\n\t\t  \"measurement\": [\n\t\t\t\"used_percent\"\n\t\t  ],\n\t\t  \"metrics_collection_interval\": 10,\n\t\t  \"resources\": [\n\t\t\t\"*\"\n\t\t  ]\n\t\t},\n\t\t\"mem\": {\n\t\t  \"measurement\": [\n\t\t\t\"mem_used_percent\"\n\t\t  ],\n\t\t  \"metrics_collection_interval\": 10\n\t\t},\n\t\t\"statsd\": {\n\t\t  \"metrics_aggregation_interval\": 60,\n\t\t  \"metrics_collection_interval\": 10,\n\t\t  \"service_address\": \":8125\"\n\t\t}\n\t  }\n\t}\n  }<\/code><\/pre>\n<p>Now, let&#8217;s start the Cloudwatch agent using the following.<\/p>\n<pre><code>sudo \/opt\/aws\/amazon-cloudwatch-agent\/bin\/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:\/opt\/aws\/amazon-cloudwatch-agent\/bin\/config.json -s<\/code><\/pre>\n<p>You can check the agent status using the following command.<\/p>\n<pre><code>sudo \/opt\/aws\/amazon-cloudwatch-agent\/bin\/amazon-cloudwatch-agent-ctl -a status<\/code><\/pre>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-20-34.png\" class=\"kg-image\" alt=\"\" loading=\"lazy\" width=\"618\" height=\"219\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-20-34.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-20-34.png 618w\"><\/figure>\n<h3 id=\"validating-custom-logs-in-cloudwatch-dashboard\">Validating Custom Logs in Cloudwatch Dashboard<\/h3>\n<p>Once the setup is done, you can view all the configured logs under the cloudwatch dashboard (under the logs option)<\/p>\n<ol>\n<li>Go to Logs &#8211;&gt; Log Groups and you will see the log group you mentioned in the agent configuration.<\/li>\n<li>Select the log group and you should see the instance identified you mentioned in the config.<\/li>\n<li>If you click the instance identifier,  it shows all the logs. You can use the cloud watch filter option to filter and query required logs.<\/li>\n<\/ol>\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-9-31.png\" class=\"kg-image\" alt=\"cloudwatch ec2 application logs\" loading=\"lazy\" width=\"950\" height=\"408\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-9-31.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-9-31.png 950w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>I have explained the Cloudwatch logs agent setup to push application logs to the Cloudwatch logging service. It is a manual setup.<\/p>\n<p>If you <strong>want this to be automated<\/strong>, all the agent configuration has to be baked in the ec2 AMI. Few configurations can be added at the system startup using the user data scripts. Again, it depends on what workflow you are opting for.<\/p>\n<p>Not only just logs, but you can also push custom metrics to cloudwatch for monitoring.<\/p>\n<p>If you face any issues or have any different ideas, do let me know in the comment section.<\/p>\n<hr>\n<p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/how-to-setup-and-push-serverapplication-logs-to-aws-cloudwatch\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Push ec2 Logs to Cloudwatch [Logs And Metrics] \u2014 DevOpsCube<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/how-to-setup-and-push-serverapplication-logs-to-aws-cloudwatch\/<\/p>\n","protected":false},"author":1,"featured_media":905,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-904","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=904"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/904\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/905"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}