cadencep45

updated

8 years ago

C

cadencep45

4 Apprentice

318 Posts

0

3726

December 20th, 2018 08:00

unity and storops and metrics

Hi,

Apologies for question, but not sure who to ask.

I see in https://pypi.org/project/storops/

That

supported metrics

  • system
    • read/write/total IOPS
    • read/write/total bandwidth
  • disk
    • read/write/total IOPS
    • read/write/total bandwidth
    • utilization
    • response time
    • queue length
  • lun
    • read/write/total IOPS
    • read/write/total bandwidth
    • utilization
    • response time
    • queue length
  • filesystem
    • read/write IOPS
    • read/write bandwidth
  • storage processor
    • net in/out bandwidth
    • block read/write/total IOPS
    • block read/write/total bandwidth
    • CIFS read/write IOPS
    • CIFS read/write bandwidth
    • NFS read/write IOPS
    • NFS read/write bandwidth
    • utilization
    • block cache read/write hit ratio
    • block cache dirty size
    • fast cache read/write hits
    • fast cache read/write hit rate
  • fc port
    • read/write/total IOPS
    • read/write/total bandwidth
  • iscsi node
    • read/write/total IOPS
    • read/write/total bandwidth

metrics are exposed.

Looking at the methods visible, I see;

{"UnitySystem": {"avg_power": 310, "current_power": 313, "existed": true, "hash": 1480349, "health": {"UnityHealth": {"hash": 2129561}}, "id": "0", "internal_model": "DPE OB BDW 25DRV 256GB 14C", "is_auto_failback_enabled": false, "is_eula_accepted": true, "is_upgrade_complete": false, "mac_address": "08:00:1B:FF:B2:AD", "model": "Unity 550F", "name": "dubnas308-spa-mgmt", "platform": "Oberon_DualSP", "serial_number": "CKM00184801131"}}

['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattr__', '__getattribute__', '__getstate__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_auto_balance_sp', '_cli', '_default_rsc_list_with_perf_stats', '_get_first_not_none_prop', '_get_name', '_get_parser', '_get_properties', '_get_property_from_raw', '_get_raw_resource', '_get_unity_rsc', '_get_value_by_key', '_id', '_is_updated', '_ntp_server', '_parse_raw', '_parsed_resource', '_preloaded_properties', '_self_cache_', '_self_cache_lock_', '_system_time', 'action', 'add_dns_server', 'add_metric_record', 'add_ntp_server', 'build_nested_properties_obj', 'clear_dns_server', 'clear_ntp_server', 'clz_name', 'create_cg', 'create_host', 'create_io_limit_policy', 'create_iscsi_portal', 'create_nas_server', 'create_pool', 'create_tenant', 'delete', 'disable_perf_stats', 'disable_persist_perf_stats', 'dns_server', 'doc', 'enable_perf_stats', 'enable_persist_perf_stats', 'existed', 'get', 'get_battery', 'get_capability_profile', 'get_cg', 'get_cifs_server', 'get_cifs_share', 'get_dae', 'get_dict_repr', 'get_disk', 'get_disk_group', 'get_dns_server', 'get_doc', 'get_dpe', 'get_ethernet_port', 'get_fan', 'get_fc_port', 'get_feature', 'get_file_interface', 'get_file_port', 'get_filesystem', 'get_host', 'get_id', 'get_index', 'get_initiator', 'get_io_limit_policy', 'get_io_module', 'get_ip_port', 'get_iscsi_node', 'get_iscsi_portal', 'get_lcc', 'get_license', 'get_link_aggregation', 'get_lun', 'get_memory_module', 'get_metric_query_result', 'get_metric_timestamp', 'get_metric_value', 'get_mgmt_interface', 'get_nas_server', 'get_nested_properties', 'get_nfs_server', 'get_nfs_share', 'get_pool', 'get_power_supply', 'get_preloaded_prop_keys', 'get_property_label', 'get_resource_class', 'get_sas_port', 'get_snap', 'get_sp', 'get_ssc', 'get_ssd', 'get_system_capacity', 'get_tenant', 'get_tenant_use_vlan', 'info', 'is_perf_stats_enabled', 'is_perf_stats_persisted', 'json', 'metric_names', 'modify', 'ntp_server', 'parse', 'parse_all', 'parsed_resource', 'property_names', 'remove_dns_server', 'remove_ntp_server', 'resource_class', 'set_cli', 'set_preloaded_properties', 'set_system_time', 'shadow_copy', 'singleton_id', 'system_time', 'system_version', 'update', 'update_name_if_exists', 'upload_license', 'verify']

Where do I get for example

  • storage processor

utilization

as a call to 'get_sp’ give me the static data;

{"UnityStorageProcessorList": [{"UnityStorageProcessor": {"bios_firmware_revision": "53.51", "emc_part_number": "110-297-014C-04", "emc_serial_number": "CE8HH184100349", "existed": true, "hash": 1814369, "health": {"UnityHealth": {"hash": 2129621}}, "id": "spa", "is_rescue_mode": false, "manufacturer": "", "memory_size": 131072, "model": "ASSY OB SP BDW 14C 2.0G 128G STM", "name": "SP A", "needs_replacement": false, "parent_dpe": {"UnityDpe": {"hash": 2129513, "id": "dpe"}}, "post_firmware_revision": "31.10", "sas_expander_version": "2.26.1", "slot_number": 0, "vendor_part_number": "", "vendor_serial_number": ""}}, {"UnityStorageProcessor": {"bios_firmware_revision": "53.51", "emc_part_number": "110-297-014C-04", "emc_serial_number": "CE8HH184100370", "existed": true, "hash": 1480429, "health": {"UnityHealth": {"hash": 2283289}}, "id": "spb", "is_rescue_mode": false, "manufacturer": "", "memory_size": 0, "model": "ASSY OB SP BDW 14C 2.0G 128G STM", "name": "SP B", "needs_replacement": false, "parent_dpe": {"UnityDpe": {"hash": 2283305, "id": "dpe"}}, "post_firmware_revision": "31.10", "sas_expander_version": "2.26.1", "slot_number": 1, "vendor_part_number": "", "vendor_serial_number": ""}}]}

but I assume its some variation of 'get_metric_query_result' to get performance metrics, but I an unsure of syntax of call

Any help appreciated;

  • cadencep45

    4 Apprentice

    318 Posts

    3259

    0

    Posted 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

  • Rainer_EMC

    6 Operator

    8645 Posts

    3259

    0

    Posted 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

  • cadencep45

    4 Apprentice

    318 Posts

    3259

    0

    Posted 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.

  • cadencep45

    4 Apprentice

    318 Posts

    3259

    0

    Posted December 21st, 2018 00:00

    True, thanks.

  • Rainer_EMC

    6 Operator

    8645 Posts

    3259

    0

    Posted 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