Дополнительные метрики CloudWatch у AWS S3

Включение дополнительных метрик AWS S3 01Дополнительные метрики CloudWatch у AWS S3 изначально отключены, а по умолчанию доступны всего лишь две метрики. Это BucketSizeBytes и NumberOfObjects. Алерт разумно сделать разве что по первой, а вторая пригодится лишь для сведения. Полезно было бы видеть метрики, которые отражают качество взаимодействия с клиентами и такие метрики есть! Правда нюанс в том, что включать их нужно отдельно на каждый бакет. Об этом и поговорим сегодня в статье.

Дополнительные метрики CloudWatch у AWS S3

Для подключения метрик можно использовать в том числе Amazon S3 REST API и AWS CLI, но наиболее частый сценарий это конечно UI. Но не забывайте, что ручную работу можно исключить, используя Terraform. С него и начнем, как с самого изящного варианта.

Terraform

За настройку метрик CloudWatch S3 отвечает ресурс aws_s3_bucket_metric 1. Использовать его очень просто:

А для тех, кто администрирует S3 руками, внизу пошаговая инструкция.

UI

Есть официальный гайд, в котором вы найдете последовательность настройки фильтра для включения метрик, вот он — Creating a CloudWatch metrics configuration for all the objects in your bucket. Русифицированная версия отсутствует. Подписи на скриншотах внизу соответствуют пунктам шагов в инструкции.

3. Choose the Metrics tab.

4. Under Bucket metrics, choose View additional charts.

Шаг 1 - Включение дополнительных метрик AWS S3

5. Choose the Request metrics tab.

6. Choose Create filter.

Шаг 2 - Включение дополнительных метрик AWS S3

7. In the Filter name box, enter your filter name.

Names can only contain letters, numbers, periods, dashes, and underscores. We recommend using the name EntireBucket for a filter that applies to all objects.

8.Under Filter scope, choose This filter applies to all objects in the bucket.

You can also define a filter so that the metrics are only collected and reported on a subset of objects in the bucket. For more information, see Creating a metrics configuration that filters by prefix, object tag, or access point.

9. Choose Save changes.

Шаг 3 - Включение дополнительных метрик AWS S3

После этого можете возвращаться в Bucket metrics и там все увидеть.

Обзор - Включение дополнительных метрик AWS S3

При этом в CloudWatch появится новый набор метрик — Request Metrics Per Filter. Вот так это выглядит:

Просмотр - Включение дополнительных метрик AWS S3

Настройка завершена.

cloudwatch_exporter

CloudWatch отдает базовые метрики — BucketSizeBytes и NumberOfObjects — раз в сутки. На графиках это будет выглядеть как одна единственная точка за 24 часа. Для Прометея это не подходит — хочется видеть именно непрерывный график, по которому можно будет алертить.

Примечание: это значит, что мы должны забирать эту единственную точку целые 24 часа до того момента, пока не появится новая. То есть наш график будет выглядеть ежесуточными ступеньками (разумеется при наличии изменений в бакете). Чтобы cloudwatch_exporter делал именно так, нужно выставить параметр range_seconds минимум в 24 часа. Лучше с запасом. И не бойтесь забрать несколько точек враз, возвращена будет одна единственная самая свежая..

Именно поэтому у меня будут использоваться кастомные параметры для этих двух метрик:

Последний параметр нужен, чтобы экспортер не выставлял отметку времени, ведь если она будет старше 5 минут (а она будет, читай выше), то Prometheus справедливо посчитает метрику как Staleness 2 3. Этот хак и позволяет растянуть в горизонтальную линию одну единственную точку.

Обратите внимание, что метрики requests по умолчанию возвращают точки значительно чаще — раз в минуту:

Request metrics are available at one-minute intervals after some latency for processing.

Именно поэтому параметров cloudwatch_exporter по умолчанию нам достаточно. На этом все. Успехов!

