tickstack

package
v0.0.0-...-d376067 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Chronograf

launch with volume:

$ docker run -d -p 8888:8888 \
-v chronograf-storage:/var/lib/chronograf \
chronograf:tag

Influxdb

launch with volume:

$ docker run -d --name=influxdb -p 8086:8086 \
-v influxdb-storage:/var/lib/influxdb \
influxdb:tag

use docker network:

$ docker network create influxdb

$ docker run -d --name=influxdb -p 8086:8086 \
--net=influxdb
influxdb:tag

Kapacitor

launch with volume:

$ docker run -d --name=kapacitor -p 9092:9092 \
-v kapacitor:/var/lib/kapacitor \
kapacitor:tag

use localhost:

$ docker run -d --name=kapacitor -p 9092:9092 \
--net=container:influxdb
kapacitor:tag

use configuration on node:

$ docker run -d --name=kapacitor -p 9092:9092 \
-v kapacitor-storage/kapacitor.conf:/etc/kapacitor/kapacitor.conf:ro \
kapacitor:tag

use docker network:

[[influxdb]]
urls = ["http://influxdb:8086"]

# set env
$ docker run -d --name=kapacitor -p 9092:9092 \
--net=influxdb \
-h kapacitor \
# This option and kapacitor config are the same.
-e KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086 \
kapacitor:tag

Telegraf

telegraf default get cpu/mem from docker not host.

launch with volume:

$ docker run -d --name=telegraf \
-v telegraf-storage:/var/lib/telegraf
telegraf:tag

use localhost:

$ docker run -d --name=telegraf \
--net=container:influxdb
telegraf:tag

use configuration on node:

$ docker run -d --name=telegraf \
-v telegraf-storage/telegraf.conf:/etc/telegraf/telegraf.conf:ro \
telegraf:tag

use docker network:

[[outputs.influxdb]]
urls = ["http://influxdb:8086"]

$ docker run -d --name=telegraf \
--net=influxdb \
-v telegraf-storage/telegraf.conf:/etc/telegraf/telegraf.conf:ro \
telegraf:tag

monitoring host filesystem mount /proc:

$ docker run -d --name=telegraf --restart=always \
--net=influxdb --add-host="influxdb:192.168.1.1" \
-e HOST_PROC=/home/proc \
-v /proc:/home/proc:ro \
-v telegraf-storage/telegraf.conf:/etc/telegraf/telegraf.conf:ro \
telegraf:tag

monitoring other container with docker plugin:

[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"

$ docker run -d --name=telegraf \
--net=influxdb \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v telegraf-storage/telegraf.conf:/etc/telegraf/telegraf.conf:ro \
telegraf:tag

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

func Query(url, measurement, ifql string) ([]string, [][]interface{}, error)

Query from influxdb.

Types

type Response

type Response struct {
	Enabled          bool
	From             string
	Global           bool
	Host             string
	IdleTimeout      string
	NoVerify         bool
	Port             int
	StateChangesOnly bool
	To               []string
}

func GetSmtp

func GetSmtp(host, port string) (*Response, error)

Get smtp config from kapacitor.

type SmtpResp

type SmtpResp struct {
	Link struct {
		Rel  string `json:"rel"`
		Href string `json:"href"`
	} `json:"link"`
	Elements []struct {
		Link struct {
			Rel  string `json:"rel"`
			Href string `json:"href"`
		} `json:"link"`
		Options struct {
			Enabled          bool     `json:"enabled"`
			From             string   `json:"from"`
			Global           bool     `json:"global"`
			Host             string   `json:"host"`
			IdleTimeout      string   `json:"idle-timeout"`
			NoVerify         bool     `json:"no-verify"`
			Password         bool     `json:"password"`
			Port             int      `json:"port"`
			StateChangesOnly bool     `json:"state-changes-only"`
			To               []string `json:"to"`
			Username         string   `json:"username"`
		} `json:"options"`
		Redacted []string `json:"redacted"`
	} `json:"elements"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL