Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timstott/fluent-plugin-claymore
:bar_chart: Extract time series metrics from Claymore Dual Miner logs
https://github.com/timstott/fluent-plugin-claymore
claymore fluentd-plugin grafana influxdb
Last synced: about 1 month ago
JSON representation
:bar_chart: Extract time series metrics from Claymore Dual Miner logs
- Host: GitHub
- URL: https://github.com/timstott/fluent-plugin-claymore
- Owner: timstott
- License: other
- Created: 2018-01-24T07:56:21.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-25T08:12:51.000Z (about 7 years ago)
- Last Synced: 2024-12-16T22:29:00.189Z (about 2 months ago)
- Topics: claymore, fluentd-plugin, grafana, influxdb
- Language: Ruby
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fluent-plugin-claymore
[![Gem](https://img.shields.io/gem/v/fluent-plugin-claymore.svg?style=flat-square)](https://rubygems.org/gems/fluent-plugin-claymore)
[![CircleCI](https://img.shields.io/circleci/project/github/timstott/fluent-plugin-claymore.svg?style=flat-square)](https://circleci.com/gh/timstott/fluent-plugin-claymore/tree/master)
[![Gemnasium](https://img.shields.io/gemnasium/timstott/fluent-plugin-claymore.svg?style=flat-square)](https://gemnasium.com/github.com/timstott/fluent-plugin-claymore)[Fluentd](https://fluentd.org/) parser plugin to extract metrics from Claymore
Dual Miner logs## Requirements
| fluentd | ruby |
|------------|--------|
| >= v0.14.0 | >= 2.1 || Claymore Dual Miner | fluent-plugin-claymore |
|---------------------|------------------------|
| v10.0 | >= v1.0 |## Installation
$ fluent-gem install fluent-plugin-claymore
## Usage
Use with any input plugins that have `parse` directive:
```
# fluentd.conf@type tail
path *.txt
read_from_head true
tag claymore.data
@type claymore
# zero configuration 🎉
@type stdout
```
Demo configuration and sample data are available in [example](./example).
```console
cd example
fluentd -c fluentd.conf
```A production configuration which uses InfluxDB to store time series may look like:
```
@type tail
path path/to/claymore/*_log.txt
pos_file path/to/pos.pos
refresh_interval 5
tag claymore.data
@type claymore
# re-tag events to use tag names as InfluxDB measurements
@type rewrite_tag_filter
key type
pattern GPU_HASH_RATE
tag claymore.data.hash_rate
key type
pattern GPU_SHARE_FOUND
tag claymore.data.share_found
key type
pattern GPU_TEMP
tag claymore.data.temperature
@type copy
@type stdout
@type influxdb
host influxdb
port 8086
dbname claymore
# uses fluentd tag when measurement not specified
# measurement xxx
time_precision ms
auto_tags false
tag_keys ["asset", "gpu", "hostname", "type"]
sequence_tag _seq
flush_interval 1
```
## Events/Metrics
```json
[
{ "type": "GPU_HASH_RATE", "asset": "SC", "gpu": 1, "hash_rate": 300.583 },
{ "type": "GPU_SHARE_FOUND", "asset": "SC", "gpu": 1, "count": 1 },
{ "type": "TOTAL_HASH_RATE", "asset": "ETH", "hash_rate": 83.153 },
{ "type": "GPU_TEMP", "gpu": 1, "temperature": 47, "old_fan": 0, "new_fan": 75 },
{ "type": "CONNECTION_LOST", "asset": "SC", "count": 1 }
]
```## Caveats
- The parser plugin only works with `input` plugins, not
`filter` plugins. This is because `filter` plugins are unable to yield
multiple results unlike `input`.- The claymore logs timestamps is ignored since it excludes the date. Instead
the timestamp when the line is read is used.