Fix merge conflict
commit
d0a81d4610
|
@ -58,8 +58,8 @@ After installing gvm you can install and set the default go version by
|
||||||
running the following:
|
running the following:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
gvm install go1.7.1
|
gvm install go1.7.4
|
||||||
gvm use go1.7.1 --default
|
gvm use go1.7.4 --default
|
||||||
```
|
```
|
||||||
|
|
||||||
Installing GDM
|
Installing GDM
|
||||||
|
|
|
@ -130,6 +130,7 @@ func MarshalLayout(l chronograf.Layout) ([]byte, error) {
|
||||||
I: c.I,
|
I: c.I,
|
||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
Queries: queries,
|
Queries: queries,
|
||||||
|
Type: c.Type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return proto.Marshal(&Layout{
|
return proto.Marshal(&Layout{
|
||||||
|
@ -180,6 +181,7 @@ func UnmarshalLayout(data []byte, l *chronograf.Layout) error {
|
||||||
I: c.I,
|
I: c.I,
|
||||||
Name: c.Name,
|
Name: c.Name,
|
||||||
Queries: queries,
|
Queries: queries,
|
||||||
|
Type: c.Type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
l.Cells = cells
|
l.Cells = cells
|
||||||
|
|
|
@ -111,6 +111,7 @@ type Cell struct {
|
||||||
Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
Yranges []int64 `protobuf:"varint,8,rep,name=yranges" json:"yranges,omitempty"`
|
Yranges []int64 `protobuf:"varint,8,rep,name=yranges" json:"yranges,omitempty"`
|
||||||
Ylabels []string `protobuf:"bytes,9,rep,name=ylabels" json:"ylabels,omitempty"`
|
Ylabels []string `protobuf:"bytes,9,rep,name=ylabels" json:"ylabels,omitempty"`
|
||||||
|
Type string `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Cell) Reset() { *m = Cell{} }
|
func (m *Cell) Reset() { *m = Cell{} }
|
||||||
|
@ -194,45 +195,45 @@ func init() {
|
||||||
func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) }
|
func init() { proto.RegisterFile("internal.proto", fileDescriptorInternal) }
|
||||||
|
|
||||||
var fileDescriptorInternal = []byte{
|
var fileDescriptorInternal = []byte{
|
||||||
// 626 bytes of a gzipped FileDescriptorProto
|
// 636 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x6e, 0xd3, 0x4c,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x6e, 0xd3, 0x4e,
|
||||||
0x10, 0xc0, 0xb5, 0xb1, 0x9d, 0xc4, 0xdb, 0x4f, 0xfd, 0xd0, 0xaa, 0x42, 0x2b, 0xc4, 0x83, 0x65,
|
0x10, 0xc7, 0xb5, 0xb1, 0x9d, 0xc4, 0xd3, 0x9f, 0xfa, 0x43, 0xab, 0x0a, 0x59, 0x88, 0x07, 0xcb,
|
||||||
0x81, 0x14, 0x24, 0xd4, 0x07, 0x7a, 0x82, 0xb4, 0xae, 0x50, 0xa0, 0x94, 0xb2, 0x6d, 0xc4, 0x13,
|
0x02, 0x29, 0x48, 0xa8, 0x0f, 0xf4, 0x04, 0x69, 0x5d, 0xa1, 0x40, 0x29, 0x65, 0xdb, 0x88, 0x27,
|
||||||
0x0f, 0xdb, 0x66, 0xda, 0x5a, 0xda, 0xd8, 0x66, 0x6d, 0x93, 0xfa, 0x0e, 0x9c, 0x81, 0x43, 0xc0,
|
0x1e, 0xb6, 0xcd, 0xb4, 0xb5, 0xe4, 0xd8, 0x66, 0x6d, 0x93, 0xfa, 0x0e, 0x9c, 0x81, 0x43, 0xc0,
|
||||||
0x01, 0xe0, 0x68, 0x68, 0x66, 0xd7, 0x49, 0x10, 0x7f, 0xd4, 0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x97, 0x3a, 0x37, 0xbe, 0xb4, 0x83, 0xcb,
|
0x2c, 0xe5, 0xc5, 0x7a, 0xca, 0xa9, 0xe4, 0x39, 0xf8, 0xf4, 0x3d, 0x6c, 0x55, 0xf6, 0xb9, 0xf2,
|
||||||
0x21, 0xfd, 0xe4, 0x1d, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xdb, 0x24, 0x8b, 0x04, 0x05,
|
0x1e, 0x04, 0xc7, 0x4b, 0x9d, 0xe5, 0xae, 0xb4, 0x15, 0x97, 0x43, 0xfe, 0x0d, 0x1e, 0xfc, 0x0c,
|
||||||
0x00, 0x00,
|
0x00, 0x00, 0xff, 0xff, 0x92, 0x9e, 0x41, 0x68, 0x18, 0x05, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ message Cell {
|
||||||
string name = 7; // User-facing name for this cell
|
string name = 7; // User-facing name for this cell
|
||||||
repeated int64 yranges = 8; // Limits of the y-axes
|
repeated int64 yranges = 8; // Limits of the y-axes
|
||||||
repeated string ylabels = 9; // Labels of the y-axes
|
repeated string ylabels = 9; // Labels of the y-axes
|
||||||
|
string type = 10; // Cell visualization type
|
||||||
}
|
}
|
||||||
|
|
||||||
message Query {
|
message Query {
|
||||||
|
|
|
@ -84,6 +84,7 @@ func TestMarshalLayout(t *testing.T) {
|
||||||
W: 4,
|
W: 4,
|
||||||
H: 4,
|
H: 4,
|
||||||
I: "anotherid",
|
I: "anotherid",
|
||||||
|
Type: "line",
|
||||||
Name: "cell1",
|
Name: "cell1",
|
||||||
Queries: []chronograf.Query{
|
Queries: []chronograf.Query{
|
||||||
{
|
{
|
||||||
|
|
|
@ -260,6 +260,7 @@ type Cell struct {
|
||||||
I string `json:"i"`
|
I string `json:"i"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Queries []Query `json:"queries"`
|
Queries []Query `json:"queries"`
|
||||||
|
Type string `json:"type"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Layout is a collection of Cells for visualization
|
// Layout is a collection of Cells for visualization
|
||||||
|
|
|
@ -35,7 +35,7 @@ Set a [JWT](https://tools.ietf.org/html/rfc7519) signature to a random string.
|
||||||
*Keep this random string around!*
|
*Keep this random string around!*
|
||||||
|
|
||||||
You'll need it each time you start a chronograf server because it is used to verify
|
You'll need it each time you start a chronograf server because it is used to verify
|
||||||
user authorization.
|
user authorization. If you are running multiple chronograf servers in an HA configuration set the `TOKEN_SECRET` on each to allow users to stay logged in.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export TOKEN_SECRET=supersupersecret
|
export TOKEN_SECRET=supersupersecret
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
|
@ -7,3 +7,5 @@ go get github.com/gogo/protobuf/jsonpb
|
||||||
go get github.com/gogo/protobuf/protoc-gen-gogo
|
go get github.com/gogo/protobuf/protoc-gen-gogo
|
||||||
go get github.com/gogo/protobuf/gogoproto
|
go get github.com/gogo/protobuf/gogoproto
|
||||||
```
|
```
|
||||||
|
|
||||||
|
now, you can regenerate the `.proto` file: `protoc --gogo_out=. internal.proto`
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
# Use Cases
|
||||||
|
|
||||||
|
Chronograf works with the other components of the TICK stack to provide a user interface for monitoring and alerting on your infrastructure.
|
||||||
|
This document describes common setup use cases for Chronograf.
|
||||||
|
|
||||||
|
## Use Case 1: Setup for Monitoring Several Servers
|
||||||
|
|
||||||
|
Suppose you want to use Chronograf to monitor several servers.
|
||||||
|
This section describes a simple setup for monitoring CPU, disk, and memory usage on three servers.
|
||||||
|
|
||||||
|
### Architecture Overview
|
||||||
|
|
||||||
|
![Setup Diagram](https://github.com/influxdata/chronograf/blob/master/docs/images/set-up-diagram.png)
|
||||||
|
|
||||||
|
Each of the three servers has its own [Telegraf](https://github.com/influxdata/telegraf) instance.
|
||||||
|
Those instances are configured to collect CPU, disk, and memory data using Telegraf's [system stats](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/system) input plugin.
|
||||||
|
Each Telegraf instance is also configured to send those data to a single [InfluxDB](https://github.com/influxdata/influxdb) instance.
|
||||||
|
When Telegraf sends data to InfluxDB, it automatically [tags](https://docs.influxdata.com/influxdb/latest/concepts/glossary/#tag) those data with the relevant server's hostname.
|
||||||
|
|
||||||
|
The single InfluxDB instance is connected to Chronograf.
|
||||||
|
Chronograf uses the `host` tag in the Telegraf data to populate the [HOST LIST](https://github.com/influxdata/chronograf/blob/master/docs/GETTING_STARTED.md#host-list) page and provide other hostname-specific information in the user interface.
|
||||||
|
|
||||||
|
### Setup Description
|
||||||
|
|
||||||
|
To start out, we [install and start](https://github.com/influxdata/chronograf/blob/master/docs/INSTALLATION.md#influxdb-setup) InfluxDB on a separate server.
|
||||||
|
We recommend installing InfluxDB on its own [machine](https://docs.influxdata.com/influxdb/latest/guides/hardware_sizing/) for performance purposes.
|
||||||
|
InfluxDB's default [configuration](https://docs.influxdata.com/influxdb/latest/administration/config/) doesn't require any adjustments for this particular use case.
|
||||||
|
|
||||||
|
Next, we [install](https://www.influxdata.com/downloads/) Telegraf on each server that we want to monitor.
|
||||||
|
Before starting the three Telegraf services we need to make some edits to Telegraf's [configuration file](https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md) (`/etc/telegraf/telegraf.conf`).
|
||||||
|
First, we configure each instance to use the system stats plugin to collect CPU, disk, and memory data.
|
||||||
|
The system stats plugin is actually enabled by default so there's no additional work to do here.
|
||||||
|
We just double check that `[[inputs.cpu]]`, `[[inputs.disk]]`, and `[[inputs.mem]]` are uncommented in the `INPUT PLUGINS` section of Telegraf's configuration file:
|
||||||
|
|
||||||
|
```
|
||||||
|
###############################################################################
|
||||||
|
# INPUT PLUGINS #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Read metrics about cpu usage
|
||||||
|
[[inputs.cpu]] #✅
|
||||||
|
## Whether to report per-cpu stats or not
|
||||||
|
percpu = true
|
||||||
|
## Whether to report total system cpu stats or not
|
||||||
|
totalcpu = true
|
||||||
|
## If true, collect raw CPU time metrics.
|
||||||
|
collect_cpu_time = false
|
||||||
|
|
||||||
|
|
||||||
|
# Read metrics about disk usage by mount point
|
||||||
|
[[inputs.disk]] #✅
|
||||||
|
## By default, telegraf gather stats for all mountpoints.
|
||||||
|
## Setting mountpoints will restrict the stats to the specified mountpoints.
|
||||||
|
# mount_points = ["/"]
|
||||||
|
|
||||||
|
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
|
||||||
|
## present on /run, /var/run, /dev/shm or /dev).
|
||||||
|
ignore_fs = ["tmpfs", "devtmpfs"]
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
# Read metrics about memory usage
|
||||||
|
[[inputs.mem]] #✅
|
||||||
|
# no configuration
|
||||||
|
```
|
||||||
|
|
||||||
|
Our next edit to Telegraf's configuration file ensures that each Telegraf instance sends data to our single InfluxDB instance.
|
||||||
|
To do this, we edit the `urls` setting in the `OUTPUT PLUGINS` section to point to the IP of our InfluxDB instance:
|
||||||
|
|
||||||
|
```
|
||||||
|
###############################################################################
|
||||||
|
# OUTPUT PLUGINS #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Configuration for influxdb server to send metrics to
|
||||||
|
[[outputs.influxdb]]
|
||||||
|
## The full HTTP or UDP endpoint URL for your InfluxDB instance.
|
||||||
|
## Multiple urls can be specified as part of the same cluster,
|
||||||
|
## this means that only ONE of the urls will be written to each interval.
|
||||||
|
# urls = ["udp://localhost:8089"] # UDP endpoint example
|
||||||
|
urls = ["http://<InfluxDB-IP>:8086"] # 💥 Edit here!💥
|
||||||
|
## The target database for metrics (telegraf will create it if not exists).
|
||||||
|
database = "telegraf" # required
|
||||||
|
```
|
||||||
|
Now that we've configured our inputs and outputs, we [start](https://github.com/influxdata/chronograf/blob/master/docs/INSTALLATION.md#2-start-telegraf) the Telegraf service on all three servers.
|
||||||
|
Telegraf begins by creating a database in InfluxDB called `telegraf` (that name is configurable), and Telegraf starts writing system stats data to that database.
|
||||||
|
Note that Telegraf automatically creates a `host` [tag](https://docs.influxdata.com/influxdb/latest/concepts/glossary/#tag) that records the hostname of the server that sent the data.
|
||||||
|
Here's a sample of some CPU usage data in InfluxDB:
|
||||||
|
|
||||||
|
```
|
||||||
|
name: cpu
|
||||||
|
time usage_idle host <--- Telegraf's auto-generated tag
|
||||||
|
---- ---------- ----
|
||||||
|
2016-11-29T22:41:00Z 99.70000000000253 server-01
|
||||||
|
2016-11-29T22:41:00Z 99.79959919839698 server-02
|
||||||
|
2016-11-29T22:41:00Z 98.1037924151472 server-03
|
||||||
|
2016-11-29T22:41:10Z 99.60000000000036 server-01
|
||||||
|
2016-11-29T22:41:10Z 99.49698189131892 server-02
|
||||||
|
2016-11-29T22:41:10Z 99.6996996996977 server-03
|
||||||
|
2016-11-29T22:41:20Z 98.89889889889365 server-01
|
||||||
|
2016-11-29T22:41:20Z 99.40119760479097 server-02
|
||||||
|
2016-11-29T22:41:20Z 99.60039960039995 server-03
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, we [install and start](https://github.com/influxdata/chronograf/blob/master/docs/INSTALLATION.md#chronograf-setup) Chronograf.
|
||||||
|
Once we [connect](https://github.com/influxdata/chronograf/blob/master/docs/INSTALLATION.md#3-connect-to-chronograf) Chronograf to our InfluxDB
|
||||||
|
instance, Chronograf uses Telegraf's `host` tag to populate the [HOST LIST](https://github.com/influxdata/chronograf/blob/master/docs/GETTING_STARTED.md#host-list) page:
|
||||||
|
|
||||||
|
![Host List](https://github.com/influxdata/chronograf/blob/master/docs/images/host-list-usecase.png)
|
||||||
|
|
||||||
|
The system stats dashboard template shows the CPU, Disk, and Memory metrics for the selected hostname:
|
||||||
|
|
||||||
|
![Dashboard Template](https://github.com/influxdata/chronograf/blob/master/docs/images/template-dashboard-usecase.png)
|
||||||
|
|
||||||
|
Finally, you can create queries in the [Data Explorer](https://github.com/influxdata/chronograf/blob/master/docs/GETTING_STARTED.md#data-explorer) that graph results per hostname:
|
||||||
|
|
||||||
|
![Dashboard Template](https://github.com/influxdata/chronograf/blob/master/docs/images/group-by-usecase.png)
|
||||||
|
|
||||||
|
## Use Case 2: Setup the TICK Stack in a Kubernetes Instance
|
||||||
|
|
||||||
|
Check out our 20-minute [webinar](https://vimeo.com/193632831) for how to spin up the TICK Stack in a Kubernetes instance.
|
|
@ -28,7 +28,7 @@ RUN npm install npm -g
|
||||||
|
|
||||||
# Install go
|
# Install go
|
||||||
ENV GOPATH /root/go
|
ENV GOPATH /root/go
|
||||||
ENV GO_VERSION 1.7.3
|
ENV GO_VERSION 1.7.4
|
||||||
ENV GO_ARCH amd64
|
ENV GO_ARCH amd64
|
||||||
RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
|
RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
|
||||||
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
|
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
|
||||||
|
|
|
@ -2063,6 +2063,11 @@
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/definitions/LayoutQuery"
|
"$ref": "#/definitions/LayoutQuery"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"description": "Cell visualization type",
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2187,4 +2192,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React, {PropTypes} from 'react';
|
import React, {PropTypes} from 'react';
|
||||||
|
import shallowCompare from 'react-addons-shallow-compare';
|
||||||
import {Link} from 'react-router';
|
import {Link} from 'react-router';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
|
@ -140,12 +141,13 @@ const HostRow = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps) {
|
shouldComponentUpdate(nextProps) {
|
||||||
return this.props.host !== nextProps.host;
|
return shallowCompare(this, nextProps);
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {host, source} = this.props;
|
const {host, source} = this.props;
|
||||||
const {name, cpu, load, apps = []} = host;
|
const {name, cpu, load, apps = []} = host;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
<td className="monotype"><Link to={`/sources/${source.id}/hosts/${name}`}>{name}</Link></td>
|
<td className="monotype"><Link to={`/sources/${source.id}/hosts/${name}`}>{name}</Link></td>
|
||||||
|
|
Loading…
Reference in New Issue