# Grafana Dashboard

Install Grafana on our instance which queries our Prometheus server.

```
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_8.1.4_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_8.1.4_amd64.deb
```

Enable the automatic start of Grafana by `systemd`:

```
sudo systemctl daemon-reload && sudo systemctl enable grafana-server && sudo systemctl start grafana-server
```

Grafana is running now, and we can connect to it at `http://your.server.ip:3000`. The default user and password is `admin` / `admin`.

Now you have to create a Prometheus data source:

* Click the Grafana logo to open the sidebar.
* Click “Data Sources” in the sidebar.
* Choose “Add New”.
* Select “Prometheus” as the data source
* Set the Prometheus server URL (in our case: <http://localhost:9090/>)
* Click “Add” to test the connection and to save the new data source

### Installing Cosmos SDK Grafana Dashboard <a href="#installing-cosmos-sdk-grafana-dashboard" id="installing-cosmos-sdk-grafana-dashboard"></a>

Finally, we're going to install a basic dashboard for Cosmos SDKs. For further reference in these steps, see: <https://github.com/zhangyelong/cosmos-dashboard>

### Enable Tendermint Metrics

```
sed -i 's/prometheus = false/prometheus = true/g' <YOUR-NODE-HOMEDIR>/config/config.toml
```

After restarting your node, you should be able to access the tendermint metrics(default port is 26660): [http://localhost:26660](http://localhost:26660/)

### Configure Prometheus Targets

Append a `job` under the `scrape_configs` of your prometheus.yml

```
  - job_name: secret-network
	static_configs:
	- targets: ['<Validator-IP>:26660']
	  labels:
		instance: validator
	- targets: ['<Sentry-0-IP>:26660']
	  labels:
		instance: sentry-0
	- targets: ['<Sentry-1-IP>:26660']
	  labels:
		instance: sentry-1
```

### Reload Prometheus Config

```
curl -X POST http://<PROMETHEUS-IP>:9090/-/reload
```

### Import Grafana Dashboard

Copy and paste the [Grafana Dashboard ID](https://grafana.com/grafana/dashboards/11036) `11036` OR content of [cosmos-dashboard.json](https://github.com/zhangyelong/cosmos-dashboard/blob/master/cosmos-dashboard.json), click on `Load` to complete importing.

1. Set chain-id to `secret-3`
2. You're done!\\


---

# Agent Instructions: 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:

```
GET https://docs.scrt.network/secret-network-documentation/infrastructure/running-a-node-validator/maintaining-a-node-validator/node-monitoring/grafana/grafana-dashboard.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