comments powered by HyperComments
1morocco
2022-06-18 22:21:43
<strong>1internal</strong>
what is dissertation
2022-07-05 14:36:00
<strong>chicago illinois dissertation help https://professionaldissertationwriting.org/</strong>
all but dissertation
2022-07-05 18:34:06
<strong>buy dissertation https://professionaldissertationwriting.com/</strong>
dissertation writing uk
2022-07-05 20:47:14
<strong>write my dissertation https://helpwithdissertationwritinglondon.com/</strong>
buy dissertations online
2022-07-05 22:37:13
<strong>online edd no dissertation https://dissertationwritingcenter.com/</strong>
writing services
2022-07-06 02:17:19
<strong>dissertation defense https://dissertationhelpexpert.com/</strong>
help with my dissertation
2022-07-06 03:42:50
<strong>disertation https://accountingdissertationhelp.com/</strong>
writing a dissertation
2022-07-06 07:07:23
<strong>chicago illinois dissertation help https://examplesofdissertation.com/</strong>
writing a dissertation prospectus
2022-07-06 08:26:54
<strong>defending your dissertation https://writing-a-dissertation.net/</strong>
uk dissertation writing
2022-07-06 13:21:28
<strong>how long is a dissertation https://bestdissertationwritingservice.net/</strong>
dissertation proposal help
2022-07-06 16:18:50
<strong>tips for writing a dissertation https://businessdissertationhelp.com/</strong>
ma dissertation writing service
2022-07-06 21:18:45
<strong>dissertation thesis writing https://writingadissertationproposal.com/</strong>
thesis vs dissertation
2022-07-07 00:25:43
<strong>how long is a dissertation paper https://dissertationhelpspecialist.com/</strong>
dissertation help service general
2022-07-07 03:25:57
<strong>uk dissertation writing help quotes https://dissertationhelperhub.com/</strong>
dissertation literature review help
2022-07-07 05:56:52
<strong>dissertation title examples https://customthesiswritingservices.com/</strong>
caesars online casino nj
2022-07-25 21:34:23
<strong>no deposit bonus win real money online casino for free https://firstonlinecasino.org/</strong>
online casino real money usa
2022-07-26 02:26:06
<strong>online real money casino usa https://newlasvegascasinos.com/</strong>
cabaret club online casino
2022-07-26 04:27:28
<strong>free online casino slots https://trust-online-casino.com/</strong>
best online casino
2022-07-26 07:30:40
<strong>live casino online real money https://onlinecasinosdirectory.org/</strong>
greektown online casino
2022-07-26 09:28:18
<strong>best online nj casino https://9lineslotscasino.com/</strong>
four winds casino online
2022-07-26 11:31:12
<strong>playnet.fun online casino https://free-online-casinos.net/</strong>
river sweep online casino
2022-07-26 14:20:35
<strong>online casino for us players https://internet-casinos-online.net/</strong>
msn zone online casino
2022-07-26 17:30:32
<strong>usa casino online real money https://cybertimeonlinecasino.com/</strong>
caesars online casino customer service phone number
2022-07-27 00:04:09
<strong>tropicana online casino promo code https://vrgamescasino.com/</strong>
online casino that accepts visa
2022-07-27 02:35:03
<strong>gta 5 online casino mystery prize how to claim https://casino-online-roulette.com/</strong>
rivers online casino
2022-07-27 03:40:14
<strong>pa online casino list https://casino-online-jackpot.com/</strong>
new vegas online casino
2022-07-27 08:20:19
<strong>casino online free https://onlineplayerscasino.com/</strong>
wind creek casino online games
2022-07-27 09:19:32
<strong>top online casino reviews https://ownonlinecasino.com/</strong>
borgota online casino
2022-07-27 14:04:09
<strong>fastest payout online casino https://casino8online.com/</strong>
best multi device vpn
2022-08-07 14:18:50
<strong>best vpn for mac https://freevpnconnection.com/</strong>
buy secure vpn
2022-08-07 16:55:49
<strong>cloud vpn free and unlimited https://shiva-vpn.com/</strong>
free vpn extension
2022-08-07 20:13:26
<strong>free vpn reviews https://freehostingvpn.com/</strong>
best vpn for ps4
2022-08-07 22:13:25
<strong>how does a vpn work https://ippowervpn.net/</strong>
best rated vpn
2022-08-07 23:58:11
<strong>hola vpn chrome https://imfreevpn.net/</strong>
best vpn for gaming
2022-08-08 03:11:41
<strong>best vpn for apple https://superfreevpn.net/</strong>
best vpn protocol
2022-08-08 04:48:55
<strong>globus free vpn https://free-vpn-proxy.com/</strong>
vpn free
2022-08-08 07:09:07
<strong>vpn services https://rsvpnorthvalley.com/</strong>
dating british gay men
2022-08-23 14:23:20
<strong>how much is membership for gay dating sites https://gay-singles-dating.com/</strong>
gay ranchers and farmers dating
2022-08-23 16:37:38
<strong>gay boys in tampa fl dating https://gayedating.com/</strong>
free gay dating site
2022-08-23 19:35:17
<strong>ther gay dating game https://datinggayservices.com/</strong>
amature dating co
2022-08-24 13:24:16
<strong>free dating websites singles https://freephotodating.com/</strong>
date sex
2022-08-24 15:41:57
<strong>youwu666 https://onlinedatingbabes.com/</strong>
dating sites in usa
2022-08-24 18:24:34
<strong>dating online site https://adult-singles-online-dating.com/</strong>
free dating apps no fees
2022-08-24 19:47:41
<strong>date chatting sites https://adult-classifieds-online-dating.com/</strong>
good free dating sites
2022-08-25 01:07:04
<strong>vip dating now https://speedatingwebsites.com/</strong>
zoosk dating
2022-08-25 02:20:15
<strong>single free dating sites without registering https://datingpersonalsonline.com/</strong>
dating services for seniors
2022-08-25 04:12:02
<strong>dating single https://wowdatingsites.com/</strong>
dating simulator dating lucy
2022-08-25 08:45:28
<strong>completely free dating sites https://freeadultdatingpasses.com/</strong>
online dating sites for free 100%
2022-08-25 12:12:17
<strong>online sex chat https://virtual-online-dating-service.com/</strong>
matchmaking dating
2022-08-25 13:27:11
<strong>best dating online site https://zonlinedating.com/</strong>
pof dating website
2022-08-25 16:56:15
<strong>dating app https://onlinedatingservicesecrets.com/</strong>
casino games online free play
2022-08-30 09:44:18
<strong>free casino online https://onlinecasinos4me.com/</strong>
online casino live
2022-08-30 13:00:45
<strong>san manuel casino online login https://online2casino.com/</strong>
mohegan sun casino online
2022-08-30 20:20:38
<strong>thunder valley online casino https://casinosonlinex.com/</strong>
older gay video chat
2022-09-03 02:12:03
<strong>gay video chat for windows 8 https://newgaychat.com/</strong>
vietnam gay chat
2022-09-03 09:38:34
<strong>chat random gay chat https://gaychatspots.com/</strong>
free 60 minute trial phone chat gay local
2022-09-03 14:11:07
<strong>top gay chat rooms https://gay-live-chat.net/</strong>
live gay webcam chat rooms
2022-09-03 20:45:45
<strong>all free gay chat rooms https://chatcongays.com/</strong>
gay chat roulette chat
2022-09-03 23:38:33
<strong>chat gay room https://gayphillychat.com/</strong>
pdx gay chat
2022-09-04 05:55:14
<strong>gay video chat room https://gaychatnorules.com/</strong>
gay men chat rooms
2022-09-04 12:11:25
<strong>chat gay en español https://gaymusclechatrooms.com/</strong>
senior gay chat lines
2022-09-04 15:16:17
<strong>gay webcam chat https://free-gay-sex-chat.com/</strong>
live gay web cam chat rooms
2022-09-04 20:30:20
<strong>gay voice chat https://gayinteracialchat.com/</strong>
gay chat room in my area
2022-10-20 16:46:21
<strong>kik chat gay penis https://gaymanchatrooms.com/</strong>
someone to write my paper for me
2022-10-20 19:12:24
<strong>order a paper online https://sociologypapershelp.com/</strong>
do my college paper
2022-10-20 20:32:29
<strong>help with college papers https://uktermpaperwriters.com/</strong>
pay to write papers
2022-10-21 00:00:20
<strong>college paper ghost writer https://writepapersformoney.com/</strong>
pay for a paper
2022-10-21 01:00:05
<strong>website that writes papers for you https://write-my-paper-for-me.org/</strong>
write my philosophy paper
2022-10-21 02:33:38
<strong>buy college paper online https://doyourpapersonline.com/</strong>
write my paper for me fast
2022-10-21 03:25:17
<strong>buy papers online https://top100custompapernapkins.com/</strong>
paper help
2022-10-21 05:32:22
<strong>custom paper writers https://researchpaperswriting.org/</strong>
paper writer services
2022-10-21 08:12:31
<strong>website that will write a paper for you https://writingpaperservice.net/</strong>
write my paper for me
2022-10-21 09:25:48
<strong>buying papers online https://buyessaypaperz.com/</strong>
order paper online
2022-10-21 11:09:58
<strong>do my college paper https://mypaperwritinghelp.com/</strong>
someone write my paper
2022-10-21 12:29:12
<strong>do my college paper for me https://writemypaperquick.com/</strong>
write my college paper for me
2022-10-21 13:18:27
<strong>buy resume paper https://essaybuypaper.com/</strong>
custom note paper
2022-10-21 16:24:41
<strong>cheap paper writing service https://premiumpapershelp.com/</strong>
custom papers
2022-10-21 17:04:00
<strong>best custom papers https://ypaywallpapers.com/</strong>
write my paper co
2022-10-21 18:27:25
<strong>best custom paper writing service https://studentpaperhelp.com/</strong>
1password
2023-01-27 08:21:24
<strong>2created</strong>
coursework papers
2023-02-05 14:55:29
<strong>coursework writing help https://brainycoursework.com/</strong>
differential equations coursework
2023-02-05 16:14:56
<strong>https://courseworkninja.com/</strong>
do my coursework
2023-02-05 18:11:15
<strong>coursework paper https://writingacoursework.com/</strong>
data analysis coursework
2023-02-05 18:33:03
<strong>coursework questions https://mycourseworkhelp.net/</strong>
coursework in english
2023-02-05 21:49:09
<strong>https://courseworkinfotest.com/</strong>
2023-02-05 22:35:14
<strong>do my coursework for me https://coursework-expert.com/</strong>
coursework research
2023-02-05 23:44:59
<strong>do my coursework https://teachingcoursework.com/</strong>
video dating
2023-02-08 12:54:29
<strong>single free dating sites for sex https://freewebdating.net/</strong>
single women local
2023-02-08 13:47:05
<strong>datingnow life https://jewish-dating-online.net/</strong>
meet woman
2023-02-08 14:48:52
<strong>dating sites for seniors https://jewish-dating-online.net/</strong>
best internet dating websites
2023-02-08 15:58:38
<strong>dating services online https://free-dating-sites-free-personals.com/</strong>
plentyoffish dating sites
2023-02-08 18:36:38
<strong>datiing websites https://onlinedatingsurvey.com/</strong>
meeting with my lady
2023-02-08 19:57:03
<strong>dating website best https://onlinedatingsuccessguide.com/</strong>
best sites dating
2023-02-08 22:51:33
<strong>pof login canada https://datingwebsiteshopper.com/</strong>
free online
2023-02-08 23:51:25
<strong>100% free dating sites no fees https://allaboutdatingsites.com/</strong>
best dating online sites
2023-02-09 01:15:44
<strong>dating free site https://freedatinglive.com/</strong>
a dating site
2023-02-09 02:40:10
<strong>free dating date https://freewebdating.net/</strong>
Яндекс.Метрика