Skip to content
This repository has been archived by the owner on Oct 27, 2018. It is now read-only.

Add InfluxDB Line Protocol Support, and Add endpoint for JSON #18

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

JSMike
Copy link
Contributor

@JSMike JSMike commented Sep 29, 2015

No description provided.

Michael Cebrian added 2 commits September 28, 2015 11:25
Update influx module to use line protocol for 0.9
Add warning logging to influx module when receiving a response from the DB
Update syntax for server.coffee, remove parenthesis where not required
Update version to 0.6
@JSMike JSMike changed the title Add Line Protocol Support, and Add endpoint for JSON Add InfluxDB Line Protocol Support, and Add endpoint for JSON Sep 29, 2015
@JSMike
Copy link
Contributor Author

JSMike commented Oct 6, 2015

Added tag for v0.6.0

@@ -18,7 +27,7 @@ influxdb:
password: 'root'
use_udp: false
retentionPolicy: 'default'
# Acceptable version are: '0.8' and '0.9'
# All version other than '0.9' will default to '0.8'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of odd. It should probably error if you try to enter a value other than '0.8' or '0.9'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for backwards compatibility. If a user updates (or re-downloads) BuckyServer and tries to use an old default.yaml the current defaulting will handle it gracefully, and BuckyServer will act as it did before the version option was added. If this is changed to throw an error then older default.yaml configurations for InfluxDB will become invalid. Unless we add logic to only allow passed values to be '0.8', '0.9', and default undefined to '0.8'. I'll work on that last option.

@zackbloom
Copy link
Contributor

Hi @JSMike, thanks for the PR, please see the inline comments.

@JSMike
Copy link
Contributor Author

JSMike commented Oct 6, 2015

Sure, I'm about to leave the office for the day, I'll look into these tomorrow. Thanks for the feedback.

@JSMike JSMike changed the title Add InfluxDB Line Protocol Support, and Add endpoint for JSON DONT MERGE: Add InfluxDB Line Protocol Support, and Add endpoint for JSON Oct 7, 2015
@JSMike
Copy link
Contributor Author

JSMike commented Oct 7, 2015

I've made the requested updates. The only item I didn't make changes towards is the collectionLogger being uncommented by default.

Add filePath to https options in default.yaml
Replace double quotes with single quotes in influxdb.coffee
Update logic for loading https config, only load from file when filePath property exists
@JSMike JSMike force-pushed the master branch 2 times, most recently from 2ef3143 to 0d606d4 Compare October 7, 2015 21:34
Update package.json to match tag
Add version check for influxdb
@JSMike JSMike changed the title DONT MERGE: Add InfluxDB Line Protocol Support, and Add endpoint for JSON Add InfluxDB Line Protocol Support, and Add endpoint for JSON Oct 7, 2015
@JSMike
Copy link
Contributor Author

JSMike commented Oct 7, 2015

Updated version to v0.6.2

@JSMike
Copy link
Contributor Author

JSMike commented Oct 9, 2015

@zackbloom Let me know how this looks. Thank you for your feedback.

Use to define the options for https.
key and cert are mandatory options, here is a full [list of all available options](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener).
For all options that accept a buffer you can use the path to the file containing the option's data.
- `key:` {Object|String|Buffer}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the example config below key is a sub-object of server.https.options. Here it is directly under server.https. Which is the right place in the hierarchy for it? Same question goes for cert.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edlerd key and cert are properties of options:
https://nodejs.org/api/https.html#https_https_createserver_options_requestlistener
options is the object passed into https.

@sebguilbaud
Copy link

This PR allows bucky-server to work fine on modern InfluxDB's (1.2.2 at least) as JSON protocol was dropped on 1.0 (https://docs.influxdata.com/influxdb/v0.9/write_protocols/json/)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants