Prometheus exporter for Amazon Elastic Container Service (ECS)

Overview

ecs_exporter

CircleCI

🚧 🚧 🚧 This repo is still work in progress and is subject to change.

This repo contains a Prometheus exporter for Amazon Elastic Container Service (ECS) that publishes ECS task infra metrics in Prometheus format.

Run the following container as a sidecar on ECS tasks:

quay.io/prometheuscommunity/ecs-exporter:v0.1.0

An example Fargate task definition that includes the container is available.

To add ECS exporter to your existing ECS task:

  1. Go to ECS task definitions.
  2. Click on "Create new revision".
  3. Scroll down to "Container definitions" and click on "Add container".
  4. Set "ecs-exporter" as container name.
  5. Copy the container image URL from above.
  6. Add tcp/9779 as a port mapping.
  7. Click on "Add" to return back to task definition page.
  8. Click on "Create" to create a new revision.

By default, it publishes Prometheus metrics on ":9779/metrics". The exporter in this repo can be a useful complementary sidecar for the scenario described in this blog post. Adding this sidecar to the ECS task definition would export task-level metrics in addition to the custom metrics described in the blog.

The sidecar process is also supported on AWS App Runner and can be used to publish infra metrics in Prometheus format from App Runner services.

Labels

  • container: Container associated with a metric.
  • cpu: Available to CPU metrics, helps to breakdown metrics by CPU.
  • device: Network interface device associated with the metric. Only available for several network metrics.

Example output

# HELP ecs_cpu_seconds_total Total CPU usage in seconds.
# TYPE ecs_cpu_seconds_total counter
ecs_cpu_seconds_total{container="ecs-metadata-proxy",cpu="0"} 1.746774278e+08
ecs_cpu_seconds_total{container="ecs-metadata-proxy",cpu="1"} 1.7417992266e+08
# HELP ecs_memory_bytes Memory usage in bytes.
# TYPE ecs_memory_bytes gauge
ecs_memory_bytes{container="ecs-metadata-proxy"} 4.440064e+06
# HELP ecs_memory_limit_bytes Memory limit in bytes.
# TYPE ecs_memory_limit_bytes gauge
ecs_memory_limit_bytes{container="ecs-metadata-proxy"} 9.223372036854772e+18
# HELP ecs_memory_max_bytes Maximum memory usage in bytes.
# TYPE ecs_memory_max_bytes gauge
ecs_memory_max_bytes{container="ecs-metadata-proxy"} 9.023488e+06
# HELP ecs_network_receive_bytes_total Network recieved in bytes.
# TYPE ecs_network_receive_bytes_total counter
ecs_network_receive_bytes_total{container="ecs-metadata-proxy",device="eth1"} 4.2851757e+07
# HELP ecs_network_receive_dropped_total Network packets dropped in recieving.
# TYPE ecs_network_receive_dropped_total counter
ecs_network_receive_dropped_total{container="ecs-metadata-proxy",device="eth1"} 0
# HELP ecs_network_receive_errors_total Network errors in recieving.
# TYPE ecs_network_receive_errors_total counter
ecs_network_receive_errors_total{container="ecs-metadata-proxy",device="eth1"} 0
# HELP ecs_network_receive_packets_total Network packets recieved.
# TYPE ecs_network_receive_packets_total counter
ecs_network_receive_packets_total{container="ecs-metadata-proxy",device="eth1"} 516239
# HELP ecs_network_transmit_bytes_total Network transmitted in bytes.
# TYPE ecs_network_transmit_bytes_total counter
ecs_network_transmit_bytes_total{container="ecs-metadata-proxy",device="eth1"} 1.28412758e+08
# HELP ecs_network_transmit_dropped_total Network packets dropped in transmit.
# TYPE ecs_network_transmit_dropped_total counter
ecs_network_transmit_dropped_total{container="ecs-metadata-proxy",device="eth1"} 0
# HELP ecs_network_transmit_errors_total Network errors in transmit.
# TYPE ecs_network_transmit_errors_total counter
ecs_network_transmit_errors_total{container="ecs-metadata-proxy",device="eth1"} 0
# HELP ecs_network_transmit_packets_total Network packets transmitted.
# TYPE ecs_network_transmit_packets_total counter
ecs_network_transmit_packets_total{container="ecs-metadata-proxy",device="eth1"} 429472
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 8
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.16.3"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 595760
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 595760
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 4092
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 123
# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.
# TYPE go_memstats_gc_cpu_fraction gauge
go_memstats_gc_cpu_fraction 0
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 3.97448e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 595760
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 6.508544e+07
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 1.59744e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 2439
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 6.508544e+07
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 6.668288e+07
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 0
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 2562
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 9600
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 16384
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 37400
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 49152
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.473924e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 497348
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 425984
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 425984
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 7.165032e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 7
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

Example task definition

