Configuration

Telegraf Installation

Install and configure Telegraf agents on your servers to securely push system metrics to Tinyfal's monitoring platform.

Cross-Platform Support

Install Telegraf on Linux, Windows, and macOS servers. Support for all major distributions and architectures.

HTTP Output Plugin

Configure Telegraf to push metrics via HTTP using your unique server token. No incoming connections required.

System Metrics Collection

Monitor CPU, memory, disk, network, and system processes with minimal overhead and maximum reliability.

Secure Configuration

Encrypted data transmission with token-based authentication. Keep your infrastructure secure and private.

Telegraf Installation Guide

Telegraf is a lightweight, proven agent for collecting and reporting metrics. With Tinyfal, you’ll configure Telegraf to push system metrics securely to our cloud backend using HTTP output plugins.

Installation

Linux Installation

Ubuntu/Debian:

1
2
3
4
5
6
7
# Add InfluxData repository
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list

# Install Telegraf
sudo apt update
sudo apt install telegraf

CentOS/RHEL/Fedora:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Add InfluxData repository
cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL
baseurl = https://repos.influxdata.com/rhel/8/x86_64/stable/
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF

# Install Telegraf
sudo yum install telegraf

Windows Installation

  1. Download: Visit the Telegraf releases page
  2. Extract: Unzip the Windows binary to C:\Program Files\Telegraf\
  3. Service Setup: Run as Windows service or scheduled task

macOS Installation

1
2
3
4
5
# Using Homebrew
brew install telegraf

# Or download binary directly
wget https://dl.influxdata.com/telegraf/releases/telegraf-1.28.0_darwin_amd64.tar.gz

Configuration

Basic Telegraf Configuration

Main Configuration File

Create or edit /etc/telegraf/telegraf.conf:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Global Agent Configuration
[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  hostname = ""
  omit_hostname = false

# HTTP Output Plugin for Tinyfal
[[outputs.http]]
  url = "https://api.tinyfal.com/metrics"
  timeout = "5s"
  method = "POST"
  username = ""
  password = ""
  data_format = "json"
  content_encoding = "gzip"
  
  # Your unique server token from Tinyfal app
  [outputs.http.headers]
    Authorization = "Bearer YOUR_TOKEN_HERE"
    Content-Type = "application/json"

# System Metrics Input Plugins
[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = false

[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]

[[inputs.diskio]]

[[inputs.mem]]

[[inputs.net]]

[[inputs.processes]]

[[inputs.swap]]

[[inputs.system]]
Token Configuration

Replace YOUR_TOKEN_HERE with the token generated in your Tinyfal mobile app:

  1. Copy Token: From your Tinyfal app, copy the server token
  2. Edit Config: Replace the placeholder in the Authorization header
  3. Secure Storage: Ensure config file has proper permissions (600)

Advanced Configuration

Custom Metric Collection
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Additional system metrics
[[inputs.kernel]]

[[inputs.linux_sysctl_fs]]

[[inputs.netstat]]

# Docker monitoring (if applicable)
[[inputs.docker]]
  endpoint = "unix:///var/run/docker.sock"
  gather_services = false
  container_names = []
  source_tag = false
  container_name_include = []
  container_name_exclude = []
  timeout = "5s"
  api_version = "1.24"
Security Hardening
  • File Permissions: Set restrictive permissions on config files
  • User Account: Run Telegraf with dedicated system user
  • Network Security: Ensure HTTPS endpoints only
  • Token Rotation: Regularly rotate authentication tokens
Performance Tuning
  • Collection Interval: Adjust based on monitoring requirements
  • Buffer Settings: Configure for your network conditions
  • Metric Filtering: Include only necessary metrics
  • Compression: Enable gzip for reduced bandwidth usage

Service Management

Linux (systemd)

1
2
3
4
5
6
7
8
9
# Enable and start service
sudo systemctl enable telegraf
sudo systemctl start telegraf

# Check status
sudo systemctl status telegraf

# View logs
sudo journalctl -u telegraf -f

Windows Service

1
2
3
4
5
# Install as Windows service
telegraf.exe --service install --config "C:\Program Files\Telegraf\telegraf.conf"

# Start service
net start telegraf

Configuration Validation

1
2
3
4
5
# Test configuration
telegraf --config /etc/telegraf/telegraf.conf --test

# Check specific input
telegraf --config /etc/telegraf/telegraf.conf --test --input-filter cpu

Troubleshooting

Common Issues

  • Connection Errors: Verify token and network connectivity
  • Permission Issues: Check file permissions and user accounts
  • High CPU Usage: Adjust collection intervals and metric filtering
  • Missing Metrics: Verify input plugin configuration

Log Analysis

  • Linux: Check /var/log/telegraf/telegraf.log or journalctl
  • Windows: Check Windows Event Log or Telegraf service logs
  • Debug Mode: Enable debug logging for detailed troubleshooting

With Telegraf properly configured, your server metrics will be securely transmitted to Tinyfal’s backend, where you can monitor them through the mobile app in real-time.

See it in action

Install and configure Telegraf for secure server monitoring with Tinyfal.

Demo

Start Monitoring Your Servers Today

Join developers and teams who trust Tinyfal for secure, mobile-first server monitoring. 100% open source and transparent.