Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hakobera/fluent-influxdb-test
This is an influxdb with fluentdb sample project.
https://github.com/hakobera/fluent-influxdb-test
Last synced: 3 days ago
JSON representation
This is an influxdb with fluentdb sample project.
- Host: GitHub
- URL: https://github.com/hakobera/fluent-influxdb-test
- Owner: hakobera
- Created: 2014-04-07T02:55:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-04-15T18:46:16.000Z (over 1 year ago)
- Last Synced: 2024-11-10T21:43:04.084Z (2 months ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fluent influxdb test
This is an influxdb with fluentd sample project for Mac OS X.
## How to use
### Install InfluxDB and run as service
```
$ brew install influxdb
$ ln -sfv /usr/local/opt/influxdb/*.plist ~/Library/LaunchAgents
$ brew services start influxdb
```### Create test database
```
curl -X POST 'http://localhost:8086/db?u=root&p=root' \
-d '{"name": "test"}'
```### Get sample project
```
$ git clone https://github.com/hakobera/fluent-influxdb-test
$ cd fluent-influxdb-test
$ bundle install
```### Run fluentd
```
$ bundle exec fluentd -c conf/fluent.conf
```### Import dummy data
Open another console, import dummy data using [dummer](https://github.com/sonots/dummer).
```
$ bundle exec dummer -c conf/dummer.conf
```### Get data from InfluxDB
For example, get access count for each URL and each 10 secound.
```
$ curl "http://localhost:8086/db/test/series?u=root&p=root&q=SELECT%20uri%2C%20COUNT(id)%20FROM%20dummy.test%20GROUP%20BY%20uri%2C%20time(10s)"
```