CarbonLibrary (community library)
Summary
Name | Value |
---|---|
Name | CarbonLibrary |
Version | 0.0.6 |
Installs | |
License | MIT |
Author | Garrett Bartley wgb@wgb.me |
URL | https://github.com/wgbartley/spark-carbon-library |
Repository | https://github.com/wgbartley/spark-carbon-library.git |
Download | .tar.gz |
All Versions | 0.0.6, 0.0.4, 0.0.3 |
Example Build Testing
Device OS Version:
This table is generated from an automated build. Success only indicates that the code compiled successfully.
Library Read Me
This content is provided by the library maintainer and has not been validated or approved.
spark-carbon-library
About
A library for posting metrics to a Carbon daemon.
What You Need
- A Spark Core
- A Carbon daemon
How to Use
- Set up a TCPClient to use with SparkCarbon.
- Instantiate the SparkCarbon library. We'll use a variables named
tcpClient
andcarbon
for this example. - In
setup()
, "begin" the library usingcarbon.begin()
.carbon.begin()
will work with a few variations. - IP Address without port (defaults to 2003):
carbon.begin(tcpClient, { 127, 0, 0, 1 });
- IP Address with port:
carbon.begin(tcpClient, { 127, 0, 0, 1}, 2003);
- DNS name without port (defaults to 2003):
carbon.begin(tcpClient, "my-carbon-server.mydomain.com", 2003);
- DNS name with port:
carbon.begin(tcpClient, "my-carbon-server.mydomain.com", 2003);
- Finally, elsewhere in your code, you can use
carbon.sendData("stats.spark-test", 1, 1302905160)
(metric, value, timestamp) to post data to your Carbon daemon.
Links
Browse Library Files