Skip to content

Commit 6aea0f1

Browse files
committed
Merge branch 'v0.3.0'
2 parents e2f34bd + 2fcdb2b commit 6aea0f1

File tree

3 files changed

+361
-73
lines changed

3 files changed

+361
-73
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
unitymetrics
22
unitymetrics.exe
3+
telegraf.conf
34
*.tar.gz
45
*.zip

README.md

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
# UNITYMETRICS
22

3-
Unitymetrics is a tool written in Go for collecting metrics from a Dell EMC Unity array and translating them in InfluxDB's line protocol.
3+
Unitymetrics is a tool written in Go for collecting usage and performance metrics from a Dell EMC Unity array and translating them in InfluxDB's line protocol.
44

5-
It can be use to send metrics in a InfluxDB database with the help of Telegraf.
5+
![unitymetrics-min](https://user-images.githubusercontent.com/9823778/38147007-b9abfe82-3450-11e8-8590-87d3afb7e480.png)
6+
7+
It can be useful to send metrics in a InfluxDB database with the help of Telegraf and then display metrics in grafana.
8+
9+
![screenshot-2018-3-30 grafana - unity](https://user-images.githubusercontent.com/9823778/38147174-60410d8c-3451-11e8-8320-016c38dbe705.png)
610

711
## How to find the available metrics
812

9-
In the Unity API, metrics are define by a path. For example, if you want to collect the remaining memory available on the storage processors, you'll have to use the path `sp.*.memory.summary.freeBytes`.
13+
In the Unity API, metrics are define by a path. For example, if you want to collect the remaining memory available on the storage processors, you'll have to use the path `sp.*.memory.summary.freeBytes`.
1014

1115
You can find a list of the metrics [here](https://gist.github.com/equelin/37486519972f8161c480f47ae5904390).
1216

1317
If you look at the different path, you will figure that some of them contains `*` or `+` characters.
1418

1519
When there is a `*` in the path, you can use the path as-is in your request, the `*` will be automatically replaced with all the possibilities. For example, if you want to use the path `sp.*.memory.summary.freeBytes`. The API will interpret it as if you were requesting the free memory for the SPA and the SPB. If you need this information only for one of the SPs, you can use the path `sp.spa.memory.summary.freeBytes`
1620

17-
When there is a `+` in the path, you have to replace it with the relevant item by yourself before requesting the API. For example, if you want to retrieve the CPU utilization of the SPA, you have to modify the path `kpi.sp.+.utilization` like this `kpi.sp.spa.utilization`
21+
When there is a `+` in the path, you can replace it with the relevant item by yourself before requesting the API or by a `*` for breaking the results by this item. For example, if you want to specifically retrieve the CPU utilization of the SPA, you have to modify the path `kpi.sp.+.utilization` like this `kpi.sp.spa.utilization`.
1822

1923
## How to install it
24+
2025
### From prebuilt release
2126

2227
You can find prebuilt unitymetrics binaries on the [releases page](https://github.com/equelin/unitymetrics/releases).
@@ -53,26 +58,32 @@ You can build unitymetrics using:
5358

5459
See usage with:
5560

56-
```
61+
```bash
5762
./unitymetrics -h
5863
```
5964

60-
#### Run a Dell Unity metrics collection with the default metrics and a sampling interval
65+
### Run a Dell EMC Unity metrics collection for an historical path
6166

62-
```
63-
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword
67+
```bash
68+
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword -histkpipaths kpi.sp.*.utilization
6469
```
6570

66-
#### Run a Dell Unity metrics collection with the default metrics and sampling interval of 10 seconds
71+
### Run a Dell EMC Unity metrics collection with a real time metric and sampling interval of 10 seconds
6772

68-
```
69-
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword -interval 10
73+
```bash
74+
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword -rtpaths sp.*.memory.summary.freeBytes -interval 10
7075
```
7176

72-
#### Run a Dell Unity metrics collection with specific metrics and sampling interval of 10 seconds
77+
### Run a Dell EMC Unity metrics collection with multiple metrics and sampling interval of 10 seconds
7378

79+
```bash
80+
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword -interval 10 -histkpipaths kpi.sp.*.utilization,kpi.lun.+.sp.+.rw.+.throughput,kpi.lun.*.sp.+.rw.+.throughput,kpi.lun.+.sp.+.responseTime,kpi.lun.*.sp.+.responseTime,kpi.lun.+.sp.+.queueLength,kpi.lun.*.sp.+.queueLength
7481
```
75-
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword -interval 10 -paths kpi.sp.spa.utilization,sp.*.cpu.summary.busyTicks,sp.*.cpu.uptime,sp.*.storage.pool.*.sizeFree,
82+
83+
### Run a Dell EMC Unity metrics collection for collecting capacity statistics
84+
85+
```bash
86+
./unitymetrics -unity unity01.example.com -user admin -password AwesomePassword -capacity
7687
```
7788

7889
## Using unitymetrics with Telegraf
@@ -93,14 +104,66 @@ Here is an example of a working telegraf's config file:
93104
[[inputs.exec]]
94105
# Shell/commands array
95106
# Full command line to executable with parameters, or a glob pattern to run all matching files.
96-
commands = ["unitymetrics -user admin -password AwesomePassword -unity unity01.okcomputer.lab -interval 10 -paths kpi.sp.spa.utilization,sp.*.cpu.summary.busyTicks,sp.*.cpu.uptime,sp.*.storage.pool.*.sizeFree,sp.*.storage.pool.*.sizeSubscribed,sp.*.storage.pool.*.sizeTotal,sp.*.storage.pool.*sizeUsed,sp.*.memory.summary.totalBytes,sp.*.memory.summary.totalUsedBytes"]
107+
commands = ["unitymetrics -user admin -password Mypassword -unity unity01.example.com -histkpipaths kpi.sp.*.utilization,kpi.lun.+.sp.+.rw.+.throughput,kpi.lun.*.sp.+.rw.+.throughput,kpi.lun.+.sp.+.responseTime,kpi.lun.*.sp.+.responseTime,kpi.lun.+.sp.+.queueLength,kpi.lun.*.sp.+.queueLength -capacity"]
108+
109+
# Timeout for each command to complete.
110+
timeout = "60s"
111+
112+
# Data format to consume.
113+
# NOTE json only reads numerical measurements, strings and booleans are ignored.
114+
data_format = "influx"
115+
116+
interval = "60s"
117+
```
118+
119+
If needed, you can specify more than one input plugin. It might be useful if you want to gather different statistics with different intervals or if you want to query different arrays.
120+
121+
```Toml
122+
###############################################################################
123+
# INPUT PLUGINS #
124+
###############################################################################
125+
126+
[[inputs.exec]]
127+
# Shell/commands array
128+
# Full command line to executable with parameters, or a glob pattern to run all matching files.
129+
commands = ["unitymetrics -user admin -password Mypassword -unity unity01.example.com -histkpipaths kpi.sp.*.utilization,kpi.lun.+.sp.+.rw.+.throughput,kpi.lun.*.sp.+.rw.+.throughput,kpi.lun.+.sp.+.responseTime,kpi.lun.*.sp.+.responseTime,kpi.lun.+.sp.+.queueLength,kpi.lun.*.sp.+.queueLength -capacity"]
130+
131+
# Timeout for each command to complete.
132+
timeout = "60s"
133+
134+
# Data format to consume.
135+
# NOTE json only reads numerical measurements, strings and booleans are ignored.
136+
data_format = "influx"
137+
138+
interval = "60s"
139+
140+
[[inputs.exec]]
141+
# Shell/commands array
142+
# Full command line to executable with parameters, or a glob pattern to run all matching files.
143+
commands = ["unitymetrics -user admin -password Mypassword -unity unity01.example.com -interval 50 -rtpaths sp.*.memory.summary.freeBytes,sp.*.memory.summary.totalBytes,sp.*.memory.summary.totalUsedBytes,sp.*.cpu.uptime"]
97144

98-
# Timeout for each command to complete.
99-
timeout = "20s"
145+
# Timeout for each command to complete.
146+
timeout = "60s"
100147

101148
# Data format to consume.
102149
# NOTE json only reads numerical measurements, strings and booleans are ignored.
103150
data_format = "influx"
151+
152+
interval = "60s"
153+
154+
[[inputs.exec]]
155+
# Shell/commands array
156+
# Full command line to executable with parameters, or a glob pattern to run all matching files.
157+
commands = ["unitymetrics -user admin -password Mypassword -unity unity02.example.com -histkpipaths kpi.sp.*.utilization,kpi.lun.+.sp.+.rw.+.throughput,kpi.lun.*.sp.+.rw.+.throughput,kpi.lun.+.sp.+.responseTime,kpi.lun.*.sp.+.responseTime,kpi.lun.+.sp.+.queueLength,kpi.lun.*.sp.+.queueLength -capacity"]
158+
159+
# Timeout for each command to complete.
160+
timeout = "60s"
161+
162+
# Data format to consume.
163+
# NOTE json only reads numerical measurements, strings and booleans are ignored.
164+
data_format = "influx"
165+
166+
interval = "60s"
104167
```
105168

106169
# Author

0 commit comments

Comments
 (0)