{
  "ipcMode": null,
  "executionRoleArn": "arn:aws:iam::ACCOUNT_ID:role/ecsTaskExecutionRole",
  "containerDefinitions": [
    {
      "dnsSearchDomains": null,
      "environmentFiles": null,
      "logConfiguration": {
        "logDriver": "awslogs",
        "secretOptions": null,
        "options": {
          "awslogs-group": "/ecs/ecs-exporter",
          "awslogs-region": "us-west-2",
          "awslogs-stream-prefix": "ecs"
        }
      },
      "entryPoint": null,
      "portMappings": [
        {
          "hostPort": 9779,
          "protocol": "tcp",
          "containerPort": 9779
        }
      ],
      "command": null,
      "linuxParameters": null,
      "cpu": 0,
      "environment": [],
      "resourceRequirements": null,
      "ulimits": null,
      "dnsServers": null,
      "mountPoints": [],
      "workingDirectory": null,
      "secrets": null,
      "dockerSecurityOptions": null,
      "memory": null,
      "memoryReservation": null,
      "volumesFrom": [],
      "stopTimeout": null,
      "image": "quay.io/prometheuscommunity/ecs-exporter:v0.1.0",
      "startTimeout": null,
      "firelensConfiguration": null,
      "dependsOn": null,
      "disableNetworking": null,
      "interactive": null,
      "healthCheck": null,
      "essential": true,
      "links": null,
      "hostname": null,
      "extraHosts": null,
      "pseudoTerminal": null,
      "user": null,
      "readonlyRootFilesystem": null,
      "dockerLabels": null,
      "systemControls": null,
      "privileged": null,
      "name": "ecs-exporter"
    }
  ],
  "placementConstraints": [],
  "memory": "512",
  "taskRoleArn": "arn:aws:iam::ACCOUNT_ID:role/ecsTaskExecutionRole",
  "compatibilities": [
    "EC2",
    "FARGATE"
  ],
  "taskDefinitionArn": "arn:aws:ecs:us-west-2:ACCOUNT_ID:task-definition/ecs-exporter:1",
  "family": "ecs-exporter",
  "requiresAttributes": [
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.execution-role-awslogs"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.task-iam-role"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
    },
    {
      "targetId": null,
      "targetType": null,
      "value": null,
      "name": "ecs.capability.task-eni"
    }
  ],
  "pidMode": null,
  "requiresCompatibilities": [
    "FARGATE"
  ],
  "networkMode": "awsvpc",
  "cpu": "256",
  "revision": 1,
  "status": "ACTIVE",
  "inferenceAccelerators": null,
  "proxyConfiguration": null,
  "volumes": []
}
Comments
  • Initial commit

    Initial commit

    This change introduces a Prometheus exporter to be run a sidecar on ECS tasks. When run as a part of the ECS tasks, it fetches the metadata server to read ECS metrics such as CPU, memory and network usage by container and publishes a Prometheus metrics handler for Prometheus to scrape them directly. Users still need to publish their custom application metrics from their own containers.

    The following changes will document the published container image and add instructions on how to add the exporter as a sidecar to ECS tasks.

    Fixes https://github.com/prometheus-community/community/issues/36.

    opened by rakyll 9
  • Container image tag is not available

    Container image tag is not available

    @roidelapluie was mentioning that the VERSION number can be used to publish container images with a tag, but I currently see no tags available at quay.io/prometheuscommunity. We need to tag the image rather than suggesting users to pull from main.

    bug 
    opened by rakyll 2
  • Bump github.com/docker/docker from 20.10.17+incompatible to 20.10.18+incompatible

    Bump github.com/docker/docker from 20.10.17+incompatible to 20.10.18+incompatible

    Bumps github.com/docker/docker from 20.10.17+incompatible to 20.10.18+incompatible.

    Release notes

    Sourced from github.com/docker/docker's releases.

    v20.10.18

    This release of Docker Engine comes with a fix for a low-severity security issue, some minor bug fixes, and updated versions of Docker Compose, Docker Buildx, containerd, and runc.

    Client

    Builder

    • Fix an issue where file-capabilities were not preserved during build moby/moby#43876.
    • Fix an issue that could result in a panic caused by a concurrent map read and map write moby/moby#44067

    Daemon

    • Fix a security vulnerability relating to supplementary group permissions, which could allow a container process to bypass primary group restrictions within the container CVE-2022-36109, GHSA-rc4r-wh2q-q6c4.
    • seccomp: add support for Landlock syscalls in default policy moby/moby#43991.
    • seccomp: update default policy to support new syscalls introduced in kernel 5.12 - 5.16 moby/moby#43991.
    • Fix an issue where cache lookup for image manifests would fail, resulting in a redundant round-trip to the image registry moby/moby#44109.
    • Fix an issue where exec processes and healthchecks were not terminated when they timed out moby/moby#44018.

    Packaging

    Commits
    • e42327a Merge pull request #44120 from thaJeztah/20.10_backport_update_tests
    • fcd4df9 Update some tests for supplementary group permissions
    • bb0197c Merge pull request from GHSA-rc4r-wh2q-q6c4
    • d348775 Merge pull request #44109 from rumpl/20.10-fix-local-context
    • 6a0186b Wrap local calls to the content and lease service
    • b73e9c2 Merge pull request #44098 from thaJeztah/20.10_backport_swagger_updates
    • 4855c28 Merge pull request #44101 from thaJeztah/20.10_backport_bump_golang_1.18.6
    • 3d4616f Update to go 1.18.6 to address CVE-2022-27664, CVE-2022-32190
    • d56101e Merge pull request #44093 from thaJeztah/20.10_backport_remove_tereshkova
    • 23c7d84 docs: api: adjust ContainerWaitResponse error as optional
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump github.com/prometheus/client_golang from 1.12.2 to 1.13.0

    Bump github.com/prometheus/client_golang from 1.12.2 to 1.13.0

    Bumps github.com/prometheus/client_golang from 1.12.2 to 1.13.0.

    Release notes

    Sourced from github.com/prometheus/client_golang's releases.

    1.13.0 / 2022-08-06

    • [CHANGE] Minimum required Go version is now 1.17 (we also test client_golang against the new 1.19 version).
    • [ENHANCEMENT] Added prometheus.TransactionalGatherer interface for promhttp.Handler use which allows using low allocation update techniques for custom collectors. #989
    • [ENHANCEMENT] Added exemplar support to prometheus.NewConstHistogram. See ExampleNewConstHistogram_WithExemplar example on how to use it. #986
    • [ENHANCEMENT] prometheus/push.Pusher now has context-aware methods that pass context to HTTP requests. #1028
    • [ENHANCEMENT] prometheus/push.Pusher has now Error method that retrieve last error. #1075
    • [ENHANCEMENT] testutil.GatherAndCompare provides now readable diff on failed comparisons. #998
    • [ENHANCEMENT] Query API now supports timeouts. #1014
    • [ENHANCEMENT] New MetricVec method DeletePartialMatch(labels Labels) for deleting all metrics that match provided labels. #1013
    • [ENHANCEMENT] api.Config now accepts passing custom *http.Client. #1025
    • [BUGFIX] Raise exemplar labels limit from 64 to 128 bytes as specified in OpenMetrics spec. #1091
    • [BUGFIX] Allow adding exemplar to +Inf bucket to const histograms. #1094
    • [ENHANCEMENT] Most promhttp.Instrument* middlewares now support adding exemplars to metrics. This allows hooking those to your tracing middleware that retrieves trace ID and puts it in exemplar if present. #1055
    • [ENHANCEMENT] Added testutil.ScrapeAndCompare method. #1043
    • [BUGFIX] Fixed GopherJS build support. #897
    • [ENHANCEMENT] :warning: Added way to specify what runtime/metrics collectors.NewGoCollector should use. See ExampleGoCollector_WithAdvancedGoMetrics. #1102

    New Contributors ❤️

    ... (truncated)

    Changelog

    Sourced from github.com/prometheus/client_golang's changelog.

    1.13.0 / 2022-08-05

    • [CHANGE] Minimum required Go version is now 1.17 (we also test client_golang against new 1.19 version).
    • [ENHANCEMENT] Added prometheus.TransactionalGatherer interface for promhttp.Handler use which allows using low allocation update techniques for custom collectors. #989
    • [ENHANCEMENT] Added exemplar support to prometheus.NewConstHistogram. See ExampleNewConstHistogram_WithExemplar example on how to use it. #986
    • [ENHANCEMENT] prometheus/push.Pusher has now context aware methods that pass context to HTTP request. #1028
    • [ENHANCEMENT] prometheus/push.Pusher has now Error method that retrieve last error. #1075
    • [ENHANCEMENT] testutil.GatherAndCompare provides now readable diff on failed comparisons. #998
    • [ENHANCEMENT] Query API now supports timeouts. #1014
    • [ENHANCEMENT] New MetricVec method DeletePartialMatch(labels Labels) for deleting all metrics that match provided labels. #1013
    • [ENHANCEMENT] api.Config now accepts passing custom *http.Client. #1025
    • [BUGFIX] Raise exemplar labels limit from 64 to 128 bytes as specified in OpenMetrics spec. #1091
    • [BUGFIX] Allow adding exemplar to +Inf bucket to const histograms. #1094
    • [ENHANCEMENT] Most promhttp.Instrument* middlewares now supports adding exemplars to metrics. This allows hooking those to your tracing middleware that retrieves trace ID and put it in exemplar if present. #1055
    • [ENHANCEMENT] Added testutil.ScrapeAndCompare method. #1043
    • [BUGFIX] Fixed GopherJS build support. #897
    • [ENHANCEMENT] :warning: Added way to specify what runtime/metrics collectors.NewGoCollector should use. See ExampleGoCollector_WithAdvancedGoMetrics. #1102
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Fix CPU usage metrics

    Fix CPU usage metrics

    The CPU usage metrics from ECS are pass-through of Docker stats API.

    • Switch the API json struct to use upstream Docker types.
    • The API specifies the units are in nanoseconds, not jiffies.

    Fixes: https://github.com/prometheus-community/ecs_exporter/issues/34

    Signed-off-by: SuperQ [email protected]

    opened by SuperQ 1
  • How to treat ecs_cpu_seconds_total

    How to treat ecs_cpu_seconds_total

    I can not find a way to graph ecs_cpu_seconds_total like I can for any other exporter we have that is returning CPU seconds.

    1. https://www.robustperception.io/understanding-machine-cpu-usage/
    2. https://stackoverflow.com/questions/34923788/prometheus-convert-cpu-user-seconds-to-cpu-usage/34930574#34930574

    Anything im trying, is returning very large numbers that I do not understand.

    When i check the /metrics in my browser I get

    ecs_cpu_seconds_total{container="heartbeat",cpu="0"} 2.3798033553e+08
    ecs_cpu_seconds_total{container="heartbeat",cpu="1"} 2.37868708e+08
    ecs_cpu_seconds_total{container="log_router",cpu="0"} 9.787324061e+07
    ecs_cpu_seconds_total{container="log_router",cpu="1"} 9.13804651e+07
    ecs_cpu_seconds_total{container="prom_exporter",cpu="0"} 3.971903977e+07
    ecs_cpu_seconds_total{container="prom_exporter",cpu="1"} 4.042450038e+07
    

    When i query in prom

    ecs_cpu_seconds_total{container="heartbeat", cpu="0", ecs_cluster="Cluster01", ecs_task_id="5ccd12509b6545519a62604d624f44d0", ecs_task_version="10", instance="10.1.111.137:9779", job="Heartbeat", metrics_path="1m/metrics"} | 247372377.12
    ecs_cpu_seconds_total{container="heartbeat", cpu="1", ecs_cluster="Cluster01", ecs_task_id="5ccd12509b6545519a62604d624f44d0", ecs_task_version="10", instance="10.1.111.137:9779", job="Heartbeat", metrics_path="1m/metrics"} | 247288853.64
    ecs_cpu_seconds_total{container="log_router", cpu="0", ecs_cluster="Cluster01", ecs_task_id="5ccd12509b6545519a62604d624f44d0", ecs_task_version="10", instance="10.1.111.137:9779", job="Heartbeat", metrics_path="1m/metrics"} | 101809511.73
    ecs_cpu_seconds_total{container="log_router", cpu="1", ecs_cluster="Cluster01", ecs_task_id="5ccd12509b6545519a62604d624f44d0", ecs_task_version="10", instance="10.1.111.137:9779", job="Heartbeat", metrics_path="1m/metrics"} | 94857416.9
    ecs_cpu_seconds_total{container="prom_exporter", cpu="0", ecs_cluster="Cluster01", ecs_task_id="5ccd12509b6545519a62604d624f44d0", ecs_task_version="10", instance="10.1.111.137:9779", job="Heartbeat", metrics_path="1m/metrics"} | 42798612.53
    ecs_cpu_seconds_total{container="prom_exporter", cpu="1", ecs_cluster="Cluster01", ecs_task_id="5ccd12509b6545519a62604d624f44d0", ecs_task_version="10", instance="10.1.111.137:9779", job="Heartbeat", metrics_path="1m/metrics"} | 43040614.05
    

    If I query rate(ecs_cpu_seconds_total[2m]) * 100

    I get very large numbers, 304131.45438179886 and 376788.3762791756 for core 0 and 1 for the heartbeat container for instance.

    If it matters, im using something close to this: https://github.com/dwp/docker-ecs-service-discovery Which is allowing prom to find the container.

    The end goal is toi graph the CPU usage of each container.

    opened by jseiser 1
  • memory_stats.stats.cache not exposed as metric

    memory_stats.stats.cache not exposed as metric

    Hello,

    We've tried to use this tool to export some metrics to our Prometheus. What we noticed immediately was that the Memory Usage data reported by our prometheus was completely different than the data reported by AWS Container Insights. We've investigated the issue and learned that the differences are caused by the way AWS calculates the usage of the memory inside of the container.

    As you can see in the link below, AWS calculates the usage as the difference between usage and stats.cache (It was changed in 2016): https://github.com/aws/amazon-ecs-agent/commit/f2019aee016a1be1e340f06147be24367d6f96a6

    Could we add this cache metric to the list of exposed metrics. I'd propose naming it as:

    memCacheUsageDesc = prometheus.NewDesc(
    		"ecs_memory_cache_usage",
    		"Memory cache usage in bytes.",
    		labels, nil)
    

    With this users of esc_exporter would be able to decide how they want to present the data. We could do it in the same way AWS does (by substracting cache value), show both on a graf etc.

    opened by pawelmrowczynski 1
  • Help not available unless ECS_CONTAINER_METADATA_URI_V4 is set

    Help not available unless ECS_CONTAINER_METADATA_URI_V4 is set

    Not sure how important this is important but, the help won't work unless the exported is running inside an ECS task:

    [[email protected] ~]$ ecs_exporter-0.1.0.linux-amd64/ecs_exporter -h
    2021/09/24 10:18:20 "ECS_CONTAINER_METADATA_URI_V4" environmental variable is not set, are you running this on ECS?
    
    [[email protected] ~]$ export ECS_CONTAINER_METADATA_URI_V4=12345
    
    [[email protected] ~]$ ecs_exporter-0.1.0.linux-amd64/ecs_exporter -h
    2021/09/24 10:33:09 sysconf(_SC_CLK_TCK) = 100
    Usage of ecs_exporter-0.1.0.linux-amd64/ecs_exporter:
      -addr string
            The address to listen on for HTTP requests. (default ":9779")
    
    opened by jtheo 1
  • Bump github.com/prometheus/client_golang from 1.11.0 to 1.12.2

    Bump github.com/prometheus/client_golang from 1.11.0 to 1.12.2

    Bumps github.com/prometheus/client_golang from 1.11.0 to 1.12.2.

    Release notes

    Sourced from github.com/prometheus/client_golang's releases.

    1.12.2 / 2022-05-13

    • [CHANGE] Added collectors.WithGoCollections that allows to choose what collection of Go runtime metrics user wants: Equivalent of MemStats structure configured using GoRuntimeMemStatsCollection, new based on dedicated runtime/metrics metrics represented by GoRuntimeMetricsCollection option, or both by specifying GoRuntimeMemStatsCollection | GoRuntimeMetricsCollection flag.
    • [CHANGE] :warning: Change in collectors.NewGoCollector metrics: Reverting addition of new ~80 runtime metrics by default. You can enable this back with GoRuntimeMetricsCollection option or GoRuntimeMemStatsCollection | GoRuntimeMetricsCollection for smooth transition.
    • [BUGFIX] Fixed the bug that causes generated histogram metric names to end with _total. ⚠️ This changes 3 metric names in the new Go collector that was reverted from default in this release.
      • go_gc_heap_allocs_by_size_bytes_total -> go_gc_heap_allocs_by_size_bytes,
      • go_gc_heap_frees_by_size_bytes_total -> go_gc_heap_allocs_by_size_bytes
      • go_gc_pauses_seconds_total -> go_gc_pauses_seconds.
    • [CHANCE] Removed -Inf buckets from new Go Collector histograms.

    Full Changelog: https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2

    1.12.1 / 2022-01-29

    • [BUGFIX] Make the Go 1.17 collector concurrency-safe #969
      • Use simpler locking in the Go 1.17 collector #975
    • [BUGFIX] Reduce granularity of histogram buckets for Go 1.17 collector #974
    • [ENHANCEMENT] API client: make HTTP reads more efficient #976

    Full Changelog: https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1

    1.12.0 / 2022-01-19

    • [CHANGE] example/random: Move flags and metrics into main() #935
    • [FEATURE] API client: Support wal replay status api #944
    • [FEATURE] Use the runtime/metrics package for the Go collector for 1.17+ #955
    • [ENHANCEMENT] API client: Update /api/v1/status/tsdb to include headStats #925
    • [SECURITY FIX] promhttp: Check validity of method and code label values #962 (Addressed CVE-2022-21698)

    What's Changed

    New Contributors

    ... (truncated)

    Changelog

    Sourced from github.com/prometheus/client_golang's changelog.

    1.12.2 / 2022-05-13

    • [CHANGE] Added collectors.WithGoCollections that allows to choose what collection of Go runtime metrics user wants: Equivalent of MemStats structure configured using GoRuntimeMemStatsCollection, new based on dedicated runtime/metrics metrics represented by GoRuntimeMetricsCollection option, or both by specifying GoRuntimeMemStatsCollection | GoRuntimeMetricsCollection flag.
    • [CHANGE] :warning: Change in collectors.NewGoCollector metrics: Reverting addition of new ~80 runtime metrics by default. You can enable this back with GoRuntimeMetricsCollection option or GoRuntimeMemStatsCollection | GoRuntimeMetricsCollection for smooth transition.
    • [BUGFIX] Fixed the bug that causes generated histogram metric names to end with _total. ⚠️ This changes 3 metric names in the new Go collector that was reverted from default in this release.
      • go_gc_heap_allocs_by_size_bytes_total -> go_gc_heap_allocs_by_size_bytes,
      • go_gc_heap_frees_by_size_bytes_total -> go_gc_heap_allocs_by_size_bytes
      • go_gc_pauses_seconds_total -> go_gc_pauses_seconds.
    • [CHANCE] Removed -Inf buckets from new Go Collector histograms.

    1.12.1 / 2022-01-29

    • [BUGFIX] Make the Go 1.17 collector concurrency-safe #969
      • Use simpler locking in the Go 1.17 collector #975
    • [BUGFIX] Reduce granularity of histogram buckets for Go 1.17 collector #974
    • [ENHANCEMENT] API client: make HTTP reads more efficient #976

    1.12.0 / 2022-01-19

    • [CHANGE] example/random: Move flags and metrics into main() #935
    • [FEATURE] API client: Support wal replay status api #944
    • [FEATURE] Use the runtime/metrics package for the Go collector for 1.17+ #955
    • [ENHANCEMENT] API client: Update /api/v1/status/tsdb to include headStats #925
    • [ENHANCEMENT] promhttp: Check validity of method and code label values #962
    Commits
    • e203144 Merge branch 'release-1.12' of github.com:prometheus/client_golang into relea...
    • 0e136d1 Cut v1.12.2 (#1052)
    • a27b6d7 Fix conflicts
    • 5fe1d33 Remove -Inf buckets from go collector histograms (#1049)
    • 049d0fe prometheus: Fix convention violating names for generated collector metrics (#...
    • 7eb9d11 gocollector: Reverted client_golang v1.12 addition of runtime/metrics metrics...
    • d498b3c gocollector: Added options to Go Collector for changing the (#1031)
    • 585540a Fix deprecated NewBuildInfoCollector API
    • 39cf574 Cut v1.12.1 (#978)
    • 9b785b0 Reduce granularity of histogram buckets for Go 1.17 collector (#974)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Allow ecsmetadata to work outside of ECS

    Allow ecsmetadata to work outside of ECS

    Provide a constructor, NewClientFromEnvironment to automatically discover the metadata service to create a client. Allow users to create a client with any metadata server endpoint.

    Additionally, export the HTTP client in ecsmetadata.Client for users to be able to set custom HTTP clients before using the metadata client.

    Fixes #17.

    opened by rakyll 0
  • Bump github.com/prometheus/client_golang from 1.12.2 to 1.14.0

    Bump github.com/prometheus/client_golang from 1.12.2 to 1.14.0

    Bumps github.com/prometheus/client_golang from 1.12.2 to 1.14.0.

    Release notes

    Sourced from github.com/prometheus/client_golang's releases.

    1.14.0 / 2022-11-08

    It might look like a small release, but it's quite opposite 😱 There were many non user facing changes and fixes and enormous work from engineers from Grafana to add native histograms in 💪🏾 Enjoy! 😍

    What's Changed

    • [FEATURE] Add Support for Native Histograms. #1150
    • [CHANGE] Extend prometheus.Registry to implement prometheus.Collector interface. #1103

    New Contributors

    Full Changelog: https://github.com/prometheus/client_golang/compare/v1.13.1...v1.14.0

    1.13.1 / 2022-11-02

    • [BUGFIX] Fix race condition with Exemplar in Counter. #1146
    • [BUGFIX] Fix CumulativeCount value of +Inf bucket created from exemplar. #1148
    • [BUGFIX] Fix double-counting bug in promhttp.InstrumentRoundTripperCounter. #1118

    Full Changelog: https://github.com/prometheus/client_golang/compare/v1.13.0...v1.13.1

    1.13.0 / 2022-08-06

    • [CHANGE] Minimum required Go version is now 1.17 (we also test client_golang against the new 1.19 version).
    • [ENHANCEMENT] Added prometheus.TransactionalGatherer interface for promhttp.Handler use which allows using low allocation update techniques for custom collectors. #989
    • [ENHANCEMENT] Added exemplar support to prometheus.NewConstHistogram. See ExampleNewConstHistogram_WithExemplar example on how to use it. #986
    • [ENHANCEMENT] Query requests are now retried after network error. #1022
    • [ENHANCEMENT] prometheus/push.Pusher now has context-aware methods that pass context to HTTP requests. #1028
    • [ENHANCEMENT] prometheus/push.Pusher has now Error method that retrieve last error. #1075
    • [ENHANCEMENT] testutil.GatherAndCompare provides now readable diff on failed comparisons. #998
    • [ENHANCEMENT] Query API now supports timeouts. #1014
    • [ENHANCEMENT] New MetricVec method DeletePartialMatch(labels Labels) for deleting all metrics that match provided labels. #1013
    • [ENHANCEMENT] api.Config now accepts passing custom *http.Client. #1025
    • [BUGFIX] Raise exemplar labels limit from 64 to 128 bytes as specified in OpenMetrics spec. #1091
    • [BUGFIX] Allow adding exemplar to +Inf bucket to const histograms. #1094
    • [ENHANCEMENT] Most promhttp.Instrument* middlewares now support adding exemplars to metrics. This allows hooking those to your tracing middleware that retrieves trace ID and puts it in exemplar if present. #1055
    • [ENHANCEMENT] Added testutil.ScrapeAndCompare method. #1043
    • [BUGFIX] Fixed GopherJS build support. #897
    • [ENHANCEMENT] :warning: Added way to specify what runtime/metrics collectors.NewGoCollector should use. See ExampleGoCollector_WithAdvancedGoMetrics. #1102

    New Contributors ❤️

    ... (truncated)

    Changelog

    Sourced from github.com/prometheus/client_golang's changelog.

    1.14.0 / 2022-11-08

    • [FEATURE] Add Support for Native Histograms. #1150
    • [CHANGE] Extend prometheus.Registry to implement prometheus.Collector interface. #1103

    1.13.1 / 2022-11-01

    • [BUGFIX] Fix race condition with Exemplar in Counter. #1146
    • [BUGFIX] Fix CumulativeCount value of +Inf bucket created from exemplar. #1148
    • [BUGFIX] Fix double-counting bug in promhttp.InstrumentRoundTripperCounter. #1118

    1.13.0 / 2022-08-05

    • [CHANGE] Minimum required Go version is now 1.17 (we also test client_golang against new 1.19 version).
    • [ENHANCEMENT] Added prometheus.TransactionalGatherer interface for promhttp.Handler use which allows using low allocation update techniques for custom collectors. #989
    • [ENHANCEMENT] Added exemplar support to prometheus.NewConstHistogram. See ExampleNewConstHistogram_WithExemplar example on how to use it. #986
    • [ENHANCEMENT] prometheus/push.Pusher has now context aware methods that pass context to HTTP request. #1028
    • [ENHANCEMENT] prometheus/push.Pusher has now Error method that retrieve last error. #1075
    • [ENHANCEMENT] testutil.GatherAndCompare provides now readable diff on failed comparisons. #998
    • [ENHANCEMENT] Query API now supports timeouts. #1014
    • [ENHANCEMENT] New MetricVec method DeletePartialMatch(labels Labels) for deleting all metrics that match provided labels. #1013
    • [ENHANCEMENT] api.Config now accepts passing custom *http.Client. #1025
    • [BUGFIX] Raise exemplar labels limit from 64 to 128 bytes as specified in OpenMetrics spec. #1091
    • [BUGFIX] Allow adding exemplar to +Inf bucket to const histograms. #1094
    • [ENHANCEMENT] Most promhttp.Instrument* middlewares now supports adding exemplars to metrics. This allows hooking those to your tracing middleware that retrieves trace ID and put it in exemplar if present. #1055
    • [ENHANCEMENT] Added testutil.ScrapeAndCompare method. #1043
    • [BUGFIX] Fixed GopherJS build support. #897
    • [ENHANCEMENT] :warning: Added way to specify what runtime/metrics collectors.NewGoCollector should use. See ExampleGoCollector_WithAdvancedGoMetrics. #1102
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/docker/docker from 20.10.17+incompatible to 20.10.21+incompatible

    Bump github.com/docker/docker from 20.10.17+incompatible to 20.10.21+incompatible

    Bumps github.com/docker/docker from 20.10.17+incompatible to 20.10.21+incompatible.

    Release notes

    Sourced from github.com/docker/docker's releases.

    v20.10.21

    This release of Docker Engine contains updated versions of Docker Compose, Docker Scan, Containerd, added packages for Ubuntu 22.10, and some minor bug fixes and enhancements.

    Client

    • Remove "experimental" gates around "--platform" in bash completion docker/cli#3824.

    Daemon

    • Allow "allow-nondistributable-artifacts" to be configured for Docker Hub moby/moby#44313.
    • Fix an Invalid standard handle identifie panic when registering the docker daemon as a service from a legacy CLI on Windows moby/moby#44326.

    Builder

    • Fix running git commands in Cygwin on Windows moby/moby#44332.
    • Update bundled BuildKit version to to fix "output clipped, log limit 1MiB reached" errors moby/moby#44339.

    Packaging

    • Provide packages for Ubuntu 22.10 "Kinetic Kudu".
    • Update Docker Compose to v2.12.2.
    • Update Docker Scan to v0.21.0.
    • Update containerd (containerd.io package) to v1.6.9.

    v20.10.20

    This release of Docker Engine contains partial mitigations for a Git vulnerability (CVE-2022-39253), and has updated handling of image:[email protected] image references.

    The Git vulnerability allows a maliciously crafted Git repository, when used as a build context, to copy arbitrary filesystem paths into resulting containers/images; this can occur in both the daemon, and in API clients, depending on the versions and tools in use.

    The mitigations available in this release and in other consumers of the daemon API are partial and only protect users who build a Git URL context (e.g. git+protocol://). As the vulnerability could still be exploited by manually run Git commands that interact with and check out submodules, users should immediately upgrade to a patched version of Git to protect against this vulernability. Further details are available from the GitHub blog ("Git security vulnerabilities announced").

    Client

    • Added a mitigation for CVE-2022-39253, when using the classic Builder with a Git URL as the build context.

    Daemon

    ... (truncated)

    Commits
    • 3056208 Merge pull request #44358 from thaJeztah/20.10_backport_busybox_w32_img
    • f99cb82 integration: download busybox-w32 from GitHub Release
    • 24aa4c9 Merge pull request #44353 from thaJeztah/20.10_backport_update_containerd_binary
    • 3f9dc25 update containerd binary to v1.6.9
    • 753cd92 Merge pull request #44326 from thaJeztah/20.10_bump_term_ansiterm
    • 82f583c Merge pull request #44339 from crazy-max/20.10_update_buildkit
    • 87ccd38 vendor: moby/term, Azure/go-ansiterm for golang.org/x/sys/windows compatibility
    • e83e465 [20.10] vendor: github.com/moby/buildkit eeb7b65ab7d651770a5ec52a06ea7c96eb97...
    • e3fef9a Merge pull request #44340 from thaJeztah/20.10_backport_skip_tests
    • 9c84417 skip TestImagePullStoredfDigestForOtherRepo() on Windows and rootless
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Feature: Expose cpu_stats.throttling_data

    Feature: Expose cpu_stats.throttling_data

    Information is contained here: curl -o stats.json "${ECS_CONTAINER_METADATA_URI_V4}/task/stats"

            "cpu_stats": {
                "cpu_usage": {
                    "total_usage": 1666419070,
                    "percpu_usage": [
                        676748195,
                        989670875
                    ],
                    "usage_in_kernelmode": 170000000,
                    "usage_in_usermode": 1010000000
                },
                "system_cpu_usage": 7028500000000,
                "online_cpus": 2,
                "throttling_data": {
                    "periods": 0,
                    "throttled_periods": 0,
                    "throttled_time": 0
                }
            },
    
    opened by jseiser 1
  • Release 0.2.0 - Multiple Issues

    Release 0.2.0 - Multiple Issues

    @SuperQ @roidelapluie @sysadmind

    I think the latest release broke, most things.

    Steps to reproduce:

    1. Deploy 0.2.0 into ECS fargate. image : "quay.io/prometheuscommunity/ecs-exporter:v0.2.0"
    2. Curl the endpoint. curl 10.1.110.149:9779/metrics > metrics.txt

    What we are seeing.

    1. Memory metrics all return 0 now.
    # HELP ecs_memory_bytes Memory usage in bytes.
    # TYPE ecs_memory_bytes gauge
    ecs_memory_bytes{container="console"} 0
    ecs_memory_bytes{container="log_router"} 0
    ecs_memory_bytes{container="nginx"} 0
    ecs_memory_bytes{container="prom_exporter"} 0
    # HELP ecs_memory_cache_usage Memory cache usage in bytes.
    # TYPE ecs_memory_cache_usage gauge
    ecs_memory_cache_usage{container="console"} 0
    ecs_memory_cache_usage{container="log_router"} 0
    ecs_memory_cache_usage{container="nginx"} 0
    ecs_memory_cache_usage{container="prom_exporter"} 0
    # HELP ecs_memory_limit_bytes Memory limit in bytes.
    # TYPE ecs_memory_limit_bytes gauge
    ecs_memory_limit_bytes{container="console"} 0
    ecs_memory_limit_bytes{container="log_router"} 0
    ecs_memory_limit_bytes{container="nginx"} 0
    ecs_memory_limit_bytes{container="prom_exporter"} 0
    # HELP ecs_memory_max_bytes Maximum memory usage in bytes.
    # TYPE ecs_memory_max_bytes gauge
    ecs_memory_max_bytes{container="console"} 0
    ecs_memory_max_bytes{container="log_router"} 0
    ecs_memory_max_bytes{container="nginx"} 0
    ecs_memory_max_bytes{container="prom_exporter"} 0
    
    1. The CPU metrics do not even show up.
    [[email protected] ecs-service-discovery]$ grep cpu metrics.txt
    # HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
    # TYPE process_cpu_seconds_total counter
    process_cpu_seconds_total 0.14
    
    opened by jseiser 20
  • Explanation of ecs_memory_limit_bytes

    Explanation of ecs_memory_limit_bytes

    Can anyone explain what this metric is actually returning the bytes of?

    # HELP ecs_memory_limit_bytes Memory limit in bytes.
    # TYPE ecs_memory_limit_bytes gauge
    ecs_memory_limit_bytes{container="heartbeat"} 9.223372036854772e+18
    ecs_memory_limit_bytes{container="log_router"} 9.223372036854772e+18
    ecs_memory_limit_bytes{container="prom_exporter"} 9.223372036854772e+18
    

    9223372036854772000 bytes is how prometheus is reading that, which is like 9223372036.8547725677 Gigabytes.

    The task definition itself is defined with

    memory                   = "1024"
    

    And the containers inside the task definition container

    prom_exporter memoryReservation : 100 heartbeat memoryReservation : 256 log_router memoryReservation : 100

    If i grab a performance metric log from ECS for the heartbeat container

    ContainerName | heartbeat
    CpuReserved | 0.0
    CpuUtilized | 0.8063517761230469
    MemoryReserved | 256
    MemoryUtilized | 61
    

    Would be great if anyone could help me understand what exactly I am looking at here. I really just want to be able to track the memory usage of my fargate containers.

    opened by jseiser 2
Releases(v0.2.0)
Owner
Prometheus Monitoring Community
Prometheus Monitoring Community Projects
Prometheus Monitoring Community
Amazon Elastic Container Service Agent

Amazon ECS Container Agent The Amazon ECS Container Agent is a component of Amazon Elastic Container Service (Amazon ECS) and is responsible for manag

Amazon Web Services 1.9k Dec 5, 2022
Provides an interactive prompt to connect to ECS Containers using the ECS ExecuteCommand API.

ecsgo Heavily inspired by incredibly useful gossm, this tool makes use of the new ECS ExecuteCommand API to connect to running ECS tasks. It provides

Ed Smith 46 Nov 27, 2022
Test-csi-driver - Amazon Elastic Block Store (EBS) CSI driver

Amazon Elastic Block Store (EBS) CSI driver Overview The Amazon Elastic Block St

Adi Vaknin 0 Feb 1, 2022
ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run, exec, cp, logs, stop)

English / 日本語 ecsk ECS + Task = ecsk ?? ecsk is a CLI tool to interactively use frequently used functions of docker command in Amazon ECS. (docker run

null 109 Nov 15, 2022
Openvpn exporter - Prometheus OpenVPN exporter For golang

Prometheus OpenVPN exporter Please note: This repository is currently unmaintain

Serialt 0 Jan 2, 2022
Json-log-exporter - A Nginx log parser exporter for prometheus metrics

json-log-exporter A Nginx log parser exporter for prometheus metrics. Installati

horan 0 Jan 5, 2022
Amplitude-exporter - Amplitude charts to prometheus exporter PoC

Amplitude exporter Amplitude charts to prometheus exporter PoC. Work in progress

Andrey S. Kolesnichenko 1 May 26, 2022
Vulnerability-exporter - A Prometheus Exporter for managing vulnerabilities in kubernetes by using trivy

Kubernetes Vulnerability Exporter A Prometheus Exporter for managing vulnerabili

null 24 Dec 4, 2022
Netstat exporter - Prometheus exporter for exposing reserved ports and it's mapped process

Netstat exporter Prometheus exporter for exposing reserved ports and it's mapped

Amir Hamzah 0 Feb 3, 2022
prometheus docker-container-exporter

Start with docker cd /home git clone https://github.com/sanggi-wjg/docker-container-exporter.git docker build -t dc-exporter . docker run -p 9091:90

null 1 Dec 3, 2021
Pulumi provider for the Elasticsearch Service and Elastic Cloud Enterprise

Terraform Bridge Provider Boilerplate This repository contains boilerplate code for building a new Pulumi provider which wraps an existing Terraform p

Pulumi 4 Nov 18, 2022
Github billing exporter - Billing exporter for GitHub organizations

GitHub billing exporter Forked From: https://github.com/borisputerka/github_bill

Simon Schneider 4 Nov 2, 2022
📡 Prometheus exporter that exposes metrics from SpaceX Starlink Dish

Starlink Prometheus Exporter A Starlink exporter for Prometheus. Not affiliated with or acting on behalf of Starlink(™) ?? Starlink Monitoring System

DanOpsTech 82 Nov 25, 2022
Prometheus exporter for Chia node metrics

chia_exporter Prometheus metric collector for Chia nodes, using the local RPC API Building and Running With the Go compiler tools installed: go build

Kevin Retzke 33 Sep 19, 2022
Nvidia GPU exporter for prometheus using nvidia-smi binary

nvidia_gpu_exporter Nvidia GPU exporter for prometheus, using nvidia-smi binary to gather metrics. Introduction There are many Nvidia GPU exporters ou

Utku Özdemir 188 Dec 2, 2022
NVIDIA GPU metrics exporter for Prometheus leveraging DCGM

DCGM-Exporter This repository contains the DCGM-Exporter project. It exposes GPU metrics exporter for Prometheus leveraging NVIDIA DCGM. Documentation

NVIDIA Corporation 229 Dec 7, 2022
Prometheus exporter for DeadMansSnitch

DeadMansSnitch Exporter Prometheus exporter for DeadMansSnitch information (snitches) Configuration Usage: deadmanssnitch-exporter [OPTIONS] Applic

WebDevOps 3 Apr 6, 2022
A prometheus exporter for monitoring FIO nodeos nodes.

fio-prometheus-exporter This is a simple prometheus exporter for FIO nodeos nodes. It can connect to multiple nodes to display a few critical statisti

Todd G 2 Aug 19, 2022
A Prometheus exporter, written in Golang, for Magento 2

Magento 2 Prometheus Exporter A Prometheus exporter, written in Golang, for Magento 2. Philosophy It might be abnormal to start with the "philosophy"

Julian 2 May 3, 2022