AWS Instance Monitor #1336
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AWS Instance Monitor | |
| on: | |
| schedule: | |
| - cron: '0 */2 * * *' # Runs every 2 hours | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| monitor: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install boto3 tabulate | |
| - name: Run AWS Instance Monitor (Daily Report) | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| SMTP_SERVER: "smtp.gmail.com" | |
| SMTP_PORT: "587" | |
| SMTP_USER: ${{ secrets.SMTP_USER }} | |
| SMTP_PASS: ${{ secrets.SMTP_PASS }} | |
| EMAIL_FROM: "it.admin@scylladb.com" | |
| EMAIL_TO: "releng-team@scylladb.com" | |
| REPORT_TYPE: "daily" | |
| run: python aws_instance_monitor/aws_instance_monitor.py |