saltext.vmware.modules.vmc_vcenter_stats#

Salt execution module for VMC vCenter stats Provides methods to get monitored items list and to query monitored item data for given vCenter. To get the data from this module, admin credentials for vCenter are required.

saltext.vmware.modules.vmc_vcenter_stats.list_monitored_items(hostname, username, password, verify_ssl=True, cert=None)[source]#

Retrieves monitored items list for given vCenter.

CLI Example:

salt vm_minion vmc_vcenter_stats.list_monitored_items hostname=sample-vcenter.vmwarevmc.com ...
hostname

Hostname of the vCenter console

username

admin username required to login to vCenter console

password

admin password required to login to vCenter console

verify_ssl

(Optional) Option to enable/disable SSL verification. Enabled by default. If set to False, the certificate validation is skipped.

cert

(Optional) Path to the SSL client certificate file to connect to VMC Cloud Console. The certificate can be retrieved from browser.

saltext.vmware.modules.vmc_vcenter_stats.query_monitored_items(hostname, username, password, start_time, end_time, interval, aggregate_function, monitored_items, verify_ssl=True, cert=None)[source]#

Retrieves aggregate monitoring data for the given monitored_items across the time range. Data will be grouped using the aggregate_function for each interval in the time range.

CLI Example:

salt vm_minion vmc_vcenter_stats.query_monitored_items hostname=sample-vcenter.vmwarevmc.com ...
hostname

Hostname of the vCenter console

username

admin username required to login to vCenter console

password

admin password required to login to vCenter console

start_time

Start time in UTC (inclusive). Ex: 2021-05-06T22:13:05.651Z

end_time

End time in UTC (inclusive). Ex: 2021-05-10T22:13:05.651Z

interval

interval between the values in hours and mins, for which aggregation will apply. Possible values: MINUTES30, HOURS2, MINUTES5, DAY1, HOURS6

aggregate_function

aggregation function. Possible values: COUNT, MAX, AVG, MIN

monitored_items

List of monitored item IDs. Ex: [cpu.util, mem.util]

verify_ssl

(Optional) Option to enable/disable SSL verification. Enabled by default. If set to False, the certificate validation is skipped.

cert

(Optional) Path to the SSL client certificate file to connect to VMC Cloud Console. The certificate can be retrieved from browser.