Merge commit '52e70c77ff11c4af69bb166c65d9e359454d819e' into feature/gzipped-influx-responses

# Conflicts:
#	CHANGELOG.md
pull/1101/head
Hunter Trujillo 2017-03-28 16:22:28 -06:00
commit c9b29ffb2e
5 changed files with 46 additions and 33 deletions

View File

@ -1,12 +1,24 @@
## v1.2.0 [unreleased]
### Bug Fixes
1. [#1074](https://github.com/influxdata/chronograf/pull/1074): Fix unexpected redirection to create sources page when deleting a source
1. [#1104](https://github.com/influxdata/chronograf/pull/1104): Fix windows hosts on host list
### Features
### UI Improvements
1. [#1101](https://github.com/influxdata/chronograf/pull/1101): Compress InfluxQL responses with gzip
## v1.2.0-beta7 [2017-03-28]
### Bug Fixes
1. [#1008](https://github.com/influxdata/chronograf/issues/1008): Fix unexpected redirection to create sources page when deleting a source
1. [#1067](https://github.com/influxdata/chronograf/issues/1067): Fix issue creating retention policies
1. [#1068](https://github.com/influxdata/chronograf/issues/1068): Fix issue deleting databases
1. [#1078](https://github.com/influxdata/chronograf/issues/1078): Fix cell resizing in dashboards
1. [#1070](https://github.com/influxdata/chronograf/issues/1070): Save GROUP BY tag(s) clauses on dashboards
1. [#1086](https://github.com/influxdata/chronograf/issues/1086): Fix validation for deleting databases
### Features
### UI Improvements
1. [#1092](https://github.com/influxdata/chronograf/pull/1092): Persist and render Dashboard Cell groupby queries
2. [#1101](https://github.com/influxdata/chronograf/pull/1101): Compress InfluxQL responses with gzip
### UI Improvements

View File

@ -110,7 +110,7 @@ Change the default root path of the Chronograf server with the `--basepath` opti
## Versions
Chronograf v1.2.0-beta6 is a beta release.
Chronograf v1.2.0-beta7 is a beta release.
We will be iterating quickly based on user feedback and recommend using the [nightly builds](https://www.influxdata.com/downloads/) for the time being.
Spotted a bug or have a feature request?
@ -121,10 +121,6 @@ Please open [an issue](https://github.com/influxdata/chronograf/issues/new)!
The Chronograf team has identified and is working on the following issues:
* Chronograf requires users to run Telegraf's [CPU](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/system/CPU_README.md) and [system](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/system/SYSTEM_README.md) plugins to ensure that all Apps appear on the [HOST LIST](https://github.com/influxdata/chronograf/blob/master/docs/GETTING_STARTED.md#host-list) page.
* Chronograf cannot create new retention policies on the ADMIN page: [#1067](https://github.com/influxdata/chronograf/issues/1067).
* Chronograf requires users to hit the enter key to successfully delete a database on the ADMIN page: [#1068](https://github.com/influxdata/chronograf/issues/1068).
* Graphs on Chronograf's dashboards do not save `GROUP BY` tag clauses: [#1070](https://github.com/influxdata/chronograf/issues/1070).
* Graphs require InfluxQL functions and a `GROUP BY time()` clause for them to appear on Chronograf's dashboards.
## Installation

View File

@ -195,7 +195,7 @@ Now that we are collecting data with Telegraf and storing data with InfluxDB, it
#### 1. Download and Install Chronograf
```
wget https://dl.influxdata.com/chronograf/releases/chronograf_1.2.0~beta5_amd64.deb
wget https://dl.influxdata.com/chronograf/releases/chronograf_1.2.0~beta7_amd64.deb
sudo dpkg -i chronograf_1.2.0~beta5_amd64.deb
```

View File

@ -5,7 +5,7 @@ import _ from 'lodash';
export function getCpuAndLoadForHosts(proxyLink, telegrafDB) {
return proxy({
source: proxyLink,
query: `select mean(usage_user) from cpu where cpu = 'cpu-total' and time > now() - 10m group by host; select mean("load1") from "system" where time > now() - 10m group by host; select mean("Percent_Processor_Time") from win_cpu where time > now() - 10m group by host; select mean("Processor_Queue_Length") from win_system where time > now() - 10s group by host; select non_negative_derivative(mean(uptime)) as deltaUptime from "system" where time > now() - 10m group by host, time(1m) fill(0); show tag values from system with key = "host"`,
query: `select mean(usage_user) from cpu where cpu = 'cpu-total' and time > now() - 10m group by host; select mean("load1") from "system" where time > now() - 10m group by host; select mean("Percent_Processor_Time") from win_cpu where time > now() - 10m group by host; select mean("Processor_Queue_Length") from win_system where time > now() - 10s group by host; select non_negative_derivative(mean(uptime)) as deltaUptime from "system" where time > now() - 10m group by host, time(1m) fill(0); show tag values from /win_system|system/ with key = "host"`,
db: telegrafDB,
}).then((resp) => {
const hosts = {};
@ -15,18 +15,20 @@ export function getCpuAndLoadForHosts(proxyLink, telegrafDB) {
const winCPUSeries = _.get(resp, ['data', 'results', '2', 'series'], []);
const winLoadSeries = _.get(resp, ['data', 'results', '3', 'series'], []);
const uptimeSeries = _.get(resp, ['data', 'results', '4', 'series'], []);
const allHostsSeries = _.get(resp, ['data', 'results', '5', 'series', '0'], []);
const allHostsSeries = _.get(resp, ['data', 'results', '5', 'series'], []);
const hostnameIndex = allHostsSeries.columns.findIndex((col) => col === 'value');
allHostsSeries.values.forEach((v) => {
const hostname = v[hostnameIndex];
hosts[hostname] = {
name: hostname,
deltaUptime: -1,
cpu: 0.0,
load: 0.0,
};
});
allHostsSeries.forEach((s) => {
const hostnameIndex = s.columns.findIndex((col) => col === 'value')
s.values.forEach((v) => {
const hostname = v[hostnameIndex]
hosts[hostname] = {
name: hostname,
deltaUptime: -1,
cpu: 0.0,
load: 0.0,
}
})
})
cpuSeries.forEach((s) => {
const meanIndex = s.columns.findIndex((col) => col === 'mean');
@ -67,20 +69,25 @@ export async function getAllHosts(proxyLink, telegrafDB) {
try {
const resp = await proxy({
source: proxyLink,
query: 'show tag values from system with key = "host"',
query: 'show tag values from /win_system|system/ with key = "host"',
db: telegrafDB,
});
const allHostsSeries = _.get(resp, ['data', 'results', '0', 'series', '0'], []);
const hostnameIndex = allHostsSeries.columns.findIndex((col) => col === 'value');
return allHostsSeries.values.reduce((hosts, v) => {
const hostname = v[hostnameIndex];
hosts[hostname] = {
name: hostname,
};
return hosts;
}, {});
const hosts = {}
const allHostsSeries = _.get(resp, ['data', 'results', '0', 'series'], [])
allHostsSeries.forEach((s) => {
const hostnameIndex = s.columns.findIndex((col) => col === 'value')
s.values.forEach((v) => {
const hostname = v[hostnameIndex]
hosts[hostname] = {
name: hostname,
}
})
})
return hosts
} catch (error) {
console.error(error); // eslint-disable-line no-console
console.error(error) // eslint-disable-line no-console
}
}

View File

@ -169,8 +169,6 @@ const HostRow = React.createClass({
stateStr = "table-dot dot-critical";
} else if (host.deltaUptime > 0) {
stateStr = "table-dot dot-success";
} else {
stateStr = "table-dot dot-danger";
}
return (