> For the complete documentation index, see [llms.txt](https://docs.pharos.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pharos.xyz/node-and-validator-guide/node-monitoring-setup.md).

# Node Monitoring Setup

This guide describes how to configure monitoring for your Pharos node using Prometheus Pushgateway.

## Overview

Pharos nodes can push metrics to a Prometheus Pushgateway, which allows you to monitor node performance, block production, and other key metrics.

## Configuration

To enable monitoring, add the `monitor_config` section to your `pharos.conf` file.

### Example Configuration

> **Note:** These configuration keys require **v0.16.0 or later**. In earlier versions they were named `enable_pamir_cetina` and `pamir_cetina_*`. Using the wrong key names for your node version will silently disable metrics pushing without any error, so make sure the names match your node version.

```json
{
  "chain": {
    "monitor_config": {
      "storage_enable_cetina": true,
      "storage_cetina_job_name": "your_job_name",
      "storage_cetina_push_address": "your_pushgateway_address",
      "storage_cetina_push_interval": 5,
      "storage_cetina_push_port": 9091
    },
    "secret_config": {
      "domain_key_path": "../keys/domain.key",
      "stabilizing_key_path": "../keys/stabilizing.key"
    },
    "startup_config": {
      "init_config": {
        "meta_path": "../data",
        "host_ip": "127.0.0.1",
        "http_port": "18100",
        "rpc_port": "20000",
        "tcp_port": "19000",
        "ws_port": "18200"
      }
    }
  },
  "storage": {
    "mygrid_conf": {},
    "mygrid_env": {
      "storage_data_path": "../data"
    }
  }
}
```

### Configuration Parameters

| Parameter                      | Description                            | Example                      |
| ------------------------------ | -------------------------------------- | ---------------------------- |
| `storage_enable_cetina`        | Enable/disable metrics pushing         | `true`                       |
| `storage_cetina_job_name`      | Job name for Prometheus metrics        | `"atlantic_testnet"`         |
| `storage_cetina_push_address`  | Pushgateway address (without protocol) | `"your_pushgateway_address"` |
| `storage_cetina_push_interval` | Push interval in seconds               | `5`                          |
| `storage_cetina_push_port`     | Pushgateway port                       | `9091`                       |

> **Version note:** In v0.15.0 and earlier, these keys were named `enable_pamir_cetina`, `pamir_cetina_job_name`, `pamir_cetina_push_address`, `pamir_cetina_push_interval`, and `pamir_cetina_push_port` respectively.

## Setup Steps

1. Ensure you have a Prometheus Pushgateway running and accessible from your node
2. Edit your `pharos.conf` file and add the `monitor_config` section under `chain`:

```bash
vim pharos.conf
```

3. Replace the placeholder values:
   * `your_job_name`: A unique identifier for your node (e.g., `my_validator_node`)
   * `your_pushgateway_address`: Your Pushgateway hostname or IP
4. Restart your node to apply the changes:

**For Docker:**

```bash
docker compose restart
```

**For Binary:**

```bash
./ops stop --force
./ops start --config ./pharos.conf
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pharos.xyz/node-and-validator-guide/node-monitoring-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
