Skip to content

Commit

Permalink
Format the markdown according to docker standards
Browse files Browse the repository at this point in the history
  • Loading branch information
jsternberg committed Apr 12, 2016
1 parent 953df63 commit 1eb4a90
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 203 deletions.
79 changes: 37 additions & 42 deletions chronograf/content.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
# Chronograf

Chronograf is a simple to install graphing and visualization
application that you deploy behind your firewall to perform ad-hoc
exploration of your InfluxDB data. It includes support for templates
and a library of intelligent, pre-configured dashboards for common
data sets.
Chronograf is a simple to install graphing and visualization application that you deploy behind your firewall to perform ad-hoc exploration of your InfluxDB data. It includes support for templates and a library of intelligent, pre-configured dashboards for common data sets.

%%LOGO%%

## Using this image

##### Exposed Ports
### Exposed Ports

- 10000 (default port)
- 10000 (default port)

##### Using the default configuration
### Using the default configuration

By default, Chronograf runs on localhost port `10000`. Chronograf
exposes a shared volume under `/var/lib/chronograf`, which it uses to
store database data. You can mount a host directory to
`/var/lib/chronograf` for host access to persisted container data. A
typical invocation of the Chronograf container might be:
By default, Chronograf runs on localhost port `10000`. Chronograf exposes a shared volume under `/var/lib/chronograf`, which it uses to store database data. You can mount a host directory to `/var/lib/chronograf` for host access to persisted container data. A typical invocation of the Chronograf container might be:

docker run --net=host \
-v /path/on/host:/var/lib/chronograf \
chronograf
```console
$ docker run --net=host \
-v /path/on/host:/var/lib/chronograf \
chronograf
```

You can also have Docker control the volume mountpoint by using a named volume.

docker run -p 8083:8083 -p 8086:8086 \
-v chronograf:/var/lib/chronograf \
chronograf
```console
$ docker run -p 8083:8083 -p 8086:8086 \
-v chronograf:/var/lib/chronograf \
chronograf
```

##### Using a custom config file
### Using a custom config file

Assuming a custom configuration file on your host at
`/path/to/config.toml` you can mount a shared volume as follows:
Assuming a custom configuration file on your host at `/path/to/config.toml` you can mount a shared volume as follows:

docker run --net=host \
-v /path/to:/opt/chronograf:ro \
chronograf -config /opt/chronograf/config.toml
```console
$ docker run --net=host \
-v /path/to:/opt/chronograf:ro \
chronograf -config /opt/chronograf/config.toml
```

#### Config variables
## Config variables

Chronograf 0.10 has following config variables

Expand All @@ -50,27 +47,25 @@ Chronograf 0.10 has following config variables
| LocalDatabase | CHRONOGRAF_LOCAL_DATABASE | /var/lib/chronograf/chronograf.db |
| QueryResponseBytesLimit | CHRONOGRAF_QUERY_RESPONSE_BYTES_LIMIT | 2500000 |

All of these can be provided in the config file or overrided using the
environment variables
All of these can be provided in the config file or overrided using the environment variables

##### Binding to a different port
### Binding to a different port

To bind to a different port you can use Docker's `-p` flag. For example, to run Chronograf on port `9999`:

docker run -p 9999:10000 chronograf
```console
docker run -p 9999:10000 chronograf
```

##### Using a different database file
### Using a different database file

docker run --net=host \
-v /path/on/host/:/var/lib/other_chronograf.db \
--env CHRONOGRAF_LOCAL_DATABASE=/var/lib/other_chronograf db \
chronograf
```console
$ docker run --net=host \
-v /path/on/host/:/var/lib/other_chronograf.db \
--env CHRONOGRAF_LOCAL_DATABASE=/var/lib/other_chronograf db \
chronograf
```

#### Official Docs
## Official Docs

