Frame 19229

Panduan Praktis CloudWatch Anomaly Detection untuk Monitoring Aplikasi yang Lebih Adaptif

Posted by taufik

November 20, 2025

foto artikel (2)

Di balik setiap aplikasi modern, terdapat aliran metrik seperti CPU, memory, dan latency yang mencerminkan kondisi kesehatan sistem secara real-time. Untuk menjaga layanan tetap stabil, banyak tim operasional dan engineering mengandalkan Amazon CloudWatch sebagai platform monitoring andalan mereka. 

Masalahnya, banyak tim masih menyetel CloudWatch Alarm dengan threshold statis. Pendekatan ini memang sederhana, tetapi sudah tidak lagi memadai untuk mengikuti dinamika performa aplikasi yang terus berubah. 

 

Mengapa Threshold Statis Tidak Lagi Cukup?

Variasi beban yang kecil dapat memengaruhi performa aplikasi, tetapi threshold statis sering gagal mengenali perubahan bertahap. Akibatnya, gejala awal tidak terdeteksi hingga masalah membesar. Hal ini biasanya disebabkan oleh dua faktor berikut:  

Pola Trafik yang Dinamis

Aplikasi sering memiliki ritme penggunaan harian. Trafik naik saat jam makan siang, turun di malam hari, atau melonjak saat ada event. Dengan pola yang berubah-ubah (seasonal behavior) seperti ini, satu threshold statis sulit menggambarkan kondisi “normal”, sehingga alarm bisa memicu peringatan yang tidak diperlukan (false alarm) atau tidak aktif ketika performa mulai menurun.  

Tantangan Menentukan Threshold

Threshold yang terlalu sensitif mudah memicu false alarm, sedangkan threshold yang terlalu longgar dapat membuat gejala awal penurunan performa terabaikan sehingga masalah baru terlihat ketika sudah terlambat. 

 

Apa Solusinya?

AWS menyediakan fitur CloudWatch Anomaly Detection, yang menawarkan pendekatan monitoring jauh lebih adaptif. Fitur ini membangun model machine learning secara otomatis dengan mempelajari pola historis metrik—baik perubahan per jam, harian, maupun mingguan. Dari pola tersebut, sistem kemudian membuat confidence band yang menunjukkan batas atas dan bawah dari nilai normal. 

Jika suatu metrik keluar dari band tersebut, alarm akan aktif secara otomatis. Dengan mekanisme ini, tanda-tanda penurunan performa bisa terdeteksi lebih cepat, bahkan sebelum terlihat jelas di dashboard atau dirasakan oleh pengguna. 

 

Keunggulan CloudWatch Anomaly Detection

Deteksi Otomatis

Menghilangkan kebutuhan membuat dan menyesuaikan threshold manual satu per satu.  

Adaptif terhadap Pola Penggunaan

Menyesuaikan rentang normal berdasarkan pola harian, mingguan, atau periode sibuk tertentu.  

Lebih Peka terhadap Perubahan Kecil

Mendeteksi deviasi halus yang dapat memengaruhi pengalaman pengguna jauh lebih awal.  

 

Alur Kerja CloudWatch Anomaly Detection

Picture1

  

1. Layanan AWS Mengirimkan Metrik ke CloudWatch

Layanan seperti Application Load Balancer, EC2, dan RDS secara otomatis mengirimkan metrik performa—seperti latency, CPU, atau error rate—ke Amazon CloudWatch.  

2. CloudWatch Anomaly Detection Menganalisis Pola Normal

CloudWatch Anomaly Detection Alarm menggunakan model machine learning untuk membaca pola historis dan membentuk rentang nilai normal (confidence band) berdasarkan perilaku metrik harian, mingguan, atau periode sibuk tertentu.  

3. Alarm Menyala Saat Nilai Metrik Tidak Sesuai Pola Normal

Ketika metrik bergerak di luar rentang yang dianggap normal, CloudWatch Anomaly Detection Alarm langsung aktif dan meneruskan kejadian tersebut ke Amazon SNS (Simple Notification Service).  

4. Notifikasi Dikirimkan Melalui Amazon SNS

Amazon SNS kemudian mengirimkan notifikasi ke berbagai kanal seperti email, Slack (via AWS Chatbot), PagerDuty, SMS, atau bahkan menjalankan aksi otomatis melalui AWS Lambda.  

5. Pengguna Menerima Notifikasi

Pengguna menerima notifikasi dan dapat segera melakukan investigasi atau tindakan korektif sesuai prosedur operasional.  

 

Cara Mengaktifkan Anomaly Detection di CloudWatch

