Sign inSign up

ogulcanaydogan/cost-tracker

By ogulcanaydogan

Updated 7 months ago

AWS cost anomaly detection with Slack notifications

Image
0

1.1K

ogulcanaydogan/cost-tracker repository overview

Cost Tracker

AWS cost monitoring and anomaly detection with Slack notifications.

Quick Start

docker run \
  -e AWS_ACCESS_KEY_ID=xxx \
  -e AWS_SECRET_ACCESS_KEY=xxx \
  -e LOOKBACK_DAYS=30 \
  -e ANOMALY_THRESHOLD=20 \
  ogulcanaydogan/cost-tracker

Features

  • Daily cost breakdown by service, account, or region
  • Anomaly detection (configurable threshold above daily average)
  • Slack notifications with rich formatting
  • CSV export for reporting
  • Top services ranking with percentages

Environment Variables

VariableDescriptionDefault
AWS_REGIONAWS regionus-east-1
AWS_ACCESS_KEY_IDAWS access key-
AWS_SECRET_ACCESS_KEYAWS secret key-
LOOKBACK_DAYSDays to analyze30
ANOMALY_THRESHOLD% above average to flag as anomaly20
SLACK_WEBHOOKSlack webhook URL-
OUTPUT_FILECSV export path-
GROUP_BYGroup by: SERVICE, ACCOUNT, REGIONSERVICE
SCHEDULERun continuously (daily)-

Docker Compose Example

services:
  cost-tracker:
    image: ogulcanaydogan/cost-tracker
    environment:
      - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
      - ANOMALY_THRESHOLD=25
      - SLACK_WEBHOOK=${SLACK_WEBHOOK}
      - OUTPUT_FILE=/output/costs.csv
      - SCHEDULE=daily
    volumes:
      - ./reports:/output

License

MIT

Tag summary

Content type

Image

Digest

sha256:ac9438eb2

Size

60.6 MB

Last updated

7 months ago

docker pull ogulcanaydogan/cost-tracker