ã¯ããã«
ãã®èšäºã¯ AWS Advent Calendar 2021 ã® 5 æ¥ç®ã®èšäºã§ãã
Fargate 㧠Node.js ã¢ããªã®ã¡ããªã¯ã¹ã Prometheus Agent ããµã€ãã«ãŒã³ã³ãããšããŠåãããŠãAmazon Managed Service for Prometheus (AMP) ã«éä¿¡ã㊠Grafana ã§èŠãããããã«ããŠã¿ãŸããã
ã¡ãªã¿ã« Promethus Agent ã¯ãŸã å®éšçãªæ©èœ ãªãããå®åã§ã®å©çšã¯æšå¥šããŸããã
æ¬èšäºã®ç°å¢æ§ç¯ã«ã¯ AWS CDK ãå©çšããŠããŸãã
åäœç°å¢
- Node.js v16.13.0
- AWS CDK 2.0.0 (build 4b6ce31)
- Prometheus 2.32.1
ç°å¢æ§ç¯
æ©éç°å¢æ§ç¯ãé²ããŠãããŸãããŸã AMP ã«ã€ããŠã¯ CDK ããæäœã§ããªãããã§ããã®ã§ãã¯ãŒã¯ã¹ããŒã¹ã®äœæã«ã€ããŠã¯ AWS ã³ã³ãœãŒã«ããæåã§è¡ããŸãã(2021/12/06)
aws-aps
ãå©çšããããšã§ AWS CDK ããã§ã Amazon Managed Service for Prometheus ã®ã¯ãŒã¯ã¹ããŒã¹ãäœæããããšç¢ºèªã§ããŸããã®ã§ããã¡ãã®å©çšãæšå¥šããããŸã… ðð
lib/prometheus-agent-test-stack.ts ã®ã³ãŒããä¿®æ£æžã¿ã§ AWS CDK 㧠Amazon Managed Service for Prometheus ã®ã¯ãŒã¯ã¹ããŒã¹ãäœæããããã«ç·šéããŸããã(2021/12/18 è¿œèš)
æå㧠AMP ã®ã¯ãŒã¯ã¹ããŒã¹ãäœæããæé
ãŸããAMP ã®ã³ã³ãœãŒã«ç»é¢ ã«é·ç§»ããŠã¯ãŒã¯ã¹ããŒã¹ãäœæããŸãã
1. AMP ã®ã³ã³ãœãŒã«ç»é¢ ããã¯ãŒã¯ã¹ããŒã¹äœæç»é¢ã«é·ç§»ãã
2. AMP ã®ã¯ãŒã¯ã¹ããŒã¹ãäœæãã
3. AMP ã®ã¯ãŒã¯ã¹ããŒã¹äœæå®äºã確èªãããšåæã«èšå®å€ãæ§ããŠãã
AMP ã¯ãŒã¯ã¹ããŒã¹ã® ãšã³ããã€ã³ã - ãªã¢ãŒãæžã蟌㿠URL
ã¯ãPrometheus Agent 㧠AMP ã«ããŒã¿éä¿¡ããéããGrafana ã§ããŒã¿ãœãŒã¹ãç»é²ããéãªã©ã«å¿
èŠãšãªãããæ§ããŠãããŸãã
AWS CDK ã§ç°å¢æ§ç¯ãã
CDK ã§æ§ç¯äœæ¥ãé²ããŸãããŸãã¯äžèšã³ãã³ã㧠CDK ãããžã§ã¯ããäœæããŸãã䜿çšèšèªã¯ TypeScript
ãéžæããŸãã
mkdir prometheus-agent-test && cd prometheus-agent-test
cdk init --language typescript
ãŸã CDK ã§ã€ã³ãã©æ§ç¯ãé²ããŠããåã«ãã¡ããªã¯ã¹åéãã¹ãçšã® Node.js ã¢ããªãæºåããŸãã
ECS Fargate ã§åãã Node.js ã¢ããªãæºåãã
prom-client ãå©çšããŠãNode.js ã®ã¡ããªã¯ã¹ãååŸã§ããã ãã® Node.js ã¢ããªãæºåããŸããprometheus-agent-test
ãã©ã«ãã§äžèšã³ãã³ããå®è¡ããŸãã
mkdir metrics-app && cd metrics-app
npm init -y
npm install --save prom-client
次㫠metrics-app
ãã©ã«ãå
ã« index.js
ãäœæããŠäžèšãç·šéããŸãã
// metrics-app/index.js
"use strict";
const http = require("http");
const server = http.createServer();
const client = require("prom-client");
const register = new client.Registry();
// 5ç§ééã§ã¡ããªã¯ã¹ãååŸãã
client.collectDefaultMetrics({ register, timeout: 5 * 1000 });
server.on("request", async function (req, res) {
// /metrics ã«ã¢ã¯ã»ã¹ããããPrometheus ã®ã¬ããŒããè¿ã
if (req.url === "/metrics") {
res.setHeader("Content-Type", register.contentType);
const metrics = await register.metrics();
return res.end(metrics);
} else {
return res.writeHead(404, { "Content-Type": "text/plain" });
}
});
server.listen(8080);
node index.js
ã³ãã³ããå®è¡ã㊠http://localhost:8080/metrics
ã«ã¢ã¯ã»ã¹ããŠã¿ãŸããäžèšã®ããã«åçš®ã¡ããªã¯ã¹ãåºåãããŠããæ§åã確èªã§ããã° OK ã§ãã
Prometheus ã®ã¬ããŒããæ£åžžã«åºåãããŠããæ§å
ä»å㯠ECS äžã§ Node.js ã¢ããªãåäœããããããDockerfile
ãäœæããŸãã
# metrics-app/Dockerfile
FROM public.ecr.aws/docker/library/node:16-alpine3.12 AS builder
EXPOSE 8080
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --max-old-space-size=4096
COPY . .
CMD [ "node", "index.js" ]
äžèš Dockerfile
äœæåŸãåã³åäœæ€èšŒã®ããäžèšã³ãã³ããå®è¡ããŠãããhttp://localhost:8080/metrics
ã«ã¢ã¯ã»ã¹ããŠã¿ãŸãã
docker build -t prometheus-agent-test/metrics-app .
docker run -p 8080:8080 prometheus-agent-test/metrics-app:latest
å
ã»ã©ãšåæ§ã« http://localhost:8080/metrics
ã¢ã¯ã»ã¹æã«åçš®ã¡ããªã¯ã¹ãåºåãããŠããæ§åã確èªã§ããã° OK ã§ãã
Node.js ã¢ããªãç£èŠãã Prometheus Agent ãæºåãã
ãŸã㯠Prometheus é¢é£ãã¡ã€ã«ãé
眮ããããã®ãã©ã«ããäœæããŸããprometheus-agent-test
ãã©ã«ãå
ã§äžèšã³ãã³ããå®è¡ããŸãã
mkdir prometheus-agent && cd prometheus-agent
次㫠Prometheus ã®èšå®ãã³ãã¬ãŒããã¡ã€ã«ãäœæããŸãããã³ãã¬ãŒããã¡ã€ã«ã¯ sed
ãå©çšããŠäžèº«ã® __TASK_ID__
ããã³ __REMOTE_WRITE_URL__
ãæžãæããŠå©çšããŸãã
# prometheus-agent/prometheus.tmpl.yml
global:
scrape_interval: 5s
external_labels:
monitor: "prometheus"
scrape_configs:
- job_name: "prometheus-agent-test"
static_configs:
- targets: ["localhost:8080"]
labels:
# ããã©ã«ãã® localhost:8080 ãã€ã³ã¹ã¿ã³ã¹ãšããŠå©çšããããšã
# ã¡ããªã¯ã¹ã®å€å¥ããã¥ãããªããã ECS Task ã® ID ãå©çšãã
instance: "__TASK_ID__"
remote_write:
# AMP ã¯ãŒã¯ã¹ããŒã¹äœææã«æ§ããŠãããã
# `ãšã³ããã€ã³ã - ãªã¢ãŒãæžã蟌㿠URL` ãèšå®ããç®æ
- url: "__REMOTE_WRITE_URL__"
sigv4:
region: ap-northeast-1
queue_config:
max_samples_per_send: 1000
max_shards: 200
capacity: 2500
èšå®ãã¡ã€ã«ã®äœæãå®äºãããããã³ãã¬ãŒããã¡ã€ã«ãå©çšã㊠Prometheus ã®èšå®ãã¡ã€ã«ãäœæããPrometheus Agent ãèµ·åãããããã®ã·ã§ã«ã¹ã¯ãªãããäœæããŸãã
# prometheus-agent/docker-entrypoint.sh
#!/bin/sh
while [ -z "$taskId" ]
do
# ECS Fargate ã§èµ·åããã¿ã¹ã¯ ID ãååŸãã
taskId=$(curl --silent ${ECS_CONTAINER_METADATA_URI}/task | jq -r '.TaskARN | split("/") | .[-1]')
echo "waiting..."
sleep 1
done
echo "taskId: ${taskId}"
echo "remoteWriteUrl: ${REMOTE_WRITE_URL}"
# ã¿ã¹ã¯ ID `taskId` ããã³ãç°å¢å€æ° `REMOTE_WRITE_URL` ã§ã
# Prometheus ã®ãã³ãã¬ãŒããã¡ã€ã« `prometheus.tmpl.yml` ã®å
容ãæžãæãã
# ãã®çµæã `/etc/prometheus/prometheus.yml` ã«åºåãã
cat /etc/prometheus/prometheus.tmpl.yml | \
sed "s/__TASK_ID__/${taskId}/g" | \
sed "s>__REMOTE_WRITE_URL__>${REMOTE_WRITE_URL}>g" > /etc/prometheus/prometheus.yml
# --enable-feature=agent 㧠Prometheus ã Agent ã¢ãŒãã§èµ·åãã
# Prometheus ã®ã³ã³ãã£ã°ãã¡ã€ã«ã«ã¯äžèšã§åºåãã `/etc/prometheus/prometheus.yml` ãå©çšãã
/usr/local/bin/prometheus \
--enable-feature=agent \
--config.file=/etc/prometheus/prometheus.yml \
--web.console.libraries=/etc/prometheus/console_libraries \
--web.console.templates=/etc/prometheus/consoles
ãã㧠Prometheus Agent èµ·åã®ããã®æºåã¯æŽã£ããããæåŸã« Dockerfile
ãæºåããŸããã¡ãªã¿ã« Prometheus Agent 㯠v2.32.0
以éã§å©çšå¯èœã§ããæ¬èšäºã§ã¯ v2.32.1
ãå©çšããŸãã
# prometheus-agent/Dockerfile
FROM --platform=arm64 alpine:3.15
ADD prometheus.tmpl.yml /etc/prometheus/
RUN apk add --update --no-cache jq sed curl
# ARM64 ã§åäœãã Prometheus v2.32.1 ã curl ã§ããŠã³ããŒãå±éãã
RUN curl -sL -O https://github.com/prometheus/prometheus/releases/download/v2.32.1/prometheus-2.32.1.linux-arm64.tar.gz
RUN tar -zxvf prometheus-2.32.1.linux-arm64.tar.gz && rm prometheus-2.32.1.linux-arm64.tar.gz
# `prometheus` ã³ãã³ãã `/usr/local/bin/prometheus` ã«ç§»åãã
RUN mv prometheus-2.32.1.linux-arm64/prometheus /usr/local/bin/prometheus
COPY ./docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
CMD ["/docker-entrypoint.sh"]
ãããŸã§ã§ CDK ã§ã€ã³ãã©æŽåãé²ããŠããããã®äžæºåã¯å®äºã§ãã
ECS Fargate äžã§ Node.js ã¢ããªããã³ Prometheus Agent ãåäœããã
ããšã¯ CDK 㧠ECS Fargate äžã§ Node.js ã¢ããªããã³ Prometheus AgentãGrafana ãåäœãããããã®ç°å¢ãæŽåããŠãããŸãã
lib/prometheus-agent-test-stack.ts
ã®å
容ãæžãæããŸãã
// lib/prometheus-agent-test-stack.ts
import { Construct } from "constructs";
import {
Stack,
StackProps,
aws_ecs as ecs,
aws_logs as logs,
aws_aps as aps,
aws_ecs_patterns as ecs_patterns,
aws_iam as iam,
aws_elasticloadbalancingv2 as elbv2,
Duration,
CfnOutput,
} from "aws-cdk-lib";
export class PrometheusAgentTestStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
// Node.js ã¢ããªã« ecs_patterns.ApplicationLoadBalancedFargateService ãå©çšã㊠ALB çµç±ã§ã¢ã¯ã»ã¹å¯èœã«ãã
const projectName = "prometheus-agent-test";
const fargateService =
new ecs_patterns.ApplicationLoadBalancedFargateService(
this,
`${projectName}-fargate-service`,
{
serviceName: `${projectName}-fargate-service`,
cpu: 256,
desiredCount: 3,
listenerPort: 80,
taskImageOptions: {
family: `${projectName}-taskdef`,
image: ecs.ContainerImage.fromAsset("metrics-app"),
containerPort: 8080,
logDriver: ecs.LogDrivers.awsLogs({
streamPrefix: `/${projectName}/metrics-app`,
logRetention: logs.RetentionDays.ONE_DAY,
}),
},
cluster: new ecs.Cluster(this, `${projectName}-cluster`, {
clusterName: `${projectName}-cluster`,
}),
memoryLimitMiB: 512,
}
);
fargateService.targetGroup.configureHealthCheck({
path: "/metrics",
timeout: Duration.seconds(8),
interval: Duration.seconds(10),
healthyThresholdCount: 2,
unhealthyThresholdCount: 4,
healthyHttpCodes: "200",
});
// æ¬è³ªã§ã¯ãªãããGravition2 ã§åäœããããããã« RuntimePlatform ã®ããããã£ãäžæžãããŠãã
const fargateServiceTaskdef = fargateService.taskDefinition.node
.defaultChild as ecs.CfnTaskDefinition;
fargateServiceTaskdef.addPropertyOverride("RuntimePlatform", {
CpuArchitecture: "ARM64",
OperatingSystemFamily: "LINUX",
});
// AMP ãžã®æžã蟌ã¿æš©éãä»äžãã
fargateService.taskDefinition.taskRole.addManagedPolicy(
iam.ManagedPolicy.fromAwsManagedPolicyName(
"AmazonPrometheusRemoteWriteAccess"
)
);
// (2021/12/18) Amazon Managed Service for Prometheus ã®ã¯ãŒã¯ã¹ããŒã¹ãäœæããŠãPrometheus ã® remote-write URL ãååŸãã
const apsWorkspace = new aps.CfnWorkspace(
this,
`${projectName}-prom-workspace`,
{
alias: `${projectName}-prom-workspace`,
}
);
const apsWorkspaceRemoteUrl = `${apsWorkspace.attrPrometheusEndpoint}api/v1/remote_write`;
// (2021/12/18) æ¬èšäºã§é »åºãã "ãšã³ããã€ã³ã - ãªã¢ãŒãæžã蟌㿠URL" ãã³ã³ãœãŒã«ã«åºåãã
new CfnOutput(this, "prom-remote-write-url", {
value: apsWorkspaceRemoteUrl,
description: "Prometheus Workspace ã® remote-write URL",
exportName: "PromRemoteWriteURL",
});
// AMP ãžã¡ããªã¯ã¹æ
å ±ãéä¿¡ããããã® Prometheus Agent ã³ã³ãããè¿œå ãã
const containerName = `${projectName}-prometheus-agent`;
fargateService.taskDefinition.addContainer(containerName, {
containerName,
image: ecs.ContainerImage.fromAsset("prometheus-agent"),
memoryReservationMiB: 128,
environment: {
// (2021/12/18) CDK çµç±ã§äœæãã Prometheus ã® remote-write URL ãèšå®ãã
REMOTE_WRITE_URL: apsWorkspaceRemoteUrl,
},
logging: new ecs.AwsLogDriver({
streamPrefix: `/${projectName}/prometheus-agent`,
logRetention: logs.RetentionDays.ONE_DAY,
}),
});
// Grafana ã®ã¿ã¹ã¯å®çŸ©ãäœæãã
const grafanaDashboardTaskDefinition = new ecs.FargateTaskDefinition(
this,
`${projectName}-grafana-taskdef`,
{
family: `${projectName}-grafana-taskdef`,
}
);
// Grafana ã®ã¿ã¹ã¯ã Prometheus Query ãå©ããããã«æš©éä»äžãã
grafanaDashboardTaskDefinition.taskRole.addManagedPolicy(
iam.ManagedPolicy.fromAwsManagedPolicyName("AmazonPrometheusQueryAccess")
);
// Grafana ã®ã³ã³ãããè¿œå ããããã¹ãã¬ãã£ã¯ã¹ã«ã¯ dashboard ãèšå®ãã
const grafanaDashboardContainerName = `${projectName}-grafana-dashboard`;
grafanaDashboardTaskDefinition.addContainer(grafanaDashboardContainerName, {
containerName: grafanaDashboardContainerName,
image: ecs.ContainerImage.fromRegistry("public.ecr.aws/ubuntu/grafana"),
environment: {
AWS_SDK_LOAD_CONFIG: "true",
GF_AUTH_SIGV4_AUTH_ENABLED: "true",
GF_SERVER_SERVE_FROM_SUB_PATH: "true",
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s/dashboard",
},
portMappings: [{ containerPort: 3000 }],
memoryLimitMiB: 512,
logging: new ecs.AwsLogDriver({
streamPrefix: `/${projectName}/grafana-dashboard`,
logRetention: logs.RetentionDays.ONE_DAY,
}),
});
const grafanaDashboardServiceName = `${projectName}-grafana-dashboard-service`;
const grafanaDashboardService = new ecs.FargateService(
this,
grafanaDashboardServiceName,
{
serviceName: grafanaDashboardServiceName,
cluster: fargateService.cluster,
taskDefinition: grafanaDashboardTaskDefinition,
desiredCount: 1,
}
);
// Grafana ã®ã¿ã¹ã¯ã ALB ã®ã¿ãŒã²ããã°ã«ãŒãã«çŽã¥ãã
fargateService.listener.addTargets(
`${projectName}-grafana-dashboard-target`,
{
priority: 1,
conditions: [elbv2.ListenerCondition.pathPatterns(["/dashboard/*"])],
healthCheck: {
path: "/dashboard/login",
interval: Duration.seconds(10),
timeout: Duration.seconds(8),
healthyThresholdCount: 2,
unhealthyThresholdCount: 3,
healthyHttpCodes: "200",
},
port: 3000,
protocol: elbv2.ApplicationProtocol.HTTP,
targets: [grafanaDashboardService],
}
);
}
}
ãã®åŸãcdk deploy
ã§ã€ã³ãã©ãæ§ç¯ããŸãã
CDK ã«ããã€ã³ãã©æ§ç¯ãæ£åžžã«å®è¡ãããæã®æ§å
ãããã€ãæ£åžžã«å®äºããã®ã確èªããããOutputs
ã«åºåãããŠãã PrometheusAgentTestStack.prometheusagenttestfargateserviceServiceURL<èå¥å>
ã® URL æ«å°Ÿã« /metrics
ãä»äžããŠã¢ã¯ã»ã¹ããŠã¿ãŸãã åºåãããŠãã URL ã®ãã©ãŒããã㯠http://<èå¥å>.ap-northeast-1.elb.amazonaws.com
ã«ãªããŸãã
ã€ãŸããhttp://<èå¥å>.ap-northeast-1.elb.amazonaws.com/metrics
ã«ã¢ã¯ã»ã¹ããŸãã
ALB çµç±ã§ Node.js ã¢ããªã«ã¢ã¯ã»ã¹å¯èœãªããšã確èªãã
ãŸããOutputs
ã«åºåãããŠãã PrometheusAgentTestStack.promremotewriteurl
ã¯åŸã«å©çšãã ãšã³ããã€ã³ã - ãªã¢ãŒãæžã蟌㿠URL
ã§äœ¿çšããã®ã§æ§ããŠãããŸãã
ãããŸã§ã§ AWS CDK ã§ã®ã€ã³ãã©æ§ç¯äœæ¥ã¯å®äºããŸãããæåŸã« Grafana 㧠AMP ã®ã¡ããªã¯ã¹ãå¯èŠåããããã®äœæ¥ãé²ããŠãããŸãã
Grafana 㧠Prometheus (AMP) ã®ã¡ããªã¯ã¹ãå¯èŠåãã
å
ã»ã©ã® /metrics
ãã¹ãžã®ã¢ã¯ã»ã¹åæ§ãOutputs
ã«åºåãããŠãã URL ã®æ«å°Ÿã« /dashboard/login
ãä»äžããŠã¢ã¯ã»ã¹ããŸããGrafana ã®åæãŠãŒã¶ããã³ãã¹ã¯ãŒã㯠admin
ãšãªããŸãã
ã€ãŸããhttp://<èå¥å>.ap-northeast-1.elb.amazonaws.com/dashboard/login
ã«ã¢ã¯ã»ã¹ããŠã¿ãŸãã
ãã°ã€ã³æ å ±ãæ£ãããã°ãæ°ãããã¹ã¯ãŒããèšå®ããç»é¢ã«é·ç§»ããã®ã§æ°ããªãã¹ã¯ãŒããå ¥åããŠãã°ã€ã³ãçµããŸãããã°ã€ã³åŸã¯ãPrometheus (AMP) ãããŒã¿ãœãŒã¹ãšããŠè¿œå ããããã«äžèšã®æäœãè¡ããŸãã
1. æ¯è»ã¢ã€ã³ã³ãã¯ãªãã¯ã㊠Data sources
ãã¯ãªãã¯ãã
2. Add data source
ãã¿ã³ãã¯ãªãã¯ãã
3. ããŒã¿ãœãŒã¹ãšã㊠Prometheus ãéžæãã
4. Prometheus ãããŒã¿ãœãŒã¹ãšããŠè¿œå ãã
Prometheus (AMP) ã«éä¿¡ããã¡ããªã¯ã¹ã Grafana ã§å¯èŠåããããã®æºåãæŽã£ãã®ã§ãå®éã« Grafana ã®ããã·ã¥ããŒãã§ã¡ããªã¯ã¹ãå¯èŠåããŠã¿ãŸããæã£åãæ©ãã¡ããªã¯ã¹ãå¯èŠåãããããããã·ã¥ããŒãã«ã¯ NodeJS Application Dashboard ãå©çšããŸãã
1. + ã¢ã€ã³ã³ãã¯ãªãã¯ããŠãImport
ãã¯ãªãã¯ãã
2. NodeJS Application Dashboard
ã® ID ãå
¥åã㊠Load
ãã¿ã³ãã¯ãªãã¯ãã
3. å¿
èŠãªæ
å ±ãå
¥åã㊠NodeJS Application Dashboard
ã®ã€ã³ããŒããå®äºãã
4. ããã·ã¥ããŒããã Node.js ã¢ããªã®ã¡ããªã¯ã¹ã確èªã§ãã
ãããŸã§ã®æé ã§ã¡ããªã¯ã¹ã®å¯èŠåã¯å®äºããŸããããè² è·ã«å¿ããŠå®éã«ã¡ããªã¯ã¹ãå€åããæ§åã確èªããŠã¿ãŸããVegeta ãå©çšããŠãå®éã«è² è·ããããŠã¿ãŸããäžèšã³ãã³ããå®è¡ããŸãã
echo 'GET http://<èå¥å>.ap-northeast-1.elb.amazonaws.com/metrics' | vegeta attack -duration=5s | vegeta report
ãã®åŸãåã³ Grafana ã®ããã·ã¥ããŒããèŠã«ãããŸããè² è·ããããæé垯ã®ã¿ã°ã©ãã«å€åãããããšã確èªã§ããã¯ãã§ãã
ããã·ã¥ããŒãã® CPU 䜿çšçã®ã°ã©ãã«å€åããã£ãããšã確èªã§ãã
ãããã«
ä»å㯠ECS Fargate ã®ã¡ããªã¯ã¹ã Prometheus Agent 㧠Amazon Managed Service for Prometheus (AMP) ã«éä¿¡ããããã Grafana ã§å¯èŠåããæ¹æ³ã«ã€ããŠçŽ¹ä»ããŸããã
ECS ã®ãµãŒãã¹ã§ã¿ã¹ã¯ãå®è¡ããå Žå㯠ãµãŒãã¹ãã£ã¹ã«ã㪠ã®å©çšãå¯èœãªãããPrometheus ã® ãµãŒãã¹ãã£ã¹ã«ããªã®èšå® ãè¡ãããšã§ãåäžã® Prometheus ã§å šãŠã®ã³ã³ããã®ã¡ããªã¯ã¹ãæ±ãããšãå¯èœã§ãã
ãŸã Node.js ã¢ããªãäœæããéã«å©çšãã prom-client
㧠ã«ã¹ã¿ã ã¡ããªã¯ã¹ ãäœæããããšã§ãç£èŠãããé
ç®ãèªç±ã«å¢ããããšãå¯èœã§ãã
æ¬èšäºã ECS Fargate ãç£èŠããéã®æ€èšææã® 1 ã€ãšãªããã幞ãã§ãã
åèãªã³ã¯
- AWS FargateïŒãµãŒããŒãã¯ã©ã¹ã¿ãŒã®ç®¡çãäžèŠãªã³ã³ããã®äœ¿çšïŒ| AWS
- Introducing Prometheus Agent Mode, an Efficient and Cloud-Native Way for Metric Forwarding | Prometheus
- Amazon Managed Service for Prometheus | ãã«ãããŒãžã Prometheus | Amazon Web Services
- Grafana: The open observability platform | Grafana Labs
- AWS ã¯ã©ãŠãéçºããã â ã¢ããŸã³ ãŠã§ã ãµãŒãã¹
- siimon/prom-client: Prometheus client for node.js
- tsenart/vegeta: HTTP load testing tool and library. It’s over 9000!
- NodeJS Application Dashboard dashboard for Grafana | Grafana Labs