> For the complete documentation index, see [llms.txt](https://docs.urduheim.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.urduheim.de/ubuntu-tutorials/how-to-monitor-multiple-servers-with-grafana-on-a-single-dashboard.md).

# How to monitor Multiple Servers with Grafana on a Single Dashboard

To monitor many servers from a Single Grafana Dashboard, we need to install the Telegraf Agent on each Server

{% hint style="info" %}
We have already created the Database, User & Password on InfluxDB, if you did not watch that Video Check that out first. <https://youtu.be/UQWOWtioopw>
{% endhint %}

```
### Installing required packages
apt install curl gnupg gnupg1 gnupg2 net-tools software-properties-common

sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -

source /etc/lsb-release
echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

sudo apt update
```

## Install Telegraf Agent on each Server

```
### Install Telegraf Agent
sudo apt install telegraf -y

sudo systemctl start telegraf
sudo systemctl enable telegraf

##Check Status
sudo systemctl status telegraf
```

```
##Enable Network Inputs in Telegraf.conf by uncommenting, by default disabled

cd /etc/telegraf/telegraf.conf

[[inputs.net]]
interfaces = ["eth0"]

[[inputs.netstat]]

```

```
##Create Custom Telegraf File to send Metrics towards influxDB
cd /etc/telegraf/telegraf.d/

touch my_config_telegraf.conf
nano my_config_telegraf.conf
```

> Config File: my\_config\_telegraf.conf

```
# Global Agent Configuration
[agent]
  hostname = "Grafana"
  flush_interval = "10s"
  interval = "10s"


# Input Plugins
[[inputs.cpu]]
    percpu = true
    totalcpu = true
    collect_cpu_time = false
    report_active = false
[[inputs.disk]]
    ignore_fs = ["tmpfs", "devtmpfs", "devfs"]
[[inputs.io]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.system]]
[[inputs.swap]]
[[inputs.netstat]]
[[inputs.processes]]
[[inputs.kernel]]

# Output Plugin InfluxDB
[[outputs.influxdb]]
  database = "telegraf"
  urls = [ "http://influxdb-ip:8086" ]
  username = "telegraf"
  password = "myP@ssw0rd"
  
#Telegraf provides telegraf command to manage the configuration, 
#including generate the configuration itself, run the command as below.
```

> Generate configurations

```
telegraf config -input-filter cpu:mem:disk:swap:system:net:netstat -output-filter influxdb > my_config_telegraf.conf
```
