lmcadm 0.17.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build-win.yaml +2 -2
- data/README.md +3 -0
- data/lib/lmcadm/commands/monitor.rb +14 -2
- data/lib/lmcadm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca0dd10565f531737baa49a5fbfef88cd87428354379bfea56479b695f6a9447
|
4
|
+
data.tar.gz: 057bef12dff7c5b8ec69b6f833343789c4682595b6bd99f4dbce64b1a740b6af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4d94f44775a0c2bea6b8e0c7376af6e7b21268670f0bc119e83d1ea2de670e8477012e717eb52df18651af18c51186551e4c71f10bd1d78bf5b4838df486f4f
|
7
|
+
data.tar.gz: f45285b9223ada9c9213f99e351335f59aff2e6f9ee0038b12efe14cec3e8f0bdc6564f87db76082efce72d36128de84e45d2d50ae4414a10170f779fa6edb91
|
@@ -25,11 +25,11 @@ jobs:
|
|
25
25
|
- uses: papeloto/action-zip@v1
|
26
26
|
with:
|
27
27
|
files: lmcadm.exe LICENSE.txt
|
28
|
-
dest:
|
28
|
+
dest: lmcadm-${{ github.event.release.tag_name }}-win.zip
|
29
29
|
- name: Release
|
30
30
|
uses: softprops/action-gh-release@v1
|
31
31
|
with:
|
32
|
-
files:
|
32
|
+
files: lmcadm-${{ github.event.release.tag_name }}-win.zip
|
33
33
|
env:
|
34
34
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
35
35
|
|
data/README.md
CHANGED
@@ -81,6 +81,7 @@ Available types are
|
|
81
81
|
* .max
|
82
82
|
* .avg
|
83
83
|
|
84
|
+
Example use:
|
84
85
|
|
85
86
|
lmcadm monitor -A "ExampleProject" raw --type scalar --period MINUTE10 \
|
86
87
|
device_info cloud_rtt.max 3e19ada7-86fa-4809-a14e-7174b018603d
|
@@ -91,6 +92,8 @@ Available types are
|
|
91
92
|
This dumps the raw values response as json.
|
92
93
|
To further extract data, use something that can parse json, like `jq`[1].
|
93
94
|
|
95
|
+
Example use:
|
96
|
+
|
94
97
|
lmcadm monitor -A "SDN-DEMO (LANCOM Visitor)" raw --type json --period MINUTE1 \
|
95
98
|
wan_info_json interfaces a6871a81-84f3-4c57-a20e-c3410b47e895 | jq ' .[]["DSL-CH-1"].rxRate'
|
96
99
|
|
@@ -85,10 +85,22 @@ module LMCAdm #:nodoc:
|
|
85
85
|
}
|
86
86
|
monitordata = result.body.items[name]
|
87
87
|
puts result.body.inspect if _g[:debug]
|
88
|
-
if options[:type] ==
|
88
|
+
if options[:type] == 'scalar'
|
89
89
|
puts monitordata.values
|
90
|
-
elsif options[:type] ==
|
90
|
+
elsif options[:type] == 'json'
|
91
91
|
puts JSON.pretty_generate monitordata.to_h[:values]
|
92
|
+
elsif options[:type] == 'table'
|
93
|
+
table_data = monitordata.values.map { |v|
|
94
|
+
row = v.first
|
95
|
+
hash = {}
|
96
|
+
monitordata.keys.each_with_index { |k, index|
|
97
|
+
unless row[index].nil?
|
98
|
+
hash[k] = v.first[index]
|
99
|
+
end
|
100
|
+
}
|
101
|
+
hash
|
102
|
+
}
|
103
|
+
tp table_data
|
92
104
|
end
|
93
105
|
end
|
94
106
|
|
data/lib/lmcadm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lmcadm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- erpel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|