Step 1: Pilih Metrik yang Akan Dimonitor

  1. Login ke AWS ConsoleCloudWatch Metrics  
  2. Pilih Metric Graphed Metrics 

Picture2

Contoh: Application ELB Metrics Target Response Time (latency).  

Notes: Sediakan setidaknya dua minggu data historis agar model dapat mempelajari pola dengan stabil. Semakin banyak data yang tersedia, semakin akurat hasil deteksinya. 

 

Step 2: Aktifkan Anomaly Detection di Grafik Metrik

1. Di halaman Graphed metrics → Klik Pulse icon   

Picture3

 

Di grafik, akan muncul area berwarna abu-abu (grey band) yang menunjukkan rentang nilai normal. Setiap nilai yang berada di luar pola tersebut akan ditandai sebagai anomali dan ditampilkan dalam warna merah. 

Notes: Sensitivitas anomaly detection dapat disesuaikan dengan mempersempit atau memperlebar grey band. Pengaturan ini dilakukan melalui Metric Math menggunakan fungsi ANOMALY_DETECTION_BAND (metric, stddev), yang memiliki dua parameter: 

Parameter Pertama: Metrik yang Dianalisis

Menentukan metrik mana yang akan diproses oleh anomaly detection (misalnya m1 pada contoh). 

Parameter Kedua: Standard Deviation

Mengatur jumlah standard deviation yang digunakan untuk menentukan lebar band (misalnya 2 pada contoh). 

  • Nilai lebih tinggi → Band lebih lebar (lebih toleran terhadap variasi)  
  • Nilai lebih rendah → Band lebih sempit (lebih sensitif terhadap anomali)  

2. Setelah disesuaikan, klik Apply untuk simpan pengaturan. 

 

Step 3: Buat Alarm Berdasarkan Anomaly Detection

1. Klik Bell Icon  

Screenshot 2025 11 19 at 10.41.52

2. Pada Bagian Conditions: 

Picture6

Picture7

Pilih statistik yang ingin digunakan (misalnya Average atau p90), lalu tentukan kondisi alarm: 

  • Outside of the band: Nilai berada di atas atau di bawah band. 
  • Greater than the band: Nilai berada di atas band. 
  • Lower than the band: Nilai berada di bawah band. 

Klik Next untuk melanjutkan. 

3. Pada Bagian Notification: 

Picture8

 

  • Pilih Create New Topic jika belum tersedia.  
  • Beri nama topik, misalnya Anomaly Detection Topic.  
  • Masukkan email penerima untuk notifikasi.  
  • Klik Create Topic, lalu Next untuk melanjutkan. 

4. Pada Bagian Alarm Details: 

Picture9

  

  • Beri nama alarm, misalnya ALB-TargetResponseTime-Anomaly-Alarm.  
  • Klik Next untuk melanjutkan. 

5. Review Kembali Konfigurasinya  

Picture10

  • Klik Create Alarm jika seluruh konfigurasi sudah sesuai.  
  • Cek inbox e-mail penerima untuk konfirmasi subscription dari SNS.  
  • Setelah penerima mengklik Confirm Subscription, alarm langsung aktif dan siap mengirim notifikasi. 

 

Jika Anomaly Detection Tidak Berfungsi dengan Optimal

Dalam praktiknya, ada kalanya hasil anomaly detection tidak seakurat yang diharapkan. Beberapa kondisi yang kerap muncul antara lain: 

  • Lonjakan sesaat (spike) terbaca sebagai pola normal.  
  • Alarm terasa terlalu sensitif dan terlalu sering aktif.  
  • Anomaly band tidak muncul sehingga alarm tidak dapat bekerja dengan benar.  

Jika hasilnya belum optimal atau Anda membutuhkan fine-tuning, silakan cek panduan resmi AWS berikut untuk membantu troubleshooting: 

Baca: “How do I manage and troubleshoot CloudWatch anomaly detection bands?”  

 

Estimasi Biaya Penggunaan

