Skip to content

OffchainLabs/arbitrum-monitoring

Repository files navigation

Arbitrum Monitoring

Overview

This monitoring suite helps you track the health and performance of your Arbitrum chains through three specialized monitors:

  1. Retryable Monitor - Tracks ParentChain->ChildChain message execution and retryable ticket lifecycle
  2. Batch Poster Monitor - Monitors batch posting and data availability
  3. Assertion Monitor - Monitor assertion creation and validation on Arbitrum chains

Each monitor has its own detailed documentation with technical specifics and implementation details.

Prerequisites

  • Node.js v18 or greater
  • Yarn package manager
  • Access to Arbitrum chain RPC endpoints
  • Access to parent chain RPC endpoints
  • Slack workspace for alerts (optional)

Installation

  1. Clone and install dependencies:
git clone https://github.com/OffchainLabs/arbitrum-monitoring.git
cd arbitrum-monitoring
yarn install

Configuration

Chain Configuration

  1. Copy and edit the config file:
cp config.example.json config.json
  1. Configure your chains in config.json:
{
  "childChains": [
    {
      "name": "Your Chain Name",
      "chainId": 421614,
      "parentChainId": 11155111,
      "confirmPeriodBlocks": 45818,
      "parentRpcUrl": "https://your-parent-chain-rpc",
      "orbitRpcUrl": "https://your-chain-rpc",
      "ethBridge": {
        "bridge": "0x...",
        "inbox": "0x...",
        "outbox": "0x...",
        "rollup": "0x...",
        "sequencerInbox": "0x..."
      }
    }
  ]
}

Alert Configuration

  1. Copy and configure the environment file:
cp .env.sample .env
  1. Set up Slack alerts in .env (optional):
NODE_ENV=CI
RETRYABLE_MONITORING_SLACK_TOKEN=your-slack-token
RETRYABLE_MONITORING_SLACK_CHANNEL=your-slack-channel
BATCH_POSTER_MONITORING_SLACK_TOKEN=your-slack-token
BATCH_POSTER_MONITORING_SLACK_CHANNEL=your-slack-channel
ASSERTION_MONITORING_SLACK_TOKEN=your-slack-token
ASSERTION_MONITORING_SLACK_CHANNEL=your-slack-channel

Required environment variables:

  • RETRYABLE_MONITORING_NOTION_TOKEN: Notion API token for database integration
  • RETRYABLE_MONITORING_NOTION_DB_ID: Notion database ID for storing retryable tickets

Usage

All monitors support these base options:

  • --configPath: Path to configuration file (default: "config.json")
  • --enableAlerting: Enable Slack alerts (default: false)

Quick Start Commands

# Monitor retryable tickets
yarn retryable-monitor [options]

# Monitor batch posting
yarn batch-poster-monitor [options]

# Monitor chain assertions
yarn assertion-monitor [options]

See individual monitor READMEs for specific options and features:

Notion Integration

When --writeToNotion is enabled, the monitor will:

  • Create new pages in the Notion database for each retryable ticket
  • Update existing pages when ticket status changes
  • Run a daily sweep to mark expired tickets
  • Track ticket status, creation time, expiration time, and transaction hashes

The Notion database should have the following properties:

  • Ticket ID (title)
  • Status (select)
  • Created At (date)
  • Expires At (date)
  • Transaction Hash (url)
  • Last Updated (date)

About

A collection of scripts designed for monitoring various aspects of Arbitrum chains.

Resources

License

Stars

Watchers

Forks

Contributors 7