github.com/ethereum-optimism/optimism@v1.7.2/packages/chain-mon/src/replica-mon/README.md (about)

     1  # @eth-optimism/replica-healthcheck
     2  
     3  [![codecov](https://codecov.io/gh/ethereum-optimism/optimism/branch/develop/graph/badge.svg?token=0VTG7PG7YR&flag=replica-healthcheck-tests)](https://codecov.io/gh/ethereum-optimism/optimism)
     4  
     5  ## What is this?
     6  
     7  `replica-healthcheck` is an express server to be run alongside a replica instance, to ensure that the replica is healthy. Currently, it exposes metrics on syncing stats and exits when the replica has a mismatched state root against the sequencer.
     8  
     9  
    10  ## Installation
    11  
    12  Clone, install, and build the Optimism monorepo:
    13  
    14  ```
    15  git clone https://github.com/ethereum-optimism/optimism.git
    16  pnpm install
    17  pnpm build
    18  ```
    19  
    20  ## Running the service (manual)
    21  
    22  Copy `.env.example` into a new file named `.env`, then set the environment variables listed there.
    23  You can view a list of all environment variables and descriptions for each via:
    24  
    25  ```
    26  pnpm start:replica-mon --help
    27  ```
    28  
    29  Once your environment variables have been set, run the healthcheck service via:
    30  
    31  ```
    32  pnpm start:replica-mon
    33  ```