diff --git a/.github/workflows/chain-uptime-monitor.yml b/.github/workflows/chain-uptime-monitor.yml new file mode 100644 index 000000000..292147607 --- /dev/null +++ b/.github/workflows/chain-uptime-monitor.yml @@ -0,0 +1,15 @@ +name: Chain Uptime Monitor + +on: + workflow_dispatch: + schedule: + - cron: '0 */4 * * *' # Run every 4 hours + +jobs: + run-monitoring: + name: Chain Uptime Monitor (Orbit) + uses: ./.github/workflows/monitoring.yml + with: + chain: orbit + monitor: chain-uptime + secrets: inherit diff --git a/.github/workflows/monitor-config.json b/.github/workflows/monitor-config.json index 6f3588214..cf161835b 100644 --- a/.github/workflows/monitor-config.json +++ b/.github/workflows/monitor-config.json @@ -19,12 +19,14 @@ "slackTokens": { "assertion": "ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_TOKEN", "batch-poster": "ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN", - "retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_TOKEN" + "retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_TOKEN", + "chain-uptime": "ORBIT_CHAIN_UPTIME_MONITORING_SLACK_TOKEN" }, "slackChannels": { "assertion": "ORBIT_CHAIN_ASSERTION_MONITORING_SLACK_CHANNEL", "batch-poster": "ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL", - "retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_CHANNEL" + "retryable": "ORBIT_RETRYABLE_MONITORING_SLACK_CHANNEL", + "chain-uptime": "ORBIT_CHAIN_UPTIME_MONITORING_SLACK_CHANNEL" } } } diff --git a/.github/workflows/monitoring.yml b/.github/workflows/monitoring.yml index 23a19b3cd..587549617 100644 --- a/.github/workflows/monitoring.yml +++ b/.github/workflows/monitoring.yml @@ -62,7 +62,13 @@ jobs: run: cp ./packages/arb-token-bridge-ui/public/${{ steps.config.outputs.config_file }} ./arbitrum-monitoring/config.json - name: Run monitoring command - run: cd ./arbitrum-monitoring && yarn ${{ inputs.monitor }}-monitor --enableAlerting --writeToNotion ${{ inputs.chain == 'core' && 'true' || 'false' }} ${{ inputs.monitor == 'retryable' && '--autoRedeem' || '' }} + run: | + cd ./arbitrum-monitoring + if [ "${{ inputs.monitor }}" == "retryable" ]; then + yarn ${{ inputs.monitor }}-monitor --enableAlerting --writeToNotion ${{ inputs.chain == 'core' && 'true' || 'false' }} --autoRedeem + else + yarn ${{ inputs.monitor }}-monitor --enableAlerting + fi env: RETRYABLE_MONITORING_SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} RETRYABLE_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} @@ -71,6 +77,8 @@ jobs: BATCH_POSTER_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} ASSERTION_MONITORING_SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} ASSERTION_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} + CHAIN_UPTIME_MONITORING_SLACK_TOKEN: ${{ secrets[steps.config.outputs.slack_token] }} + CHAIN_UPTIME_MONITORING_SLACK_CHANNEL: ${{ secrets[steps.config.outputs.slack_channel] }} RETRYABLE_MONITORING_NOTION_TOKEN: ${{ secrets.RETRYABLE_MONITORING_NOTION_TOKEN }} RETRYABLE_MONITORING_NOTION_DB_ID: ${{ secrets.RETRYABLE_MONITORING_NOTION_DB_ID }} NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}