3 Apprentice

 • 

318 Posts

December 21st, 2018 00:00

for reference

Inorder to query metrics, you need to enable it by invoking enable_perf_stats():

```python

import storops

# New unity system

unity = storops.UnitySystem('192.168.100.10', 'admin', 'password')

# Enable matric query

  1. unity.enable_perf_stats()

```

Then, you can get the object and metrics:

disk = unity.get_disk(name=xxx)

  1. disk.read_iops
  2. disk.total_byte_rate

You can refer snmp-agent project for further usage:

https://github.com/emc-openstack/snmp-agent/blob/master/snmpagent_unity/unity_impl/DiskReadThroughput.py

4 Operator

 • 

8.6K Posts

December 21st, 2018 00:00

well storops is open source

so you can read the source, fix yourself and contribute

or create a ticket on github

3 Apprentice

 • 

318 Posts

December 21st, 2018 00:00

Yup.

But as storops was developed internally, and has a nice python interface, seemed to be worth asking, as its really a question about abstraction.

If metrics are missing, I would simply revert to the REST API as you indicated.

3 Apprentice

 • 

318 Posts

December 21st, 2018 00:00

True, thanks.

4 Operator

 • 

8.6K Posts

December 21st, 2018 00:00

interesting

I assume that storops just pulls the matrics that are available from our REST API

see the support site for our REST API reference

Its actually also online on every Unity or UnityVSA

you just need to open  https:// /apidocs/index.html

No Events found!

Top