diff --git a/awscli/examples/application-insights/add-workload.rst b/awscli/examples/application-insights/add-workload.rst new file mode 100644 index 000000000000..408b01b000db --- /dev/null +++ b/awscli/examples/application-insights/add-workload.rst @@ -0,0 +1,27 @@ +**To add a workload to a component** + +This example uses the ``add-workload`` command to add a workload to a component. :: + + aws application-insights add-workload \ + --resource-group-name "sqlserver" \ + --component-name "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56" \ + --workload-configuration file://workload.json + +Contents of ``workload.json``:: + + { + "WorkloadName": "SQL", + "Tier": "SQL_SERVER", + "Configuration": "{\"logs\":[{\"logGroupName\":\"SQL_SERVER-sqlserver\",\"logPath\":\"/var/log/mysql\",\"logType\":\"MYSQL\",\"monitor\":true,\"encoding\":\"utf-16\"}]}" + } + +Output:: + + { + "WorkloadId": "w-0123fb74-fb3b-4dc8-b6cc-aab404a1234", + "WorkloadConfiguration": { + "WorkloadName": "SQL", + "Tier": "SQL_SERVER", + "Configuration": "{\"logs\":[{\"logGroupName\":\"SQL_SERVER-sqlserver\",\"logPath\":\"/var/log/mysql\",\"logType\":\"MYSQL\",\"monitor\":true,\"encoding\":\"utf-16\"}]}" + } + } diff --git a/awscli/examples/application-insights/create-application.rst b/awscli/examples/application-insights/create-application.rst new file mode 100644 index 000000000000..0825e66a60f5 --- /dev/null +++ b/awscli/examples/application-insights/create-application.rst @@ -0,0 +1,22 @@ +**To create an application from a resource group** + +This example uses the ``create-application command`` to create an application from a resource group. :: + + aws application-insights create-application \ + --resource-group-name myapp + +Output:: + + { + "ApplicationInfo": { + "AccountId": "123456789012", + "ResourceGroupName": "myapp", + "LifeCycle": "CREATING", + "OpsCenterEnabled": false, + "CWEMonitorEnabled": false, + "Remarks": "", + "AutoConfigEnabled": false, + "DiscoveryType": "RESOURCE_GROUP_BASED", + "AttachMissingPermission": false + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/create-component.rst b/awscli/examples/application-insights/create-component.rst new file mode 100644 index 000000000000..94dc14cb2ba0 --- /dev/null +++ b/awscli/examples/application-insights/create-component.rst @@ -0,0 +1,10 @@ +**To create a component for an application** + +This example uses the ``create-component command`` to create a component by grouping similar standalone instances to monitor. + + aws application-insights create-component \ + --resource-group-name MYEC2 \ + --component-name mycustomcomp \ + --resource-list arn:aws:ec2:eu-west-1:123456789012:instance/i-0f6bcd63ce2f03f + +This command returns to the prompt if successful \ No newline at end of file diff --git a/awscli/examples/application-insights/create-log-pattern.rst b/awscli/examples/application-insights/create-log-pattern.rst new file mode 100644 index 000000000000..c3fe1f0a3bc7 --- /dev/null +++ b/awscli/examples/application-insights/create-log-pattern.rst @@ -0,0 +1,22 @@ +**To create a log pattern and add it to a log pattern set** + +This example uses the ``create-log-pattern`` command to add an log pattern to a log pattern set. :: + + aws application-insights create-log-pattern \ + --resource-group-name MYEC2 \ + --pattern-set-name SAMPLE \ + --pattern-name new + --pattern error + --rank 750000 + +Output:: + + { + "LogPattern": { + "PatternSetName": "SAMPLE", + "PatternName": "new", + "Pattern": "error", + "Rank": 750000 + }, + "ResourceGroupName": "MYEC2" + } \ No newline at end of file diff --git a/awscli/examples/application-insights/delete-application.rst b/awscli/examples/application-insights/delete-application.rst new file mode 100644 index 000000000000..4f00ffcf9df5 --- /dev/null +++ b/awscli/examples/application-insights/delete-application.rst @@ -0,0 +1,8 @@ +**To delete an application** + +This example uses the ``delete-application`` command to remove the specified application from monitoring. :: + + aws application-insights delete-application \ + --resource-group-name sqlnew + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/delete-component.rst b/awscli/examples/application-insights/delete-component.rst new file mode 100644 index 000000000000..8eeb5451533d --- /dev/null +++ b/awscli/examples/application-insights/delete-component.rst @@ -0,0 +1,9 @@ +**To delete a component from an application** + +This example uses the ``delete-component`` command to ungroup a component from an application. :: + + aws application-insights delete-component \ + --resource-group-name MYEC2 \ + --component-name custom_new + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/delete-log-pattern.rst b/awscli/examples/application-insights/delete-log-pattern.rst new file mode 100644 index 000000000000..e0f8b4f23fc4 --- /dev/null +++ b/awscli/examples/application-insights/delete-log-pattern.rst @@ -0,0 +1,10 @@ +**To delete a log pattern from a log pattern set** + +This example uses the ``delete-log-pattern`` command to remove a log pattern from a log pattern set. :: + + aws application-insights delete-log-pattern \ + --resource-group-name MYEC2 \ + --pattern-set-name MYTEST \ + --pattern-name MYPATTERN + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-application.rst b/awscli/examples/application-insights/describe-application.rst new file mode 100644 index 000000000000..8fc86e7a47a9 --- /dev/null +++ b/awscli/examples/application-insights/describe-application.rst @@ -0,0 +1,22 @@ +**To describe an application** + +This example uses the ``describe-application`` command to describe an application. :: + + aws application-insights describe-application \ + --resource-group-name MYEC2 + +Output:: + + { + "ApplicationInfo": { + "AccountId": "123456789012", + "ResourceGroupName": "MYEC2", + "LifeCycle": "ACTIVE", + "OpsCenterEnabled": false, + "CWEMonitorEnabled": true, + "Remarks": "Monitoring application, detected 1 unconfigured component", + "AutoConfigEnabled": true, + "DiscoveryType": "RESOURCE_GROUP_BASED", + "AttachMissingPermission": true + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-component-configuration-recommendation.rst b/awscli/examples/application-insights/describe-component-configuration-recommendation.rst new file mode 100644 index 000000000000..43bf32d58b73 --- /dev/null +++ b/awscli/examples/application-insights/describe-component-configuration-recommendation.rst @@ -0,0 +1,14 @@ +**To describe a recommendation for a component configuration** + +The following example uses the ``describe-component-configuration-recommendation`` command to describe the recommended configuration for a component. :: + + aws application-insights describe-component-configuration-recommendation \ + --resource-group-name MYEC2 \ + --component-name arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56 \ + --tier DEFAULT + +Output:: + + { + "ComponentConfiguration": "{\n \"alarmMetrics\" : [ {\n \"alarmMetricName\" : \"CPUUtilization\",\n \"monitor\" : true\n }, {\n \"alarmMetricName\" : \"StatusCheckFailed\",\n \"monitor\" : true\n }, {\n \"alarmMetricName\" : \"Processor % Processor Time\",\n \"monitor\" : true\n }, {\n \"alarmMetricName\" : \"Memory % Committed Bytes In Use\",\n \"monitor\" : true\n }, {\n \"alarmMetricName\" : \"LogicalDisk % Free Space\",\n \"monitor\" : true\n }, {\n \"alarmMetricName\" : \"Memory Available Mbytes\",\n \"monitor\" : true\n } ],\n \"logs\" : [ {\n \"logGroupName\" : \"APPLICATION-MYEC2\",\n \"logPath\" : \"\",\n \"logType\" : \"APPLICATION\",\n \"monitor\" : true,\n \"encoding\" : \"utf-8\"\n } ],\n \"windowsEvents\" : [ {\n \"logGroupName\" : \"WINDOWS_EVENTS-Application-MYEC2\",\n \"eventName\" : \"Application\",\n \"eventLevels\" : [ \"WARNING\", \"ERROR\", \"CRITICAL\" ],\n \"monitor\" : true\n }, {\n \"logGroupName\" : \"WINDOWS_EVENTS-System-MYEC2\",\n \"eventName\" : \"System\",\n \"eventLevels\" : [ \"WARNING\", \"ERROR\", \"CRITICAL\" ],\n \"monitor\" : true\n }, {\n \"logGroupName\" : \"WINDOWS_EVENTS-Security-MYEC2\",\n \"eventName\" : \"Security\",\n \"eventLevels\" : [ \"WARNING\", \"ERROR\", \"CRITICAL\" ],\n \"monitor\" : true\n } ],\n \"subComponents\" : [ {\n \"subComponentType\" : \"AWS::EC2::Volume\",\n \"alarmMetrics\" : [ {\n \"alarmMetricName\" : \"BurstBalance\",\n \"monitor\" : true\n } ]\n } ]\n}" + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-component-configuration.rst b/awscli/examples/application-insights/describe-component-configuration.rst new file mode 100644 index 000000000000..439f4a67d53b --- /dev/null +++ b/awscli/examples/application-insights/describe-component-configuration.rst @@ -0,0 +1,15 @@ +**To describe the configuration for a component** + +This example uses the ``describe-component-configuration`` command to describe the configuration of the component. Note: The component name is the ARN of the component and not the resource's name. :: + + aws application-insights describe-component-configuration \ + --resource-group-name MYEC2 \ + --component-name arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56 + +Output:: + + { + "Monitor": true, + "Tier": "DEFAULT", + "ComponentConfiguration": "{\n \"alarmMetrics\" : [ {\n \"alarmMetricName\" : \"CPUUtilization\",\n \"monitor\" : true\n } ],\n \"logs\" : [ ]\n}" + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-component.rst b/awscli/examples/application-insights/describe-component.rst new file mode 100644 index 000000000000..6c8ee8c89fca --- /dev/null +++ b/awscli/examples/application-insights/describe-component.rst @@ -0,0 +1,25 @@ +**To describe a component and its resources in an application** + +This example uses the ``describe-component`` command to describe a component and lists the resources that are grouped together in a component. Note: The component name is the ARN of the component and not the resource's name. :: + + aws application-insights describe-component \ + --resource-group-name MYEC2 \ + --component-name arn:aws:autoscaling:eu-west-1:123456789012:autoScalingGroup:abcd123e-853e-4b67-132a-bcd63ce2f03f:autoScalingGroupName/MyEC2ASG + +Output:: + + { + "ApplicationComponent": { + "ComponentName": "arn:aws:autoscaling:eu-west-1:123456789012:autoScalingGroup:abcd123e-853e-4b67-132a-bcd63ce2f03f:autoScalingGroupName/MyEC2ASG", + "ResourceType": "AWS::AutoScaling::AutoScalingGroup", + "OsType": "LINUX", + "Tier": "DEFAULT", + "Monitor": true, + "DetectedWorkload": { + "DEFAULT": { + "Priority": "1" + } + } + }, + "ResourceList": [] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-log-pattern.rst b/awscli/examples/application-insights/describe-log-pattern.rst new file mode 100644 index 000000000000..7d34c52e0029 --- /dev/null +++ b/awscli/examples/application-insights/describe-log-pattern.rst @@ -0,0 +1,21 @@ +**To describe a log pattern from a log pattern set** + +This example uses the ``describe-log-pattern`` command to describe a log pattern from a log pattern set. :: + + aws application-insights describe-log-pattern \ + --resource-group-name MYEC2 \ + --pattern-set-name SAMPLE \ + --pattern-name new2 + +Output:: + + { + "ResourceGroupName": "MYEC2", + "AccountId": "123456789012", + "LogPattern": { + "PatternSetName": "SAMPLE", + "PatternName": "new2", + "Pattern": "error", + "Rank": 750000 + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-observation.rst b/awscli/examples/application-insights/describe-observation.rst new file mode 100644 index 000000000000..d72b5b10a020 --- /dev/null +++ b/awscli/examples/application-insights/describe-observation.rst @@ -0,0 +1,21 @@ +**To describe an observation from an application** + +This example uses the ``describe-observation`` command to describe an observation such as an anomaly or error in the application. :: + + aws application-insights describe-observation \ + --observation-id o-1aaaf123-abc4-5678-a12e-d01234e56d7e + +Output:: + + { + "Observation": { + "Id": "o-1aaaf123-abc4-5678-a12e-d01234e56d7e", + "StartTime": "2024-01-01T02:05:55.432000+00:00", + "EndTime": "2024-01-01T02:12:55.435000+00:00", + "SourceType": "ALARM", + "SourceARN": "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56", + "MetricNamespace": "AWS/EC2", + "MetricName": "CPUUtilization", + "Value": 99.0208333333334 + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-problem-observations.rst b/awscli/examples/application-insights/describe-problem-observations.rst new file mode 100644 index 000000000000..f443347d30a4 --- /dev/null +++ b/awscli/examples/application-insights/describe-problem-observations.rst @@ -0,0 +1,23 @@ +**To describe obervations reported for a problem in an application** + +This example uses the ``describe-problem-observations`` command to describe the observations found such as anomalies or errors associated with a problem within an application. :: + + aws application-insights describe-problem-observations \ + --problem-id p-1aaaf123-abc4-5678-a12e-d01234e56d7e + +Output:: + + { + "RelatedObservations": { + "ObservationList": [{ + "Id": "o-1aaaf123-abc4-5678-a12e-d01234e56d7e", + "StartTime": "2024-01-01T02:05:55.432000+00:00", + "EndTime": "2024-01-01T02:12:55.435000+00:00", + "SourceType": "ALARM", + "SourceARN": "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56", + "MetricNamespace": "AWS/EC2", + "MetricName": "CPUUtilization", + "Value": 99.0208333333334 + }] + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-problem.rst b/awscli/examples/application-insights/describe-problem.rst new file mode 100644 index 000000000000..d3ea19281b03 --- /dev/null +++ b/awscli/examples/application-insights/describe-problem.rst @@ -0,0 +1,29 @@ +**To describe a problem in an application** + +This example uses the ``describe-problem`` command to describe a problem reported in an application. :: + + aws application-insights describe-problem \ + --problem-id p-1aaaf123-abc4-5678-a12e-d01234e56d7e + +Output:: + + { + "Problem": { + "Id": "p-1aaaf123-abc4-5678-a12e-d01234e56d7e", + "Title": "EC2: High CPU", + "Insights": "High CPU on the .NET application layer. This can result in application performance degradation due to high load on web servers, or application errors. If you experience high load conditions for long periods of time, use AWS Auto Scaling to add additional resources to process the load. To troubleshoot, collect a full user dump with task manager on the high CPU process and collect PerfMon logs with the thread counter to identify the thread ID causing high CPU.", + "Status": "PENDING", + "AffectedResource": "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56", + "StartTime": "2024-01-01T02:05:55.432000+00:00", + "EndTime": "1970-01-01T00:00:00+00:00", + "SeverityLevel": "Medium", + "AccountId": "123456789012", + "ResourceGroupName": "MYEC2", + "Feedback": { + "INSIGHTS_FEEDBACK": "NOT_SPECIFIED" + }, + "RecurringCount": 0, + "Visibility": "VISIBLE", + "ResolutionMethod": "UNRESOLVED" + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/describe-workload.rst b/awscli/examples/application-insights/describe-workload.rst new file mode 100644 index 000000000000..caeec9a2901e --- /dev/null +++ b/awscli/examples/application-insights/describe-workload.rst @@ -0,0 +1,19 @@ +**To describe a workload in an application** + +This example uses the ``describe-workload`` command to describe a workload and its configuration from an application. :: + + aws application-insights describe-workload \ + --resource-group-name MYEC2 \ + --component-name arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56 \ + --workload-id w-2aaaf123-abc4-5678-a12e-d01234e56d7e + +Output:: + + { + "WorkloadId": "w-2aaaf123-abc4-5678-a12e-d01234e56d7e", + "WorkloadConfiguration": { + "WorkloadName": "MYSQL", + "Tier": "MYSQL", + "Configuration": "{\"logs\":[],\"windowsEvents\":[{\"logGroupName\":\"WINDOWS_EVENTS-Application-MYEC2\",\"eventName\":\"Application\",\"eventLevels\":[\"WARNING\",\"ERROR\",\"CRITICAL\"],\"monitor\":true},{\"logGroupName\":\"WINDOWS_EVENTS-System-MYEC2\",\"eventName\":\"System\",\"eventLevels\":[\"WARNING\",\"ERROR\",\"CRITICAL\"],\"monitor\":true},{\"logGroupName\":\"WINDOWS_EVENTS-Security-MYEC2\",\"eventName\":\"Security\",\"eventLevels\":[\"WARNING\",\"ERROR\",\"CRITICAL\"],\"monitor\":true}]}" + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-applications.rst b/awscli/examples/application-insights/list-applications.rst new file mode 100644 index 000000000000..3bb3c540d23e --- /dev/null +++ b/awscli/examples/application-insights/list-applications.rst @@ -0,0 +1,21 @@ +**To list all applications** + +This example uses the ``list-applications`` command to lists the applications that you are monitoring. :: + + aws application-insights list-applications + +Output:: + + { + "ApplicationInfoList": [{ + "AccountId": "123456789012", + "ResourceGroupName": "MYEC2", + "LifeCycle": "ACTIVE", + "OpsCenterEnabled": false, + "CWEMonitorEnabled": true, + "Remarks": "", + "AutoConfigEnabled": true, + "DiscoveryType": "RESOURCE_GROUP_BASED", + "AttachMissingPermission": true + }] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-components.rst b/awscli/examples/application-insights/list-components.rst new file mode 100644 index 000000000000..fed68584da56 --- /dev/null +++ b/awscli/examples/application-insights/list-components.rst @@ -0,0 +1,24 @@ +**To list all components in an application** + +This example uses the ``list-components`` command to list all the components in an application. :: + + aws application-insights list-components \ + --resource-group-name MYEC2 + +Output:: + + { + "ApplicationComponentList": [{ + "ComponentName": "arn:aws:ec2:us-east-1:123456789012:autoScalingGroup:bosy123f-853e-2b43-876c-bad63ce2f03f:autoScalingGroupName/MyEC2ASG", + "ResourceType": "AWS::AutoScaling::AutoScalingGroup", + "OsType": "LINUX", + "Tier": "DEFAULT", + "Monitor": true + }, { + "ComponentName": "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56", + "ResourceType": "AWS::EC2::Instance", + "OsType": "WINDOWS", + "Tier": "DEFAULT", + "Monitor": true + }] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-configuration-history.rst b/awscli/examples/application-insights/list-configuration-history.rst new file mode 100644 index 000000000000..7297a3b1309b --- /dev/null +++ b/awscli/examples/application-insights/list-configuration-history.rst @@ -0,0 +1,30 @@ +**To describe the configuration history of a component** + +This example uses the ``list-configuration-history`` command to list the INFO, WARN, and ERROR events for periodic configuration updates performed by Application Insights. :: + + aws application-insights list-configuration-history \ + --resource-group-name MYEC2 + +Output:: + + { + "EventList": [{ + "ResourceGroupName": "MYEC2", + "AccountId": "123456789012", + "MonitoredResourceARN": "customizedcomponent-1235a90-b1c2-12c3-be32-12d630f12d55", + "EventStatus": "INFO", + "EventResourceType": "CLOUDWATCH_METRIC", + "EventTime": "2024-05-01T07:00:32.346000+00:00", + "EventDetail": "Metric Memory Available Mbytes does not exist for component customizedcomponent-1235a90-b1c2-12c3-be32-12d630f12d55, alarm cannot be created. Possible reason might be metric misses data points for two weeks, or required workload to emit this metric not installed.", + "EventResourceName": "Memory Available Mbytes" + }, { + "ResourceGroupName": "MYEC2", + "AccountId": "123456789012", + "MonitoredResourceARN": "customizedcomponent-1235a90-b1c2-12c3-be32-12d630f12d55", + "EventStatus": "INFO", + "EventResourceType": "CLOUDWATCH_METRIC", + "EventTime": "2024-05-01T07:00:32.284000+00:00", + "EventDetail": "Metric Memory % Committed Bytes In Use does not exist for component customizedcomponent-1235a90-b1c2-12c3-be32-12d630f12d55, alarm cannot be created. Possible reason might be metric misses data points for two weeks, or required workload to emit this metric not installed.", + "EventResourceName": "Memory % Committed Bytes In Use" + }] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-log-pattern-sets.rst b/awscli/examples/application-insights/list-log-pattern-sets.rst new file mode 100644 index 000000000000..b83e4195c8e5 --- /dev/null +++ b/awscli/examples/application-insights/list-log-pattern-sets.rst @@ -0,0 +1,14 @@ +**To list all log pattern sets** + +This example uses the ``list-log-pattern-sets`` command to list all log pattern sets in an application. :: + + aws application-insights list-log-pattern-sets \ + --resource-group-name MYEC2 + +Output:: + + { + "ResourceGroupName": "MYEC2", + "AccountId": "123456789012", + "LogPatternSets": ["SAMPLE"] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-log-patterns.rst b/awscli/examples/application-insights/list-log-patterns.rst new file mode 100644 index 000000000000..dfba89706f72 --- /dev/null +++ b/awscli/examples/application-insights/list-log-patterns.rst @@ -0,0 +1,24 @@ +**To list all log patterns in a log pattern set** + +This example uses the ``list-log-patterns`` command to lists all the log patterns in a log pattern set. :: + + aws application-insights list-log-patterns \ + --resource-group-name MYEC2 + +Output:: + + { + "ResourceGroupName": "MYEC2", + "AccountId": "123456789012", + "LogPatterns": [{ + "PatternSetName": "SAMPLE", + "PatternName": "new", + "Pattern": "error", + "Rank": 1 + }, { + "PatternSetName": "SAMPLE", + "PatternName": "new2", + "Pattern": "error", + "Rank": 750000 + }] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-problems.rst b/awscli/examples/application-insights/list-problems.rst new file mode 100644 index 000000000000..674cee462bf4 --- /dev/null +++ b/awscli/examples/application-insights/list-problems.rst @@ -0,0 +1,31 @@ +**To list all problems identified in an application** + +This example uses the ``list-problems`` command to list all the identified problems in an applicaiton. :: + + aws application-insights list-problems \ + --resource-group-name MYEC2 + +Output:: + + { + "ProblemList": [{ + "Id": "p-1aaaf123-abc4-5678-a12e-d01234e56d7e", + "Title": "EC2: High CPU", + "Insights": "High CPU on the .NET application layer. This can result in application performance degradation due to high load on web servers, or application errors. If you experience high load conditions for long periods of time, use AWS Auto Scaling to add additional resources to process the load. To troubleshoot, collect a full user dump with task manager on the high CPU process and collect PerfMon logs with the thread counter to identify the thread ID causing high CPU.", + "Status": "PENDING", + "AffectedResource": "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56", + "StartTime": "2024-05-01T08:05:55.432000+00:00", + "EndTime": "1970-01-01T00:00:00+00:00", + "SeverityLevel": "Medium", + "AccountId": "123456789012", + "ResourceGroupName": "MYEC2", + "Feedback": { + "INSIGHTS_FEEDBACK": "NOT_SPECIFIED" + }, + "RecurringCount": 0, + "Visibility": "VISIBLE", + "ResolutionMethod": "UNRESOLVED" + }], + "ResourceGroupName": "MYEC2", + "AccountId": "123456789012" + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-tags-for-resource.rst b/awscli/examples/application-insights/list-tags-for-resource.rst new file mode 100644 index 000000000000..7bf5b2a7aad5 --- /dev/null +++ b/awscli/examples/application-insights/list-tags-for-resource.rst @@ -0,0 +1,15 @@ +**To list the tags associated with an application** + +This command uses the ``list-tags-for-resource`` command to retrieve a list of the tags associated with a specified application. :: + + aws application-insights list-tags-for-resource \ + --resource-arn arn:aws:applicationinsights:eu-west-1:123456789012:application/resource-group/myapp + +Output:: + + { + "Tags": [{ + "Key": "AWS", + "Value": "tagaws" + }] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/list-workloads.rst b/awscli/examples/application-insights/list-workloads.rst new file mode 100644 index 000000000000..6275ed03661b --- /dev/null +++ b/awscli/examples/application-insights/list-workloads.rst @@ -0,0 +1,17 @@ +**To list the workloads on a component** + +This example uses the ``list-workloads`` command to lists the workloads that are configured on a specific component. :: + + aws application-insights list-workloads \ + --resource-group-name MYEC2 —component-name mycustomcomp + +Output:: + + { + "WorkloadList": [{ + "WorkloadId": "w-1234a76f-a1b6-4e12-a2b1-a123d45678ed", + "ComponentName": "mycustomcomp", + "WorkloadName": "MYSQL", + "Tier": "MYSQL" + }] + } \ No newline at end of file diff --git a/awscli/examples/application-insights/remove-workload.rst b/awscli/examples/application-insights/remove-workload.rst new file mode 100644 index 000000000000..c3191812a43f --- /dev/null +++ b/awscli/examples/application-insights/remove-workload.rst @@ -0,0 +1,10 @@ +**To remove a workload from a component** + +This example uses the ``remove-workload`` command to remove a workload from a component. :: + + aws application-insights remove-workload \ + --resource-group-name MYEC2 \ + --component-name arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56 \ + --workload-id w-1e2d0be3-fa45-6a78-b9d1-b2034d5dd67e + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/tag-resource.rst b/awscli/examples/application-insights/tag-resource.rst new file mode 100644 index 000000000000..74f61cd77830 --- /dev/null +++ b/awscli/examples/application-insights/tag-resource.rst @@ -0,0 +1,16 @@ +**To add tags to an application** + +This example uses the ``tag-resource`` command to add one or more tags to an application. :: + + aws application-insights tag-resource \ + --resource-arn arn:aws:applicationinsights:eu-west-1:012345678901:application/resource-group/testgroup \ + --tags file://tags.json + +Contents of ``tags.json``:: + + [{ + "Key": "sa", + "Value": "sample" + }] + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/untag-resource.rst b/awscli/examples/application-insights/untag-resource.rst new file mode 100644 index 000000000000..267bb2810199 --- /dev/null +++ b/awscli/examples/application-insights/untag-resource.rst @@ -0,0 +1,9 @@ +**To remove tags from an application** + +This example uses the ``untag-resource`` command to remove one or more tags from an application. :: + + aws application-insights untag-resource \ + --resource-arn arn:aws:applicationinsights:eu-west-1:012345678901:application/resource-group/sameplegroup \ + --tag-keys sample + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/update-application.rst b/awscli/examples/application-insights/update-application.rst new file mode 100644 index 000000000000..84b200ad518a --- /dev/null +++ b/awscli/examples/application-insights/update-application.rst @@ -0,0 +1,22 @@ +**To update an application and its settings** + +This example uses the ``update-application`` command to update an application's settings to enable SSM Ops Center. :: + + aws application-insights update-application \ + --resource-group-name ec2 —ops-center-enabled + +Output:: + + { + "ApplicationInfo": { + "AccountId": "012345678901", + "ResourceGroupName": "ec2", + "LifeCycle": "ACTIVE", + "OpsCenterEnabled": true, + "CWEMonitorEnabled": true, + "Remarks": "", + "AutoConfigEnabled": true, + "DiscoveryType": "RESOURCE_GROUP_BASED", + "AttachMissingPermission": true + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/update-component-configuration.rst b/awscli/examples/application-insights/update-component-configuration.rst new file mode 100644 index 000000000000..60d67347563e --- /dev/null +++ b/awscli/examples/application-insights/update-component-configuration.rst @@ -0,0 +1,20 @@ +**To update a component configuration** + +This example uses the ``update-component-configuration`` command to update a component configuration to monitor a Metric. :: + + aws application-insights update-component-configuration \ + --resource-group-name ASG \ + --component-name arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56 \ + --component-configuration file://config.json + +Contents of ``config.json``:: + + { + "logs": [], + "alarmMetrics": [{ + "alarmMetricName": "CPUUtilization", + "monitor": true + }] + } + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/update-component.rst b/awscli/examples/application-insights/update-component.rst new file mode 100644 index 000000000000..ae9aad0b2d99 --- /dev/null +++ b/awscli/examples/application-insights/update-component.rst @@ -0,0 +1,11 @@ +**To update a component in an application** + +This example uses the ``update-component`` command to update a component by changing its name and resource list. :: + + aws application-insights update-component \ + --resource-group-name MYEC2 \ + --component-name "custom" \ + --resource-list "arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56" \ + --new-component-name custom_new + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/update-log-pattern.rst b/awscli/examples/application-insights/update-log-pattern.rst new file mode 100644 index 000000000000..f83dde6a7a2b --- /dev/null +++ b/awscli/examples/application-insights/update-log-pattern.rst @@ -0,0 +1,22 @@ +**To update a log pattern in a log pattern set** + +This example uses the ``update-log-pattern`` command to update the log pattern in a log pattern set. :: + + aws application-insights update-log-pattern \ + --resource-group-name testgroup \ + --pattern-set-name Test \ + --pattern-name newpattern \ + --pattern ERROR \ + --rank 2 + +Output:: + + { + "ResourceGroupName": "testgroup", + "LogPattern": { + "PatternSetName": "Test", + "PatternName": "newpattern", + "Pattern": "ERROR", + "Rank": 2 + } + } \ No newline at end of file diff --git a/awscli/examples/application-insights/update-problem.rst b/awscli/examples/application-insights/update-problem.rst new file mode 100644 index 000000000000..e145a1b44f98 --- /dev/null +++ b/awscli/examples/application-insights/update-problem.rst @@ -0,0 +1,9 @@ +**To update the visibility or status of a problem in an application** + +This example uses the ``update-problem`` command to update the status of a problem to resolved. :: + + aws application-insights update-problem \ + --problem-id p-11b78b15-6f5b-40ca-9da7-12d12345c68b \ + --update-status RESOLVED + +This command returns to the prompt if successful. \ No newline at end of file diff --git a/awscli/examples/application-insights/update-workload.rst b/awscli/examples/application-insights/update-workload.rst new file mode 100644 index 000000000000..7cb1336154a7 --- /dev/null +++ b/awscli/examples/application-insights/update-workload.rst @@ -0,0 +1,28 @@ +**To update a workload in an component** + +This example uses the ``update-workload`` command to update the workload of a component. :: + + aws application-insights update-workload \ + --resource-group-name sqlserver \ + --component-name arn:aws:ec2:us-east-1:123456789012:instance/i-012abcd34efghi56 \ + --workload-configuration file://update.json \ + --workload-id w-765437d7-51e1-438e-8f47-123456fb + +Contents of ``update.json``:: + + { + "WorkloadName": "MYSQL", + "Tier": "MYSQL", + "Configuration": "{\"logs\":[{\"logGroupName\":\"MYSQL\",\"logPath\":\"/var/log/**\",\"logType\":\"MYSQL\",\"monitor\":true,\"encoding\":\"utf-8\"}]}" + } + +Output:: + + { + "WorkloadId": "w-765437d7-51e1-438e-8f47-123456fb", + "WorkloadConfiguration": { + "WorkloadName": "MYSQL", + "Tier": "MYSQL", + "Configuration": "{\"logs\":[{\"logGroupName\":\"MYSQL\",\"logPath\":\"/var/log/**\",\"logType\":\"MYSQL\",\"monitor\":true,\"encoding\":\"utf-8\"}]}" + } + } \ No newline at end of file