https://github.com/cloudfoundry-community/snotel
A Java based Loggregator client.
https://github.com/cloudfoundry-community/snotel
Last synced: 9 months ago
JSON representation
A Java based Loggregator client.
- Host: GitHub
- URL: https://github.com/cloudfoundry-community/snotel
- Owner: cloudfoundry-community
- License: apache-2.0
- Created: 2015-04-30T21:37:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2021-08-04T23:36:13.000Z (almost 5 years ago)
- Last Synced: 2025-07-11T08:57:26.709Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 116 KB
- Stars: 5
- Watchers: 40
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snotel
[](https://gitter.im/cloudfoundry-community/snotel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Snotel is a Java based Doppler Firehose and Metron client. Its name follows the [Loggregator]
(https://github.com/cloudfoundry/loggregator) naming convention relating to meteorology (Doppler, Metron, NOAA, etc.) More
importantly, the name Snotel was derived from the
fact that it was initially created close to the home of [the greatest snow on earth]
(http://www.onthesnow.com/news/a/9312/utah-claims-the-greatest-snow-on-earth).
Snotel is still in an early state and the API will change over time.
## Firehose client
The Firehose client is built on [Netty](http://netty.io/) and [RxJava](https://github.com/ReactiveX/RxJava).
An example of using the Firehose client:
```java
try (final Firehose firehose = FirehoseBuilder.create("wss://doppler.cf.teal.springapps.io:443", "bearer eyJh... this is not a valid token")
.skipTlsValidation(true)
.build()) {
firehose
.open()
.toBlocking()
.forEach(System.out::println);
}
```
## Metron client
The Metron client can be used to emit [Dropsonde](https://github.com/cloudfoundry/dropsonde) events to Loggregator via the
Metron agent.
An example of using the Metron client:
```java
final MetronClient metronClient = MetronClientBuilder
.create("myorigin")
.build();
metronClient.emitValueMetric("application.uptime", 1, "s");
metronClient.emitCounterEvent("mikes.counter", 5);
metronClient.emitError("mikes.computer", 54321, "Run for the hills! It's about to blow!");
```