disk_busy_stats = vrops.create_metric(vrops_gateway, "Disk_Busy_Stats", unit=None, aggregation_size=6, sampling_function=read_disk_busy_stats) disk_busy_stats.start_collecting() network_bits_recieved = vrops.create_metric(vrops_gateway, "Network_Bits_Recieved", unit=None, sampling_interval_sec=5, sampling_function=read_network_bits_recieved) network_bits_recieved.start_collecting() else: print "vROPS resource not registered successfully" # Here we are showing how to create a device object, registering it in vrops, and setting properties on it # Since there are no attached devices are as simulating one by considering RAM as separate from the gateway # The agent makes possible many different data models # arguments: # device name # Read or Write # another Resource in vrops of which the should be the child of a parent-child relationship among Resources ram = RAM(config['Device1Name'], 'Read', gateway) vrops_device = vrops.register(ram) if vrops_device.registered: # note that the location of this 'device' is different from the location of the gateway. It's not really different # but just an example of how one might create a device different from the gateway vrops.set_properties(vrops_device, config['Device1PropList']) mem_free = vrops.create_metric(vrops_device, "Memory_Free", unit=None, sampling_interval_sec=10, sampling_function=read_mem_free) mem_free.start_collecting() else: print "vROPS resource not registered successfully" # Sending data to an alternate data center component (e.g. data lake for analytics) # Graphite is a data center component
cpu_procs.start_collecting() disk_busy_stats = vrops.create_metric(gateway, "Disk_Busy_Stats", unit=None, aggregation_size=6, sampling_function=read_disk_busy_stats) disk_busy_stats.start_collecting() network_bits_recieved = vrops.create_metric(gateway, "Network_Bits_Recieved", unit=None, sampling_interval_sec=5, sampling_function=read_network_bits_recieved) network_bits_recieved.start_collecting() # Here we are showing how to create a device object, registering it in vrops, and setting properties on it # Since there are no attached devices are as simulating one by considering RAM as separate from the gateway # The agent makes possible many different data models # arguments: # device name # Read or Write # another Resource in vrops of which the should be the child of a parent-child relationship among Resources ram = RAM(config['Device1Name'], 'Read', gateway) vrops.register(ram) for item in config['Device1PropList']: for key, value in item.items(): ram.set_properties(key, value) # note that the location of this 'device' is different from the location of the gateway. It's not really different # but just an example of how one might create a device different from the gateway mem_free = vrops.create_metric(ram, "Memory_Free", unit=None, sampling_interval_sec=10, sampling_function=read_mem_free) mem_free.start_collecting() # Sending data to an alternate data center component (e.g. data lake for analytics) # Graphite is a data center component # Socket is the transport which the agent uses to connect to the graphite instance