@@ -12,56 +12,56 @@ var dimensionsMap map[string][]string
12
12
13
13
func init () {
14
14
metricsMap = map [string ][]string {
15
- "AWS/AutoScaling" : [] string {"GroupMinSize" , "GroupMaxSize" , "GroupDesiredCapacity" , "GroupInServiceInstances" , "GroupPendingInstances" , "GroupStandbyInstances" , "GroupTerminatingInstances" , "GroupTotalInstances" },
16
- "AWS/Billing" : [] string {"EstimatedCharges" },
17
- "AWS/EC2" : [] string {"CPUCreditUsage" , "CPUCreditBalance" , "CPUUtilization" , "DiskReadOps" , "DiskWriteOps" , "DiskReadBytes" , "DiskWriteBytes" , "NetworkIn" , "NetworkOut" , "StatusCheckFailed" , "StatusCheckFailed_Instance" , "StatusCheckFailed_System" },
18
- "AWS/CloudFront" : [] string {"Requests" , "BytesDownloaded" , "BytesUploaded" , "TotalErrorRate" , "4xxErrorRate" , "5xxErrorRate" },
19
- "AWS/CloudSearch" : [] string {"SuccessfulRequests" , "SearchableDocuments" , "IndexUtilization" , "Partitions" },
20
- "AWS/DynamoDB" : [] string {"ConditionalCheckFailedRequests" , "ConsumedReadCapacityUnits" , "ConsumedWriteCapacityUnits" , "OnlineIndexConsumedWriteCapacity" , "OnlineIndexPercentageProgress" , "OnlineIndexThrottleEvents" , "ProvisionedReadCapacityUnits" , "ProvisionedWriteCapacityUnits" , "ReadThrottleEvents" , "ReturnedItemCount" , "SuccessfulRequestLatency" , "SystemErrors" , "ThrottledRequests" , "UserErrors" , "WriteThrottleEvents" },
21
- "AWS/ElastiCache" : [] string {
15
+ "AWS/AutoScaling" : {"GroupMinSize" , "GroupMaxSize" , "GroupDesiredCapacity" , "GroupInServiceInstances" , "GroupPendingInstances" , "GroupStandbyInstances" , "GroupTerminatingInstances" , "GroupTotalInstances" },
16
+ "AWS/Billing" : {"EstimatedCharges" },
17
+ "AWS/EC2" : {"CPUCreditUsage" , "CPUCreditBalance" , "CPUUtilization" , "DiskReadOps" , "DiskWriteOps" , "DiskReadBytes" , "DiskWriteBytes" , "NetworkIn" , "NetworkOut" , "StatusCheckFailed" , "StatusCheckFailed_Instance" , "StatusCheckFailed_System" },
18
+ "AWS/CloudFront" : {"Requests" , "BytesDownloaded" , "BytesUploaded" , "TotalErrorRate" , "4xxErrorRate" , "5xxErrorRate" },
19
+ "AWS/CloudSearch" : {"SuccessfulRequests" , "SearchableDocuments" , "IndexUtilization" , "Partitions" },
20
+ "AWS/DynamoDB" : {"ConditionalCheckFailedRequests" , "ConsumedReadCapacityUnits" , "ConsumedWriteCapacityUnits" , "OnlineIndexConsumedWriteCapacity" , "OnlineIndexPercentageProgress" , "OnlineIndexThrottleEvents" , "ProvisionedReadCapacityUnits" , "ProvisionedWriteCapacityUnits" , "ReadThrottleEvents" , "ReturnedItemCount" , "SuccessfulRequestLatency" , "SystemErrors" , "ThrottledRequests" , "UserErrors" , "WriteThrottleEvents" },
21
+ "AWS/ElastiCache" : {
22
22
"CPUUtilization" , "SwapUsage" , "FreeableMemory" , "NetworkBytesIn" , "NetworkBytesOut" ,
23
23
"BytesUsedForCacheItems" , "BytesReadIntoMemcached" , "BytesWrittenOutFromMemcached" , "CasBadval" , "CasHits" , "CasMisses" , "CmdFlush" , "CmdGet" , "CmdSet" , "CurrConnections" , "CurrItems" , "DecrHits" , "DecrMisses" , "DeleteHits" , "DeleteMisses" , "Evictions" , "GetHits" , "GetMisses" , "IncrHits" , "IncrMisses" , "Reclaimed" ,
24
24
"CurrConnections" , "Evictions" , "Reclaimed" , "NewConnections" , "BytesUsedForCache" , "CacheHits" , "CacheMisses" , "ReplicationLag" , "GetTypeCmds" , "SetTypeCmds" , "KeyBasedCmds" , "StringBasedCmds" , "HashBasedCmds" , "ListBasedCmds" , "SetBasedCmds" , "SortedSetBasedCmds" , "CurrItems" ,
25
25
},
26
- "AWS/EBS" : [] string {"VolumeReadBytes" , "VolumeWriteBytes" , "VolumeReadOps" , "VolumeWriteOps" , "VolumeTotalReadTime" , "VolumeTotalWriteTime" , "VolumeIdleTime" , "VolumeQueueLength" , "VolumeThroughputPercentage" , "VolumeConsumedReadWriteOps" },
27
- "AWS/ELB" : [] string {"HealthyHostCount" , "UnHealthyHostCount" , "RequestCount" , "Latency" , "HTTPCode_ELB_4XX" , "HTTPCode_ELB_5XX" , "HTTPCode_Backend_2XX" , "HTTPCode_Backend_3XX" , "HTTPCode_Backend_4XX" , "HTTPCode_Backend_5XX" , "BackendConnectionErrors" , "SurgeQueueLength" , "SpilloverCount" },
28
- "AWS/ElasticMapReduce" : [] string {"CoreNodesPending" , "CoreNodesRunning" , "HBaseBackupFailed" , "HBaseMostRecentBackupDuration" , "HBaseTimeSinceLastSuccessfulBackup" , "HDFSBytesRead" , "HDFSBytesWritten" , "HDFSUtilization" , "IsIdle" , "JobsFailed" , "JobsRunning" , "LiveDataNodes" , "LiveTaskTrackers" , "MapSlotsOpen" , "MissingBlocks" , "ReduceSlotsOpen" , "RemainingMapTasks" , "RemainingMapTasksPerSlot" , "RemainingReduceTasks" , "RunningMapTasks" , "RunningReduceTasks" , "S3BytesRead" , "S3BytesWritten" , "TaskNodesPending" , "TaskNodesRunning" , "TotalLoad" },
29
- "AWS/Kinesis" : [] string {"PutRecord.Bytes" , "PutRecord.Latency" , "PutRecord.Success" , "PutRecords.Bytes" , "PutRecords.Latency" , "PutRecords.Records" , "PutRecords.Success" , "IncomingBytes" , "IncomingRecords" , "GetRecords.Bytes" , "GetRecords.IteratorAgeMilliseconds" , "GetRecords.Latency" , "GetRecords.Success" },
30
- "AWS/ML" : [] string {"PredictCount" , "PredictFailureCount" },
31
- "AWS/OpsWorks" : [] string {"cpu_idle" , "cpu_nice" , "cpu_system" , "cpu_user" , "cpu_waitio" , "load_1" , "load_5" , "load_15" , "memory_buffers" , "memory_cached" , "memory_free" , "memory_swap" , "memory_total" , "memory_used" , "procs" },
32
- "AWS/Redshift" : [] string {"CPUUtilization" , "DatabaseConnections" , "HealthStatus" , "MaintenanceMode" , "NetworkReceiveThroughput" , "NetworkTransmitThroughput" , "PercentageDiskSpaceUsed" , "ReadIOPS" , "ReadLatency" , "ReadThroughput" , "WriteIOPS" , "WriteLatency" , "WriteThroughput" },
33
- "AWS/RDS" : [] string {"BinLogDiskUsage" , "CPUUtilization" , "DatabaseConnections" , "DiskQueueDepth" , "FreeableMemory" , "FreeStorageSpace" , "ReplicaLag" , "SwapUsage" , "ReadIOPS" , "WriteIOPS" , "ReadLatency" , "WriteLatency" , "ReadThroughput" , "WriteThroughput" , "NetworkReceiveThroughput" , "NetworkTransmitThroughput" },
34
- "AWS/Route53" : [] string {"HealthCheckStatus" , "HealthCheckPercentageHealthy" },
35
- "AWS/SNS" : [] string {"NumberOfMessagesPublished" , "PublishSize" , "NumberOfNotificationsDelivered" , "NumberOfNotificationsFailed" },
36
- "AWS/SQS" : [] string {"NumberOfMessagesSent" , "SentMessageSize" , "NumberOfMessagesReceived" , "NumberOfEmptyReceives" , "NumberOfMessagesDeleted" , "ApproximateNumberOfMessagesDelayed" , "ApproximateNumberOfMessagesVisible" , "ApproximateNumberOfMessagesNotVisible" },
37
- "AWS/S3" : [] string {"BucketSizeBytes" , "NumberOfObjects" },
38
- "AWS/SWF" : [] string {"DecisionTaskScheduleToStartTime" , "DecisionTaskStartToCloseTime" , "DecisionTasksCompleted" , "StartedDecisionTasksTimedOutOnClose" , "WorkflowStartToCloseTime" , "WorkflowsCanceled" , "WorkflowsCompleted" , "WorkflowsContinuedAsNew" , "WorkflowsFailed" , "WorkflowsTerminated" , "WorkflowsTimedOut" },
39
- "AWS/StorageGateway" : [] string {"CacheHitPercent" , "CachePercentUsed" , "CachePercentDirty" , "CloudBytesDownloaded" , "CloudDownloadLatency" , "CloudBytesUploaded" , "UploadBufferFree" , "UploadBufferPercentUsed" , "UploadBufferUsed" , "QueuedWrites" , "ReadBytes" , "ReadTime" , "TotalCacheSize" , "WriteBytes" , "WriteTime" , "WorkingStorageFree" , "WorkingStoragePercentUsed" , "WorkingStorageUsed" , "CacheHitPercent" , "CachePercentUsed" , "CachePercentDirty" , "ReadBytes" , "ReadTime" , "WriteBytes" , "WriteTime" , "QueuedWrites" },
40
- "AWS/WorkSpaces" : [] string {"Available" , "Unhealthy" , "ConnectionAttempt" , "ConnectionSuccess" , "ConnectionFailure" , "SessionLaunchTime" , "InSessionLatency" , "SessionDisconnect" },
26
+ "AWS/EBS" : {"VolumeReadBytes" , "VolumeWriteBytes" , "VolumeReadOps" , "VolumeWriteOps" , "VolumeTotalReadTime" , "VolumeTotalWriteTime" , "VolumeIdleTime" , "VolumeQueueLength" , "VolumeThroughputPercentage" , "VolumeConsumedReadWriteOps" },
27
+ "AWS/ELB" : {"HealthyHostCount" , "UnHealthyHostCount" , "RequestCount" , "Latency" , "HTTPCode_ELB_4XX" , "HTTPCode_ELB_5XX" , "HTTPCode_Backend_2XX" , "HTTPCode_Backend_3XX" , "HTTPCode_Backend_4XX" , "HTTPCode_Backend_5XX" , "BackendConnectionErrors" , "SurgeQueueLength" , "SpilloverCount" },
28
+ "AWS/ElasticMapReduce" : {"CoreNodesPending" , "CoreNodesRunning" , "HBaseBackupFailed" , "HBaseMostRecentBackupDuration" , "HBaseTimeSinceLastSuccessfulBackup" , "HDFSBytesRead" , "HDFSBytesWritten" , "HDFSUtilization" , "IsIdle" , "JobsFailed" , "JobsRunning" , "LiveDataNodes" , "LiveTaskTrackers" , "MapSlotsOpen" , "MissingBlocks" , "ReduceSlotsOpen" , "RemainingMapTasks" , "RemainingMapTasksPerSlot" , "RemainingReduceTasks" , "RunningMapTasks" , "RunningReduceTasks" , "S3BytesRead" , "S3BytesWritten" , "TaskNodesPending" , "TaskNodesRunning" , "TotalLoad" },
29
+ "AWS/Kinesis" : {"PutRecord.Bytes" , "PutRecord.Latency" , "PutRecord.Success" , "PutRecords.Bytes" , "PutRecords.Latency" , "PutRecords.Records" , "PutRecords.Success" , "IncomingBytes" , "IncomingRecords" , "GetRecords.Bytes" , "GetRecords.IteratorAgeMilliseconds" , "GetRecords.Latency" , "GetRecords.Success" },
30
+ "AWS/ML" : {"PredictCount" , "PredictFailureCount" },
31
+ "AWS/OpsWorks" : {"cpu_idle" , "cpu_nice" , "cpu_system" , "cpu_user" , "cpu_waitio" , "load_1" , "load_5" , "load_15" , "memory_buffers" , "memory_cached" , "memory_free" , "memory_swap" , "memory_total" , "memory_used" , "procs" },
32
+ "AWS/Redshift" : {"CPUUtilization" , "DatabaseConnections" , "HealthStatus" , "MaintenanceMode" , "NetworkReceiveThroughput" , "NetworkTransmitThroughput" , "PercentageDiskSpaceUsed" , "ReadIOPS" , "ReadLatency" , "ReadThroughput" , "WriteIOPS" , "WriteLatency" , "WriteThroughput" },
33
+ "AWS/RDS" : {"BinLogDiskUsage" , "CPUUtilization" , "DatabaseConnections" , "DiskQueueDepth" , "FreeableMemory" , "FreeStorageSpace" , "ReplicaLag" , "SwapUsage" , "ReadIOPS" , "WriteIOPS" , "ReadLatency" , "WriteLatency" , "ReadThroughput" , "WriteThroughput" , "NetworkReceiveThroughput" , "NetworkTransmitThroughput" },
34
+ "AWS/Route53" : {"HealthCheckStatus" , "HealthCheckPercentageHealthy" },
35
+ "AWS/SNS" : {"NumberOfMessagesPublished" , "PublishSize" , "NumberOfNotificationsDelivered" , "NumberOfNotificationsFailed" },
36
+ "AWS/SQS" : {"NumberOfMessagesSent" , "SentMessageSize" , "NumberOfMessagesReceived" , "NumberOfEmptyReceives" , "NumberOfMessagesDeleted" , "ApproximateNumberOfMessagesDelayed" , "ApproximateNumberOfMessagesVisible" , "ApproximateNumberOfMessagesNotVisible" },
37
+ "AWS/S3" : {"BucketSizeBytes" , "NumberOfObjects" },
38
+ "AWS/SWF" : {"DecisionTaskScheduleToStartTime" , "DecisionTaskStartToCloseTime" , "DecisionTasksCompleted" , "StartedDecisionTasksTimedOutOnClose" , "WorkflowStartToCloseTime" , "WorkflowsCanceled" , "WorkflowsCompleted" , "WorkflowsContinuedAsNew" , "WorkflowsFailed" , "WorkflowsTerminated" , "WorkflowsTimedOut" },
39
+ "AWS/StorageGateway" : {"CacheHitPercent" , "CachePercentUsed" , "CachePercentDirty" , "CloudBytesDownloaded" , "CloudDownloadLatency" , "CloudBytesUploaded" , "UploadBufferFree" , "UploadBufferPercentUsed" , "UploadBufferUsed" , "QueuedWrites" , "ReadBytes" , "ReadTime" , "TotalCacheSize" , "WriteBytes" , "WriteTime" , "WorkingStorageFree" , "WorkingStoragePercentUsed" , "WorkingStorageUsed" , "CacheHitPercent" , "CachePercentUsed" , "CachePercentDirty" , "ReadBytes" , "ReadTime" , "WriteBytes" , "WriteTime" , "QueuedWrites" },
40
+ "AWS/WorkSpaces" : {"Available" , "Unhealthy" , "ConnectionAttempt" , "ConnectionSuccess" , "ConnectionFailure" , "SessionLaunchTime" , "InSessionLatency" , "SessionDisconnect" },
41
41
}
42
42
dimensionsMap = map [string ][]string {
43
- "AWS/AutoScaling" : [] string {"AutoScalingGroupName" },
44
- "AWS/Billing" : [] string {"ServiceName" , "LinkedAccount" , "Currency" },
45
- "AWS/CloudFront" : [] string {"DistributionId" , "Region" },
46
- "AWS/CloudSearch" : [] string {},
47
- "AWS/DynamoDB" : [] string {"TableName" , "GlobalSecondaryIndexName" , "Operation" },
48
- "AWS/ElastiCache" : [] string {"CacheClusterId" , "CacheNodeId" },
49
- "AWS/EBS" : [] string {"VolumeId" },
50
- "AWS/EC2" : [] string {"AutoScalingGroupName" , "ImageId" , "InstanceId" , "InstanceType" },
51
- "AWS/ELB" : [] string {"LoadBalancerName" , "AvailabilityZone" },
52
- "AWS/ElasticMapReduce" : [] string {"ClusterId" , "JobId" },
53
- "AWS/Kinesis" : [] string {"StreamName" },
54
- "AWS/ML" : [] string {"MLModelId" , "RequestMode" },
55
- "AWS/OpsWorks" : [] string {"StackId" , "LayerId" , "InstanceId" },
56
- "AWS/Redshift" : [] string {"NodeID" , "ClusterIdentifier" },
57
- "AWS/RDS" : [] string {"DBInstanceIdentifier" , "DatabaseClass" , "EngineName" },
58
- "AWS/Route53" : [] string {"HealthCheckId" },
59
- "AWS/SNS" : [] string {"Application" , "Platform" , "TopicName" },
60
- "AWS/SQS" : [] string {"QueueName" },
61
- "AWS/S3" : [] string {"BucketName" , "StorageType" },
62
- "AWS/SWF" : [] string {"Domain" , "ActivityTypeName" , "ActivityTypeVersion" },
63
- "AWS/StorageGateway" : [] string {"GatewayId" , "GatewayName" , "VolumeId" },
64
- "AWS/WorkSpaces" : [] string {"DirectoryId" , "WorkspaceId" },
43
+ "AWS/AutoScaling" : {"AutoScalingGroupName" },
44
+ "AWS/Billing" : {"ServiceName" , "LinkedAccount" , "Currency" },
45
+ "AWS/CloudFront" : {"DistributionId" , "Region" },
46
+ "AWS/CloudSearch" : {},
47
+ "AWS/DynamoDB" : {"TableName" , "GlobalSecondaryIndexName" , "Operation" },
48
+ "AWS/ElastiCache" : {"CacheClusterId" , "CacheNodeId" },
49
+ "AWS/EBS" : {"VolumeId" },
50
+ "AWS/EC2" : {"AutoScalingGroupName" , "ImageId" , "InstanceId" , "InstanceType" },
51
+ "AWS/ELB" : {"LoadBalancerName" , "AvailabilityZone" },
52
+ "AWS/ElasticMapReduce" : {"ClusterId" , "JobId" },
53
+ "AWS/Kinesis" : {"StreamName" },
54
+ "AWS/ML" : {"MLModelId" , "RequestMode" },
55
+ "AWS/OpsWorks" : {"StackId" , "LayerId" , "InstanceId" },
56
+ "AWS/Redshift" : {"NodeID" , "ClusterIdentifier" },
57
+ "AWS/RDS" : {"DBInstanceIdentifier" , "DatabaseClass" , "EngineName" },
58
+ "AWS/Route53" : {"HealthCheckId" },
59
+ "AWS/SNS" : {"Application" , "Platform" , "TopicName" },
60
+ "AWS/SQS" : {"QueueName" },
61
+ "AWS/S3" : {"BucketName" , "StorageType" },
62
+ "AWS/SWF" : {"Domain" , "ActivityTypeName" , "ActivityTypeVersion" },
63
+ "AWS/StorageGateway" : {"GatewayId" , "GatewayName" , "VolumeId" },
64
+ "AWS/WorkSpaces" : {"DirectoryId" , "WorkspaceId" },
65
65
}
66
66
}
67
67
@@ -81,7 +81,7 @@ func handleGetRegions(req *cwRequest, c *middleware.Context) {
81
81
82
82
func handleGetNamespaces (req * cwRequest , c * middleware.Context ) {
83
83
result := []interface {}{}
84
- for key , _ := range metricsMap {
84
+ for key := range metricsMap {
85
85
result = append (result , util.DynMap {"text" : key , "value" : key })
86
86
}
87
87
0 commit comments