lex-influxdb 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +7 -0
- data/.github/dependabot.yml +18 -0
- data/.github/workflows/ci.yml +34 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +37 -17
- data/CHANGELOG.md +30 -0
- data/CLAUDE.md +77 -0
- data/Gemfile +5 -1
- data/LICENSE +201 -0
- data/README.md +38 -21
- data/legion-extensions-influxdb.gemspec +12 -9
- data/lib/legion/extensions/influxdb/client.rb +29 -0
- data/lib/legion/extensions/influxdb/helpers/client.rb +11 -12
- data/lib/legion/extensions/influxdb/runners/cluster.rb +12 -6
- data/lib/legion/extensions/influxdb/runners/continuous_query.rb +17 -11
- data/lib/legion/extensions/influxdb/runners/database.rb +31 -24
- data/lib/legion/extensions/influxdb/runners/measurement.rb +11 -5
- data/lib/legion/extensions/influxdb/runners/retention_policy.rb +19 -13
- data/lib/legion/extensions/influxdb/runners/series.rb +9 -3
- data/lib/legion/extensions/influxdb/runners/user.rb +15 -9
- data/lib/legion/extensions/influxdb/runners/writer.rb +34 -18
- data/lib/legion/extensions/influxdb/version.rb +3 -1
- data/lib/legion/extensions/influxdb.rb +13 -2
- metadata +64 -32
- data/Gemfile.lock +0 -135
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 28e1b1bd68fe8be1b17daf305654eb7b1bd76c7b479b716e534c867b83279c55
|
|
4
|
+
data.tar.gz: 5133cddd38b82f94c2894f64141e2965d9bbc2e02562672a37701e38c33ea506
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9753c32d2b20999e38de579deb7ce6c231d8c28d5c8239748180ed498ecb09ebd7904b4da10eb89147510201233429e94391f2ce093d577575132677dce64d29
|
|
7
|
+
data.tar.gz: 1f2b5482e0c769782e2d7b378b6877e20411a7678901a4973dfadedad8a387402315827b89424e955ad487b4b8b2670df2e239c19277eda8a6f777ac47a8088d
|
data/.github/CODEOWNERS
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: bundler
|
|
4
|
+
directory: /
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
day: monday
|
|
8
|
+
open-pull-requests-limit: 5
|
|
9
|
+
labels:
|
|
10
|
+
- "type:dependencies"
|
|
11
|
+
- package-ecosystem: github-actions
|
|
12
|
+
directory: /
|
|
13
|
+
schedule:
|
|
14
|
+
interval: weekly
|
|
15
|
+
day: monday
|
|
16
|
+
open-pull-requests-limit: 5
|
|
17
|
+
labels:
|
|
18
|
+
- "type:dependencies"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
schedule:
|
|
7
|
+
- cron: '0 9 * * 1'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
ci:
|
|
11
|
+
uses: LegionIO/.github/.github/workflows/ci.yml@main
|
|
12
|
+
|
|
13
|
+
lint:
|
|
14
|
+
uses: LegionIO/.github/.github/workflows/lint-patterns.yml@main
|
|
15
|
+
|
|
16
|
+
security:
|
|
17
|
+
uses: LegionIO/.github/.github/workflows/security-scan.yml@main
|
|
18
|
+
|
|
19
|
+
version-changelog:
|
|
20
|
+
uses: LegionIO/.github/.github/workflows/version-changelog.yml@main
|
|
21
|
+
|
|
22
|
+
dependency-review:
|
|
23
|
+
uses: LegionIO/.github/.github/workflows/dependency-review.yml@main
|
|
24
|
+
|
|
25
|
+
stale:
|
|
26
|
+
if: github.event_name == 'schedule'
|
|
27
|
+
uses: LegionIO/.github/.github/workflows/stale.yml@main
|
|
28
|
+
|
|
29
|
+
release:
|
|
30
|
+
needs: [ci, lint]
|
|
31
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
32
|
+
uses: LegionIO/.github/.github/workflows/release.yml@main
|
|
33
|
+
secrets:
|
|
34
|
+
rubygems-api-key: ${{ secrets.RUBYGEMS_API_KEY }}
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,28 +1,48 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 3.4
|
|
3
|
+
NewCops: enable
|
|
4
|
+
SuggestExtensions: false
|
|
5
|
+
|
|
1
6
|
Layout/LineLength:
|
|
2
|
-
Max:
|
|
3
|
-
|
|
4
|
-
Max: 30
|
|
5
|
-
Metrics/ClassLength:
|
|
6
|
-
Max: 1500
|
|
7
|
-
Metrics/BlockLength:
|
|
8
|
-
Max: 50
|
|
9
|
-
Metrics/ParameterLists:
|
|
10
|
-
Max: 10
|
|
7
|
+
Max: 160
|
|
8
|
+
|
|
11
9
|
Layout/SpaceAroundEqualsInParameterDefault:
|
|
12
10
|
EnforcedStyle: space
|
|
13
|
-
|
|
14
|
-
Enabled: true
|
|
11
|
+
|
|
15
12
|
Layout/HashAlignment:
|
|
16
13
|
EnforcedHashRocketStyle: table
|
|
17
14
|
EnforcedColonStyle: table
|
|
15
|
+
|
|
16
|
+
Metrics/MethodLength:
|
|
17
|
+
Max: 50
|
|
18
|
+
|
|
19
|
+
Metrics/ClassLength:
|
|
20
|
+
Max: 1500
|
|
21
|
+
|
|
22
|
+
Metrics/ModuleLength:
|
|
23
|
+
Max: 1500
|
|
24
|
+
|
|
25
|
+
Metrics/BlockLength:
|
|
26
|
+
Max: 40
|
|
27
|
+
|
|
28
|
+
Metrics/AbcSize:
|
|
29
|
+
Max: 60
|
|
30
|
+
|
|
31
|
+
Metrics/CyclomaticComplexity:
|
|
32
|
+
Max: 15
|
|
33
|
+
|
|
34
|
+
Metrics/PerceivedComplexity:
|
|
35
|
+
Max: 17
|
|
36
|
+
|
|
18
37
|
Style/Documentation:
|
|
19
38
|
Enabled: false
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
39
|
+
|
|
40
|
+
Style/SymbolArray:
|
|
41
|
+
Enabled: true
|
|
42
|
+
|
|
23
43
|
Style/FrozenStringLiteralComment:
|
|
24
|
-
Enabled:
|
|
44
|
+
Enabled: true
|
|
45
|
+
EnforcedStyle: always
|
|
46
|
+
|
|
25
47
|
Naming/FileName:
|
|
26
48
|
Enabled: false
|
|
27
|
-
Style/ClassAndModuleChildren:
|
|
28
|
-
Enabled: false
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.1] - 2026-03-22
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Add legion-cache, legion-crypt, legion-data, legion-json, legion-logging, legion-settings, legion-transport as runtime dependencies
|
|
7
|
+
- Replace direct Legion::Logging calls with injected log helper in Runners::Database
|
|
8
|
+
- Replace direct Legion::JSON.load call with json_load helper in Runners::Writer
|
|
9
|
+
- Update spec_helper with real sub-gem helper stubs
|
|
10
|
+
|
|
11
|
+
## [0.2.0] - 2026-03-15
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Standalone `Client` class that includes all runners and delegates to `Helpers::Client`
|
|
15
|
+
- Specs for `Helpers::Client` and `Client` class
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- `Helpers::Client#client` is now configurable via `host:`, `port:`, and `database:` kwargs
|
|
19
|
+
- `Runners::Writer` now uses `Helpers::Client.client` instead of constructing `InfluxDB::Client` inline
|
|
20
|
+
- `write` runner now accepts `series:` and `data:` and actually writes the data point
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Removed hardcoded `esphome` database name from `Helpers::Client`
|
|
24
|
+
- Removed hardcoded `influx.home.whonodes.org` hostname from `Helpers::Client`
|
|
25
|
+
- Fixed `InfluxBD` typo (was never a valid constant reference)
|
|
26
|
+
|
|
27
|
+
## [0.1.2] - 2026-03-13
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- Initial release
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# lex-influxdb: InfluxDB Integration for LegionIO
|
|
2
|
+
|
|
3
|
+
**Repository Level 3 Documentation**
|
|
4
|
+
- **Parent**: `/Users/miverso2/rubymine/legion/extensions-other/CLAUDE.md`
|
|
5
|
+
- **Grandparent**: `/Users/miverso2/rubymine/legion/CLAUDE.md`
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Legion Extension that connects LegionIO to InfluxDB time-series databases. Provides runners for writing data, managing databases, users, retention policies, continuous queries, measurements, series, and cluster info.
|
|
10
|
+
|
|
11
|
+
**GitHub**: https://github.com/LegionIO/lex-influxdb
|
|
12
|
+
**License**: MIT
|
|
13
|
+
**Version**: 0.2.1
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Legion::Extensions::Influxdb
|
|
19
|
+
├── Client # Standalone client class (includes all runners)
|
|
20
|
+
├── Runners/
|
|
21
|
+
│ ├── Writer # Write data points
|
|
22
|
+
│ ├── Database # Database CRUD
|
|
23
|
+
│ ├── User # User management
|
|
24
|
+
│ ├── RetentionPolicy # Retention policy management
|
|
25
|
+
│ ├── ContinuousQuery # Continuous query management
|
|
26
|
+
│ ├── Measurement # Measurement queries
|
|
27
|
+
│ ├── Series # Series queries
|
|
28
|
+
│ └── Cluster # Cluster info
|
|
29
|
+
└── Helpers/
|
|
30
|
+
└── Client # InfluxDB client factory (host: localhost, port: 8086)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Standalone Usage
|
|
34
|
+
|
|
35
|
+
`Legion::Extensions::Influxdb::Client` provides direct access to all runners without the Legion runtime:
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
client = Legion::Extensions::Influxdb::Client.new(host: 'influx.example.com', database: 'mydb')
|
|
39
|
+
client.write_data(...)
|
|
40
|
+
client.list_databases
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Constructor accepts `host:` (default `'localhost'`), `port:` (default `8086`), `database:` (default `nil`), and any extra kwargs passed through to `InfluxDB::Client`.
|
|
44
|
+
|
|
45
|
+
## Key Files
|
|
46
|
+
|
|
47
|
+
| Path | Purpose |
|
|
48
|
+
|------|---------|
|
|
49
|
+
| `lib/legion/extensions/influxdb.rb` | Entry point, extension registration |
|
|
50
|
+
| `lib/legion/extensions/influxdb/client.rb` | Standalone client class, includes all runners |
|
|
51
|
+
| `lib/legion/extensions/influxdb/helpers/client.rb` | InfluxDB client factory (`module_function`; configurable host/port/database) |
|
|
52
|
+
| `lib/legion/extensions/influxdb/runners/` | All runners |
|
|
53
|
+
|
|
54
|
+
## Dependencies
|
|
55
|
+
|
|
56
|
+
| Gem | Purpose |
|
|
57
|
+
|-----|---------|
|
|
58
|
+
| `influxdb` | InfluxDB Ruby client |
|
|
59
|
+
|
|
60
|
+
## Version Notes
|
|
61
|
+
|
|
62
|
+
- v0.2.1: Added Legion sub-gems as runtime dependencies; replaced direct Legion::Logging/Legion::JSON calls with injected helpers in runners.
|
|
63
|
+
- v0.2.0: Fixed hardcoded hostname and database name in `Helpers::Client`. Both now configurable kwargs with safe defaults. Standalone `Client` class added.
|
|
64
|
+
|
|
65
|
+
## Development
|
|
66
|
+
|
|
67
|
+
14 specs total. Note: the gemspec file is named `legion-extensions-influxdb.gemspec` (legacy naming) but the gem name is `lex-influxdb`.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
bundle install
|
|
71
|
+
bundle exec rspec
|
|
72
|
+
bundle exec rubocop
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
**Maintained By**: Matthew Iverson (@Esity)
|
data/Gemfile
CHANGED
data/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2021 Esity
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
data/README.md
CHANGED
|
@@ -1,38 +1,55 @@
|
|
|
1
|
-
#
|
|
1
|
+
# lex-influxdb
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
InfluxDB integration for [LegionIO](https://github.com/LegionIO/LegionIO). Read, write, and manage InfluxDB time-series databases.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
gem install lex-influxdb
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or add to your Gemfile:
|
|
8
12
|
|
|
9
13
|
```ruby
|
|
10
14
|
gem 'lex-influxdb'
|
|
11
15
|
```
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
## Standalone Usage
|
|
14
18
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Or install it yourself as:
|
|
19
|
+
```ruby
|
|
20
|
+
require 'legion/extensions/influxdb'
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
client = Legion::Extensions::Influxdb::Client.new(
|
|
23
|
+
host: 'influx.example.com',
|
|
24
|
+
port: 8086,
|
|
25
|
+
database: 'mydb'
|
|
26
|
+
)
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"extensions": {
|
|
26
|
-
"influxdb": {
|
|
27
|
-
"enabled": true, "workers": 1
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
28
|
+
client.list_databases
|
|
29
|
+
client.write_data(series: 'cpu', values: { value: 0.5 })
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
Constructor accepts `host:` (default `'localhost'`), `port:` (default `8086`), `database:` (default `nil`), and any extra kwargs passed through to `InfluxDB::Client`.
|
|
33
|
+
|
|
34
|
+
## Runners
|
|
35
|
+
|
|
36
|
+
| Runner | Operations |
|
|
37
|
+
|--------|-----------|
|
|
38
|
+
| Writer | Write data points |
|
|
39
|
+
| Database | Database CRUD |
|
|
40
|
+
| User | User management |
|
|
41
|
+
| RetentionPolicy | Retention policy management |
|
|
42
|
+
| ContinuousQuery | Continuous query management |
|
|
43
|
+
| Measurement | Measurement queries |
|
|
44
|
+
| Series | Series queries |
|
|
45
|
+
| Cluster | Cluster info |
|
|
46
|
+
|
|
47
|
+
## Requirements
|
|
48
|
+
|
|
49
|
+
- Ruby >= 3.4
|
|
50
|
+
- InfluxDB server (default: localhost:8086)
|
|
51
|
+
- [LegionIO](https://github.com/LegionIO/LegionIO) framework (optional for standalone client)
|
|
35
52
|
|
|
36
53
|
## License
|
|
37
54
|
|
|
38
|
-
|
|
55
|
+
MIT
|
|
@@ -10,13 +10,14 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
|
|
11
11
|
spec.summary = 'LEX::Influxdb'
|
|
12
12
|
spec.description = 'Used to connect Legion to influxdb'
|
|
13
|
-
spec.homepage = 'https://
|
|
13
|
+
spec.homepage = 'https://github.com/LegionIO/lex-influxdb'
|
|
14
14
|
spec.license = 'MIT'
|
|
15
|
-
spec.required_ruby_version =
|
|
15
|
+
spec.required_ruby_version = '>= 3.4'
|
|
16
16
|
|
|
17
17
|
spec.metadata['homepage_uri'] = spec.homepage
|
|
18
|
-
spec.metadata['source_code_uri'] = 'https://
|
|
19
|
-
spec.metadata['changelog_uri'] = 'https://
|
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/LegionIO/lex-influxdb'
|
|
19
|
+
spec.metadata['changelog_uri'] = 'https://github.com/LegionIO/lex-influxdb/blob/main/CHANGELOG.md'
|
|
20
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
20
21
|
|
|
21
22
|
# Specify which files should be added to the gem when it is released.
|
|
22
23
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -27,9 +28,11 @@ Gem::Specification.new do |spec|
|
|
|
27
28
|
spec.require_paths = ['lib']
|
|
28
29
|
|
|
29
30
|
spec.add_dependency 'influxdb'
|
|
30
|
-
spec.
|
|
31
|
-
spec.
|
|
32
|
-
spec.
|
|
33
|
-
spec.
|
|
34
|
-
spec.
|
|
31
|
+
spec.add_dependency 'legion-cache', '>= 1.3.11'
|
|
32
|
+
spec.add_dependency 'legion-crypt', '>= 1.4.9'
|
|
33
|
+
spec.add_dependency 'legion-data', '>= 1.4.17'
|
|
34
|
+
spec.add_dependency 'legion-json', '>= 1.2.1'
|
|
35
|
+
spec.add_dependency 'legion-logging', '>= 1.3.2'
|
|
36
|
+
spec.add_dependency 'legion-settings', '>= 1.3.14'
|
|
37
|
+
spec.add_dependency 'legion-transport', '>= 1.3.9'
|
|
35
38
|
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
class Client
|
|
7
|
+
include Helpers::Client
|
|
8
|
+
include Runners::Writer
|
|
9
|
+
include Runners::Database
|
|
10
|
+
include Runners::User
|
|
11
|
+
include Runners::RetentionPolicy
|
|
12
|
+
include Runners::ContinuousQuery
|
|
13
|
+
include Runners::Measurement
|
|
14
|
+
include Runners::Series
|
|
15
|
+
include Runners::Cluster
|
|
16
|
+
|
|
17
|
+
attr_reader :opts
|
|
18
|
+
|
|
19
|
+
def initialize(host: 'localhost', port: 8086, database: nil, **extra)
|
|
20
|
+
@opts = { host: host, port: port, database: database, **extra }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def client(**override)
|
|
24
|
+
Helpers::Client.client(**@opts, **override)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
module Helpers
|
|
3
|
-
module Client
|
|
4
|
-
def client(**_opts)
|
|
5
|
-
# @client ||= InfluxBD::Client.new
|
|
6
|
-
@client ||= InfluxBD::Client.new('esphome', { host: 'influx.home.whonodes.org', async: false })
|
|
7
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Helpers
|
|
7
|
+
module Client
|
|
8
|
+
module_function
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
def client(host: 'localhost', port: 8086, database: nil, **)
|
|
11
|
+
InfluxDB::Client.new(database, host: host, port: port, async: false, **)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
15
14
|
end
|
|
16
15
|
end
|
|
17
16
|
end
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module Cluster
|
|
4
|
-
def self.create(payload); end
|
|
1
|
+
# frozen_string_literal: true
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module Cluster
|
|
8
|
+
def self.create(payload); end
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
def self.list(payload = {}); end
|
|
11
|
+
|
|
12
|
+
def self.revoke(payload); end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
9
15
|
end
|
|
10
16
|
end
|
|
11
17
|
end
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module ContinuousQuery
|
|
4
|
-
def self.list(host: 'localhost', port: 8086, **_payload)
|
|
5
|
-
client = InfluxDB::Client.new(host: host, port: port)
|
|
6
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
7
2
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module ContinuousQuery
|
|
8
|
+
def self.list(host: 'localhost', port: 8086, **_payload)
|
|
9
|
+
InfluxDB::Client.new(host: host, port: port)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.create(_name:, host: 'localhost', port: 8086, **_payload)
|
|
13
|
+
InfluxDB::Client.new(host: host, port: port)
|
|
14
|
+
end
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
def self.delete(_name:, host: 'localhost', port: 8086, **_payload)
|
|
17
|
+
InfluxDB::Client.new(host: host, port: port)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
14
20
|
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module Database
|
|
4
|
-
def self.create(name:, host: 'localhost', port: 8086, **payload)
|
|
5
|
-
# client = InfluxDB::Client.new(host: host, port: port)
|
|
6
|
-
require 'influxdb'
|
|
7
|
-
client = InfluxDB::Client.new
|
|
8
|
-
Legion::Logging.unknown({ name: name, host: host, port: port, **payload })
|
|
9
|
-
Legion::Logging.fatal client.create_database(name)
|
|
10
|
-
{ name: name, host: host, port: port, **payload }
|
|
11
|
-
rescue StandardError => e
|
|
12
|
-
Legion::Logging.error e.message
|
|
13
|
-
Legion::Logging.error e.backtrace
|
|
14
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
15
2
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module Database
|
|
8
|
+
include Legion::Extensions::Helpers::Lex
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
def self.create(name:, host: 'localhost', port: 8086, **payload)
|
|
11
|
+
require 'influxdb'
|
|
12
|
+
client = InfluxDB::Client.new
|
|
13
|
+
log.info({ name: name, host: host, port: port, **payload })
|
|
14
|
+
log.fatal client.create_database(name)
|
|
15
|
+
{ name: name, host: host, port: port, **payload }
|
|
16
|
+
rescue StandardError => e
|
|
17
|
+
log.error e.message
|
|
18
|
+
log.error e.backtrace
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def self.delete(_name:, _host: 'localhost', _port: 8086, **payload)
|
|
22
|
+
client = InfluxDB::Client.new(host: payload[:host])
|
|
23
|
+
client.delete_database(payload[:name])
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.list(_host: 'localhost', _port: 8086, **payload)
|
|
27
|
+
InfluxDB::Client.new(host: payload[:host]).list_databases
|
|
28
|
+
end
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
def self.field_keys(database: 'telegraf', _host: 'localhost', port: 8086, **payload)
|
|
31
|
+
client = InfluxDB::Client.new(host: payload[:host], port: port, database: database)
|
|
32
|
+
{ results: client.show_field_keys, count: client.show_field_keys.count }
|
|
33
|
+
end
|
|
34
|
+
end
|
|
28
35
|
end
|
|
29
36
|
end
|
|
30
37
|
end
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module Measurement
|
|
4
|
-
def self.list(payload); end
|
|
1
|
+
# frozen_string_literal: true
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module Measurement
|
|
8
|
+
def self.list(payload); end
|
|
9
|
+
|
|
10
|
+
def self.delete(payload); end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
7
13
|
end
|
|
8
14
|
end
|
|
9
15
|
end
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module RetentionPolicy
|
|
4
|
-
include Legion::Extensions::Helpers::Lex
|
|
5
|
-
extend Legion::Extensions::Influxdb::Helpers::Client
|
|
1
|
+
# frozen_string_literal: true
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module RetentionPolicy
|
|
8
|
+
include Legion::Extensions::Helpers::Lex
|
|
9
|
+
extend Legion::Extensions::Influxdb::Helpers::Client
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
def create(database:, _host: 'localhost', _port: 8086, **payload)
|
|
12
|
+
InfluxDB::Client.new(host: payload[:host]).list_retention_policies(database)
|
|
13
|
+
end
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
def list(database:, _host: 'localhost', _port: 8086, **payload)
|
|
16
|
+
InfluxDB::Client.new(host: payload[:host]).list_retention_policies(database)
|
|
17
|
+
end
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
def self.delete(payload); end
|
|
20
|
+
|
|
21
|
+
def self.alter(payload); end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
18
24
|
end
|
|
19
25
|
end
|
|
20
26
|
end
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module User
|
|
4
|
-
def self.create(payload); end
|
|
1
|
+
# frozen_string_literal: true
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module User
|
|
8
|
+
def self.create(payload); end
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
def self.update_password(payload); end
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
def self.grant_user_admin_privileges(payload); end
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
def self.grant_user_privileges(payload); end
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
def self.delete(payload); end
|
|
17
|
+
|
|
18
|
+
def self.list(payload); end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
17
23
|
end
|
|
@@ -1,24 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
module Runners
|
|
3
|
-
module Writer
|
|
4
|
-
def self.write(series:, tags:, values:, host: 'localhost', port: 8086, database:, **_opts)
|
|
5
|
-
client = InfluxDB::Client.new(database, host: host, port: port)
|
|
6
|
-
{}
|
|
7
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Influxdb
|
|
6
|
+
module Runners
|
|
7
|
+
module Writer
|
|
8
|
+
def self.write(series:, data:, database:, **opts)
|
|
9
|
+
host = opts.fetch(:host, 'localhost')
|
|
10
|
+
port = opts.fetch(:port, 8086)
|
|
11
|
+
time_precision = opts.fetch(:time_precision, 's')
|
|
12
|
+
extra = opts.except(:host, :port, :time_precision)
|
|
13
|
+
c = Helpers::Client.client(host: host, port: port, database: database, **extra)
|
|
14
|
+
c.write_point(series, data, time_precision)
|
|
15
|
+
{}
|
|
16
|
+
end
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
def self.write_points(metrics:, **opts)
|
|
19
|
+
database = opts.fetch(:database, 'telegraf')
|
|
20
|
+
host = opts.fetch(:host, 'localhost')
|
|
21
|
+
port = opts.fetch(:port, 8086)
|
|
22
|
+
time_precision = opts.fetch(:time_precision, 'ms')
|
|
23
|
+
extra = opts.except(:database, :host, :port, :time_precision)
|
|
24
|
+
metrics = json_load(metrics) if metrics.is_a?(String)
|
|
25
|
+
if metrics[:timestamp].nil?
|
|
26
|
+
metrics[:timestamp] = Time.now.to_i
|
|
27
|
+
time_precision = 's'
|
|
28
|
+
end
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
c = Helpers::Client.client(host: host, port: port, database: database, **extra)
|
|
31
|
+
c.write_point('sensors', metrics, time_precision)
|
|
32
|
+
{}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
include Legion::Extensions::Helpers::Lex
|
|
36
|
+
end
|
|
37
|
+
end
|
|
22
38
|
end
|
|
23
39
|
end
|
|
24
40
|
end
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'legion/extensions/influxdb/version'
|
|
2
|
-
require 'legion/extensions'
|
|
3
4
|
require 'influxdb'
|
|
5
|
+
require 'legion/extensions/influxdb/helpers/client'
|
|
6
|
+
require 'legion/extensions/influxdb/runners/writer'
|
|
7
|
+
require 'legion/extensions/influxdb/runners/database'
|
|
8
|
+
require 'legion/extensions/influxdb/runners/user'
|
|
9
|
+
require 'legion/extensions/influxdb/runners/retention_policy'
|
|
10
|
+
require 'legion/extensions/influxdb/runners/continuous_query'
|
|
11
|
+
require 'legion/extensions/influxdb/runners/measurement'
|
|
12
|
+
require 'legion/extensions/influxdb/runners/series'
|
|
13
|
+
require 'legion/extensions/influxdb/runners/cluster'
|
|
14
|
+
require 'legion/extensions/influxdb/client'
|
|
4
15
|
|
|
5
16
|
module Legion
|
|
6
17
|
module Extensions
|
|
7
18
|
module Influxdb
|
|
8
|
-
extend Legion::Extensions::Core
|
|
19
|
+
extend Legion::Extensions::Core if Legion::Extensions.const_defined?(:Core)
|
|
9
20
|
end
|
|
10
21
|
end
|
|
11
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lex-influxdb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esity
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: influxdb
|
|
@@ -25,75 +24,103 @@ dependencies:
|
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
27
|
+
name: legion-cache
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
34
|
-
type: :
|
|
32
|
+
version: 1.3.11
|
|
33
|
+
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
39
|
+
version: 1.3.11
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
41
|
+
name: legion-crypt
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - ">="
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
48
|
-
type: :
|
|
46
|
+
version: 1.4.9
|
|
47
|
+
type: :runtime
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
51
|
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
53
|
+
version: 1.4.9
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
55
|
+
name: legion-data
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
58
|
- - ">="
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
62
|
-
type: :
|
|
60
|
+
version: 1.4.17
|
|
61
|
+
type: :runtime
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
65
|
- - ">="
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
67
|
+
version: 1.4.17
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
69
|
+
name: legion-json
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
72
71
|
requirements:
|
|
73
72
|
- - ">="
|
|
74
73
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
76
|
-
type: :
|
|
74
|
+
version: 1.2.1
|
|
75
|
+
type: :runtime
|
|
77
76
|
prerelease: false
|
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
78
|
requirements:
|
|
80
79
|
- - ">="
|
|
81
80
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
81
|
+
version: 1.2.1
|
|
83
82
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
83
|
+
name: legion-logging
|
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
|
86
85
|
requirements:
|
|
87
86
|
- - ">="
|
|
88
87
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
90
|
-
type: :
|
|
88
|
+
version: 1.3.2
|
|
89
|
+
type: :runtime
|
|
91
90
|
prerelease: false
|
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
92
|
requirements:
|
|
94
93
|
- - ">="
|
|
95
94
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
95
|
+
version: 1.3.2
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: legion-settings
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - ">="
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: 1.3.14
|
|
103
|
+
type: :runtime
|
|
104
|
+
prerelease: false
|
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
106
|
+
requirements:
|
|
107
|
+
- - ">="
|
|
108
|
+
- !ruby/object:Gem::Version
|
|
109
|
+
version: 1.3.14
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: legion-transport
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - ">="
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: 1.3.9
|
|
117
|
+
type: :runtime
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: 1.3.9
|
|
97
124
|
description: Used to connect Legion to influxdb
|
|
98
125
|
email:
|
|
99
126
|
- matthewdiverson@gmail.com
|
|
@@ -102,11 +129,16 @@ extensions: []
|
|
|
102
129
|
extra_rdoc_files: []
|
|
103
130
|
files:
|
|
104
131
|
- ".circleci/config.yml"
|
|
132
|
+
- ".github/CODEOWNERS"
|
|
133
|
+
- ".github/dependabot.yml"
|
|
134
|
+
- ".github/workflows/ci.yml"
|
|
105
135
|
- ".gitignore"
|
|
106
136
|
- ".rspec"
|
|
107
137
|
- ".rubocop.yml"
|
|
138
|
+
- CHANGELOG.md
|
|
139
|
+
- CLAUDE.md
|
|
108
140
|
- Gemfile
|
|
109
|
-
-
|
|
141
|
+
- LICENSE
|
|
110
142
|
- LICENSE.txt
|
|
111
143
|
- README.md
|
|
112
144
|
- Rakefile
|
|
@@ -114,6 +146,7 @@ files:
|
|
|
114
146
|
- bin/setup
|
|
115
147
|
- legion-extensions-influxdb.gemspec
|
|
116
148
|
- lib/legion/extensions/influxdb.rb
|
|
149
|
+
- lib/legion/extensions/influxdb/client.rb
|
|
117
150
|
- lib/legion/extensions/influxdb/helpers/client.rb
|
|
118
151
|
- lib/legion/extensions/influxdb/runners/cluster.rb
|
|
119
152
|
- lib/legion/extensions/influxdb/runners/continuous_query.rb
|
|
@@ -124,14 +157,14 @@ files:
|
|
|
124
157
|
- lib/legion/extensions/influxdb/runners/user.rb
|
|
125
158
|
- lib/legion/extensions/influxdb/runners/writer.rb
|
|
126
159
|
- lib/legion/extensions/influxdb/version.rb
|
|
127
|
-
homepage: https://
|
|
160
|
+
homepage: https://github.com/LegionIO/lex-influxdb
|
|
128
161
|
licenses:
|
|
129
162
|
- MIT
|
|
130
163
|
metadata:
|
|
131
|
-
homepage_uri: https://
|
|
132
|
-
source_code_uri: https://
|
|
133
|
-
changelog_uri: https://
|
|
134
|
-
|
|
164
|
+
homepage_uri: https://github.com/LegionIO/lex-influxdb
|
|
165
|
+
source_code_uri: https://github.com/LegionIO/lex-influxdb
|
|
166
|
+
changelog_uri: https://github.com/LegionIO/lex-influxdb/blob/main/CHANGELOG.md
|
|
167
|
+
rubygems_mfa_required: 'true'
|
|
135
168
|
rdoc_options: []
|
|
136
169
|
require_paths:
|
|
137
170
|
- lib
|
|
@@ -139,15 +172,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
139
172
|
requirements:
|
|
140
173
|
- - ">="
|
|
141
174
|
- !ruby/object:Gem::Version
|
|
142
|
-
version:
|
|
175
|
+
version: '3.4'
|
|
143
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
177
|
requirements:
|
|
145
178
|
- - ">="
|
|
146
179
|
- !ruby/object:Gem::Version
|
|
147
180
|
version: '0'
|
|
148
181
|
requirements: []
|
|
149
|
-
rubygems_version: 3.
|
|
150
|
-
signing_key:
|
|
182
|
+
rubygems_version: 3.6.9
|
|
151
183
|
specification_version: 4
|
|
152
184
|
summary: LEX::Influxdb
|
|
153
185
|
test_files: []
|
data/Gemfile.lock
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
lex-influxdb (0.1.2)
|
|
5
|
-
influxdb
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
amq-protocol (2.3.2)
|
|
11
|
-
ast (2.4.1)
|
|
12
|
-
aws-eventstream (1.1.0)
|
|
13
|
-
aws-sigv4 (1.2.2)
|
|
14
|
-
aws-eventstream (~> 1, >= 1.0.2)
|
|
15
|
-
bunny (2.16.1)
|
|
16
|
-
amq-protocol (~> 2.3, >= 2.3.1)
|
|
17
|
-
concurrent-ruby (1.1.7)
|
|
18
|
-
concurrent-ruby-ext (1.1.7)
|
|
19
|
-
concurrent-ruby (= 1.1.7)
|
|
20
|
-
connection_pool (2.2.3)
|
|
21
|
-
daemons (1.3.1)
|
|
22
|
-
dalli (2.7.10)
|
|
23
|
-
diff-lcs (1.4.4)
|
|
24
|
-
docile (1.3.2)
|
|
25
|
-
faraday (1.0.1)
|
|
26
|
-
multipart-post (>= 1.2, < 3)
|
|
27
|
-
faraday_middleware (1.0.0)
|
|
28
|
-
faraday (~> 1.0)
|
|
29
|
-
ffi (1.13.1)
|
|
30
|
-
hashdiff (1.0.1)
|
|
31
|
-
influxdb (0.8.0)
|
|
32
|
-
legion-cache (1.0.0)
|
|
33
|
-
connection_pool
|
|
34
|
-
dalli
|
|
35
|
-
redis
|
|
36
|
-
legion-crypt (0.2.0)
|
|
37
|
-
rbnacl
|
|
38
|
-
vault
|
|
39
|
-
legion-data (0.2.0)
|
|
40
|
-
legion-logging
|
|
41
|
-
legion-settings
|
|
42
|
-
mysql2
|
|
43
|
-
sequel
|
|
44
|
-
legion-exceptions (1.1.0)
|
|
45
|
-
legion-json (1.1.0)
|
|
46
|
-
multi_json
|
|
47
|
-
legion-logging (1.1.0)
|
|
48
|
-
rainbow (~> 3)
|
|
49
|
-
legion-settings (1.1.1)
|
|
50
|
-
legion-json
|
|
51
|
-
legion-logging
|
|
52
|
-
legion-transport (1.1.1)
|
|
53
|
-
bunny
|
|
54
|
-
concurrent-ruby
|
|
55
|
-
legionio (0.2.0)
|
|
56
|
-
concurrent-ruby
|
|
57
|
-
concurrent-ruby-ext
|
|
58
|
-
daemons
|
|
59
|
-
hashdiff
|
|
60
|
-
legion-cache
|
|
61
|
-
legion-crypt
|
|
62
|
-
legion-data
|
|
63
|
-
legion-exceptions
|
|
64
|
-
legion-json
|
|
65
|
-
legion-logging
|
|
66
|
-
legion-settings
|
|
67
|
-
legion-transport
|
|
68
|
-
sleepiq
|
|
69
|
-
vault
|
|
70
|
-
multi_json (1.15.0)
|
|
71
|
-
multipart-post (2.1.1)
|
|
72
|
-
mysql2 (0.5.3)
|
|
73
|
-
parallel (1.19.2)
|
|
74
|
-
parser (2.7.1.4)
|
|
75
|
-
ast (~> 2.4.1)
|
|
76
|
-
rainbow (3.0.0)
|
|
77
|
-
rake (13.0.1)
|
|
78
|
-
rbnacl (7.1.1)
|
|
79
|
-
ffi
|
|
80
|
-
redis (4.2.1)
|
|
81
|
-
regexp_parser (1.7.1)
|
|
82
|
-
rexml (3.2.4)
|
|
83
|
-
rspec (3.9.0)
|
|
84
|
-
rspec-core (~> 3.9.0)
|
|
85
|
-
rspec-expectations (~> 3.9.0)
|
|
86
|
-
rspec-mocks (~> 3.9.0)
|
|
87
|
-
rspec-core (3.9.2)
|
|
88
|
-
rspec-support (~> 3.9.3)
|
|
89
|
-
rspec-expectations (3.9.2)
|
|
90
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
91
|
-
rspec-support (~> 3.9.0)
|
|
92
|
-
rspec-mocks (3.9.1)
|
|
93
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
94
|
-
rspec-support (~> 3.9.0)
|
|
95
|
-
rspec-support (3.9.3)
|
|
96
|
-
rubocop (0.89.1)
|
|
97
|
-
parallel (~> 1.10)
|
|
98
|
-
parser (>= 2.7.1.1)
|
|
99
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
100
|
-
regexp_parser (>= 1.7)
|
|
101
|
-
rexml
|
|
102
|
-
rubocop-ast (>= 0.3.0, < 1.0)
|
|
103
|
-
ruby-progressbar (~> 1.7)
|
|
104
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
|
105
|
-
rubocop-ast (0.3.0)
|
|
106
|
-
parser (>= 2.7.1.4)
|
|
107
|
-
ruby-progressbar (1.10.1)
|
|
108
|
-
sequel (5.35.0)
|
|
109
|
-
simplecov (0.19.0)
|
|
110
|
-
docile (~> 1.1)
|
|
111
|
-
simplecov-html (~> 0.11)
|
|
112
|
-
simplecov-html (0.12.2)
|
|
113
|
-
sleepiq (0.2.2)
|
|
114
|
-
dalli
|
|
115
|
-
faraday
|
|
116
|
-
faraday_middleware
|
|
117
|
-
thor
|
|
118
|
-
thor (1.0.1)
|
|
119
|
-
unicode-display_width (1.7.0)
|
|
120
|
-
vault (0.15.0)
|
|
121
|
-
aws-sigv4
|
|
122
|
-
|
|
123
|
-
PLATFORMS
|
|
124
|
-
ruby
|
|
125
|
-
|
|
126
|
-
DEPENDENCIES
|
|
127
|
-
legionio
|
|
128
|
-
lex-influxdb!
|
|
129
|
-
rake
|
|
130
|
-
rspec
|
|
131
|
-
rubocop
|
|
132
|
-
simplecov
|
|
133
|
-
|
|
134
|
-
BUNDLED WITH
|
|
135
|
-
2.1.4
|