See the [official docs](https://docs.influxdata.com/chronograf/latest/introduction/getting_started/) for information on creating
visualizations.

## Supported Docker versions

This image is officially supported on Docker version 1.10.1
See the [official docs](https://docs.influxdata.com/chronograf/latest/introduction/getting_started/) for information on creating visualizations.
113 changes: 52 additions & 61 deletions influxdb/content.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# InfluxDB

InfluxDB is a time series database built from the ground up to handle
high write and query loads. InfluxDB is meant to be used as a backing
store for any use case involving large amounts of timestamped data,
including DevOps monitoring, application metrics, IoT sensor data, and
real-time analytics.
InfluxDB is a time series database built from the ground up to handle high write and query loads. InfluxDB is meant to be used as a backing store for any use case involving large amounts of timestamped data, including DevOps monitoring, application metrics, IoT sensor data, and real-time analytics.

[InfluxDB Documentation](https://docs.influxdata.com/influxdb/latest/)

Expand All @@ -14,115 +10,110 @@ real-time analytics.

### Running the container

The InfluxDB image exposes a shared volume under
`/var/lib/influxdb`, so you can mount a host directory to that point
to access persisted container data. A typical invocation of the
container might be:
The InfluxDB image exposes a shared volume under `/var/lib/influxdb`, so you can mount a host directory to that point to access persisted container data. A typical invocation of the container might be:

docker run -p 8083:8083 -p 8086:8086 \
-v $PWD:/var/lib/influxdb \
influxdb
```console
docker run -p 8083:8083 -p 8086:8086 \
-v $PWD:/var/lib/influxdb \
influxdb
```

Modify `$PWD` to the directory where you want to store data associated
with the InfluxDB container.
Modify `$PWD` to the directory where you want to store data associated with the InfluxDB container.

You can also have Docker control the volume mountpoint by using a named volume.

docker run -p 8083:8083 -p 8086:8086 \
-v influxdb:/var/lib/influxdb \
influxdb
```console
docker run -p 8083:8083 -p 8086:8086 \
-v influxdb:/var/lib/influxdb \
influxdb
```

### Exposed Ports

The following ports are important and will be automatically exposed
when using `docker run -P`.
The following ports are important and will be automatically exposed when using `docker run -P`.

- 8083 Admin interface port
- 8086 HTTP API PORT

Other important ports that aren't exposed by default:

- 8091 Meta service port
- 8088 Clustering (raft) port
- 8091 Meta service port
- 8088 Clustering (raft) port

These two ports do not need to be exposed in a single server
configuration.
These two ports do not need to be exposed in a single server configuration.

Find more about API Endpoints & Ports [here](https://docs.influxdata.com/influxdb/latest/concepts/api/).

### Configuration

InfluxDB can be either configured from a config file or using
environment variables. To mount a configuration file and use it with
the server, you can use this command:
InfluxDB can be either configured from a config file or using environment variables. To mount a configuration file and use it with the server, you can use this command:

# Generate the default configuration file
docker run --rm \
-v $PWD:/etc/influxdb \
influxdb bash -c 'influxd config > /etc/influxdb/influxdb.conf'
Generate the default configuration file:

# Modify the default configuration, which will now be available
# under $PWD
```console
$ docker run --rm \
-v $PWD:/etc/influxdb \
influxdb bash -c 'influxd config > /etc/influxdb/influxdb.conf'
```

# Start the InfluxDB container
docker run -p 8083:8083 -p 8086:8086 \
-v $PWD:/etc/influxdb:ro \
influxdb -config /etc/influxdb/influxdb.conf
Modify the default configuration, which will now be available under `$PWD`. Then start the InfluxDB container.

Modify `$PWD` to the directory where you want to store the
configuration file.
```console
$ docker run -p 8083:8083 -p 8086:8086 \
-v $PWD:/etc/influxdb:ro \
influxdb -config /etc/influxdb/influxdb.conf
```

For environment variables, the format is `INFLUXDB_$SECTION_$NAME`. All
dashes (`-`) are replaced with underscores (`_`). If the variable isn't
in a section, then omit that part.
Modify `$PWD` to the directory where you want to store the configuration file.

For environment variables, the format is `INFLUXDB_$SECTION_$NAME`. All dashes (`-`) are replaced with underscores (`_`). If the variable isn't in a section, then omit that part.

Examples:

INFLUXDB_REPORTING_DISABLED=true
INFLUXDB_META_DIR=/path/to/metadir
INFLUXDB_DATA_QUERY_LOG_ENABLED=false
```console
INFLUXDB_REPORTING_DISABLED=true
INFLUXDB_META_DIR=/path/to/metadir
INFLUXDB_DATA_QUERY_LOG_ENABLED=false
```

Find more about configuring InfluxDB [here](https://docs.influxdata.com/influxdb/latest/introduction/installation/)

### Graphite

InfluxDB supports the Graphite line protocol, but the service and ports
are not exposed by default. To run InfluxDB with Graphite support
enabled, you can either use a configuration file
InfluxDB supports the Graphite line protocol, but the service and ports are not exposed by default. To run InfluxDB with Graphite support enabled, you can either use a configuration file or set the appropriate environment variables.

### HTTP API

Creating a DB named mydb:

curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
```console
$ curl -G http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
```

Inserting into the DB:

curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
```console
$ curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
```

Read more about this in the [official documentation](https://docs.influxdata.com/influxdb/latest/guides/writing_data/)

### CLI / SHELL

Start the container:

docker run --name=influxdb -d -p 8083:8083 -p 8086:8086 influxdb
```console
$ docker run --name=influxdb -d -p 8083:8083 -p 8086:8086 influxdb
```

Run the influx client in another container as such:

docker run --rm --link=influxdb -it influxdb bash -l
> influx -host $INFLUXDB_PORT_8086_TCP_ADDR

The client needs to run bash first and then use the `influx` binary from
there so the environment variable becomes available to use.
```console
$ docker run --rm --link=influxdb -it influxdb influx -host influxdb
```

### Web Administrator Interface

Navigate to [localhost:8083](http://localhost:8083) with your browser
while running the container.
Navigate to [localhost:8083](http://localhost:8083) with your browser while running the container.

See more about using the web admin [here](https://docs.influxdata.com/influxdb/latest/tools/web_admin/).

## Supported Docker versions

This image is officially supported on Docker version 1.10.1.
48 changes: 29 additions & 19 deletions kapacitor/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,41 @@ Kapacitor is a data processing engine. It can process both stream and batch data

Start the Kapacitor container with default options:

docker run --net=host -v /path/on/host/kapacitorFiles/:/var/lib/kapacitor kapacitor
```console
$ docker run --net=host \
-v /path/on/host/kapacitorFiles/:/var/lib/kapacitor
kapacitor
```

Start the Kapacitor container with custom configuration.

docker run --net=host -v /path/on/host/kapacitor.config:/etc/kapacitor/kapacitor.conf:ro -v /path/on/host/kapacitorFiles/:/var/lib/kapacitor kapacitor
```console
$ docker run --net=host \
-v /path/on/host/kapacitor.config:/etc/kapacitor/kapacitor.conf:ro \
-v /path/on/host/kapacitorFiles/:/var/lib/kapacitor
kapacitor
```

Start the Kapacitor container with custom configuration using env vars.

docker run --net=host -e KAPACITOR_LOGGING_LEVEL=DEBUG -v /path/on/host/kapacitorFiles/:/var/lib/kapacitor kapacitor

```console
$ docker run --net=host
-e KAPACITOR_LOGGING_LEVEL=DEBUG \
-v /path/on/host/kapacitorFiles/:/var/lib/kapacitor
kapacitor
```

## Using the CLI

The kapacitor CLI binary is also included in the image.
To start a container for communicating with the kapacitor daemon, change the entrypoint
The kapacitor CLI binary is also included in the image. To start a container for communicating with the kapacitor daemon, change the entrypoint

docker run -it --entrypoint=bash -v /path/on/host/kapacitorFiles/:/var/lib/kapacitor kapacitor
```console
$ docker run -it --entrypoint=bash \
-v /path/on/host/kapacitorFiles/:/var/lib/kapacitor
kapacitor
```

Then from within the container you can use the `kapacitor` command to interact with the daemon.
Assuming you have Telegraf + InfluxDB + Kapacitor all hooked up,
then create a file `cpu_alert.tick`.
If not then see the [docker-compose](https://docs.docker.com/compose/) [TICK stack](https://github.com/influxdata/TICK-docker) environment for easy setup.
Then from within the container you can use the `kapacitor` command to interact with the daemon. Assuming you have Telegraf + InfluxDB + Kapacitor all hooked up, then create a file `cpu_alert.tick`. If not then see the [docker-compose](https://docs.docker.com/compose/) [TICK stack](https://github.com/influxdata/TICK-docker) environment for easy setup.

```sh
cat > cpu_alert.tick << EOF
Expand All @@ -46,13 +59,10 @@ EOF

Then define, enable and watch the status of the task:

kapacitor define -name cpu_alert -type stream -dbrp telegraf.default -tick cpu_alert.tick
kapacitor enable cpu_alert
kapacitor show cpu_alert

```console
kapacitor define -name cpu_alert -type stream -dbrp telegraf.default -tick cpu_alert.tick
kapacitor enable cpu_alert
kapacitor show cpu_alert
```

See [this](https://docs.influxdata.com/kapacitor/latest/introduction/getting_started/) for a more detailed guide.

## Supported Docker versions

This image is officially supported on Docker version 1.10.1
Loading

0 comments on commit 1eb4a90

Please sign in to comment.