CloudWatch Anomaly Detection menghitung lebih dari satu metrik ketika alarm dibuat. Setiap alarm akan memproses tiga metrik sekaligus:  

  • Metric asli (actual metric 
  • Batas atas (upper bound 
  • Batas bawah (lower bound) 

Karena itu, biaya dihitung berdasarkan total metrik yang diproses. Berikut contoh perhitungannya:  

  • 1 anomaly detection alarm → 3 metrik × $0.10 = $0.30 per bulan  
  • 5 anomaly detection alarms → $1.50 per bulan 

Notes:  

  • Contoh biaya di atas menggunakan tarif standard resolution metrics di region US East (North Virginia). Harga dapat berbeda di region lain.  
  • Mengaktifkan model anomaly detection tanpa membuat alarm tidak menimbulkan biaya alarm tambahan. 

 

Kesimpulan

CloudWatch Anomaly Detection memberikan pendekatan pemantauan yang jauh lebih adaptif. Dengan membaca pola historis dan menangkap deviasi kecil lebih awal, fitur ini membantu tim mendeteksi potensi masalah sebelum memengaruhi pengguna—tanpa bergantung pada threshold statis yang sering kali kurang akurat.  

Untuk mulai memanfaatkannya, Anda hanya perlu: 

  1. Memilih metrik yang relevan. 
  2. Mengaktifkan anomaly detection. 
  3. Membuat alarm berbasis anomaly band. 
  4. Menghubungkan alarm ke kanal notifikasi tim. 
  5. Melakukan peninjauan dan penyesuaian berkala. 

Pendekatan ini meningkatkan observabilitas, menjaga stabilitas aplikasi di berbagai kondisi, dan memastikan pengalaman pengguna tetap optimal. 

Jika Anda ingin menerapkan CloudWatch Anomaly Detection secara lebih efektif, tim ahli Central Data Technology (CDT) siap membantu Anda melalui link berikut. 

 

Penulis: Gerda Iswari

Editor: Danurdhara Suluh Prasasta  

CTI Group Content Writer 

whatsapp icon.png
Start a Conversation

Privacy & Policy

PT Central Data Technology (“CDT” or “us”) is strongly committed to ensuring that your privacy is protected as utmost importance to us. https://centraldatatech.com/ , we shall govern your use of this website, including all pages within this website (collectively referred to herein below as this “Website”), we want to contribute to providing a safe and secure environment for visitors.

The following are terms of privacy policy (“Privacy Policy”) between you (“you” or “your”) and CDT. By accessing the website, you acknowledge that you have read, understood and agree to be bound by this Privacy Policy

Use of The Subscription Service by CDT and Our Customers

When you request information from CDT and supply information that personally identifies you or allows us to contact you, you agree to disclose that information with us. CDT may disclose such information for marketing, promotional and activity only for the purpose of CDT and the Website.

Collecting Information

You are free to explore the Website without providing any personal information about yourself. When you visit the Website or register for the subscription service, we provide some navigational information for you to fill out your personal information to access some content we offered.

CDT may collect your personal data such as your name, email address, company name, phone number and other information about yourself or your business. We are collecting your data in some ways, online and offline. CDT collects your data online using features of social media, email marketing, website, and cookies technology. We may collect your data offline in events like conference, gathering, workshop, etc. However, we will not use or disclose those informations with third party or send unsolicited email to any of the addresses we collect, without your express permission. We ensure that your personal identities will only be used in accordance with this Privacy Policy.

How CDT Use the Collected Information

CDT use the information that is collected only in compliance with this privacy policy. Customers who subscribe to our subscription services are obligated through our agreements with them to comply with this Privacy Policy.

In addition to the uses of your information, we may use your personal information to:

  • Improve your browsing experience by personalizing the websites and to improve the subscription services.
  • Send information about CDT.
  • Promote our services to you and share promotional and informational content with you in accordance with your communication preferences.
  • Send information to you regarding changes to our customers’ terms of service, Privacy Policy (including the cookie policy), or other legal agreements

Cookies Technology

Cookies are small pieces of data that the site transfers to the user’s computer hard drive when the user visits the website. Cookies can record your preferences when visiting a particular site and give the advantage of identifying the interest of our visitor for statistical analysis of our site. This information can enable us to improve the content, modifying and making our site more user friendly.

Cookies were used for some reasons such as technical reasons for our website to operate. Cookies also enable us to track and target the interest of our users to enhance the experience of our website and subscription service. This data is used to deliver customized content and promotions within the Helios to customers who have an interest on particular subjects.

You have the right to decide whether to accept or refuse cookies. You can edit your cookies preferences on browser setup. If you choose to refuse the cookies, you may still use our website though your access to some functionality and areas of our website may be restricted.

This Website may also display advertisements from third parties containing links to other websites of interest. Once you have used these links to leave our site, please note that we do not have any control over the website. CDT cannot be responsible for the protection and privacy of any information that you provide while visiting such websites and this Privacy Policy does not govern such websites.

Control Your Personal Data

CDT give control to you to manage your personal data. You can request access, correction, updates or deletion of your personal information. You may unsubscribe from our marketing activity by clicking unsubscribe us from the bottom of our email or contacting us directly to remove you from our subscription list.

We will keep your personal information accurate, and we allow you to correct or change your personal identifiable information through marketing@centraldatatech.com