> 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

```json
{
  "chain": {
    "monitor_config": {
      "enable_pamir_cetina": true,
      "pamir_cetina_job_name": "your_job_name",
      "pamir_cetina_push_address": "your_pushgateway_address",
      "pamir_cetina_push_interval": 5,
      "pamir_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                      |
| ---------------------------- | -------------------------------------- | ---------------------------- |
| `enable_pamir_cetina`        | Enable/disable metrics pushing         | `true`                       |
| `pamir_cetina_job_name`      | Job name for Prometheus metrics        | `"atlantic_testnet"`         |
| `pamir_cetina_push_address`  | Pushgateway address (without protocol) | `"your_pushgateway_address"` |
| `pamir_cetina_push_interval` | Push interval in seconds               | `5`                          |
| `pamir_cetina_push_port`     | Pushgateway port                       | `9091`                       |

## 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
