|
86 | 86 | RETURN = r''' |
87 | 87 | ansible_facts: |
88 | 88 | description: |
89 | | - - A dictionary containing the SAR data collected. The key is dynamically determined based on the O(type). |
90 | | - - The dict name format is c(sar_<type>). |
91 | | - - The value is a list of dictionaries where each dictionary represents a single data point with the following keys |
| 89 | + - A dictionary containing the SAR data collected. |
| 90 | + - The value is a list of dictionaries where each dictionary represents a single data point. |
92 | 91 | - V(date) The date for the measurement. |
93 | 92 | - V(time) The time for the measurement in 24-hour format. |
94 | 93 | - Additional keys corresponding to the performance metrics output from the C(sar) command. |
95 | 94 | returned: always |
96 | | - type: dict |
97 | | - sample: { |
98 | | - "sar_cpu": [ |
99 | | - { |
100 | | - "date": "2025-05-01", |
101 | | - "time": "08:00:00", |
102 | | - "AM": "AM", |
103 | | - "%user": "5.00", |
104 | | - "%system": "2.00", |
105 | | - "%idle": "93.00" |
106 | | - }, |
107 | | - { |
108 | | - "date": "2025-05-01", |
109 | | - "time": "08:10:00", |
110 | | - "AM": "AM", |
111 | | - "%user": "6.00", |
112 | | - "%system": "3.00", |
113 | | - "%idle": "91.00" |
114 | | - } |
115 | | - ] |
116 | | - } |
| 95 | + type: complex |
| 96 | + contains: |
| 97 | + sar_cpu: |
| 98 | + description: |
| 99 | + - Dictionary that contains C(cpu) data from C(sar). |
| 100 | + - It contains V(date), V(time) and all others keys from C(sar) data. |
| 101 | + - Most common keys are V(%user), V(%nice), V(%system), V(%idle) and others. |
| 102 | + returned: when O(type) is V(cpu). |
| 103 | + type: dict |
| 104 | + sar_mem: |
| 105 | + description: |
| 106 | + - Dictionary that contains C(memory) data from C(sar). |
| 107 | + - It contains V(date), V(time) and all others keys from C(sar) data. |
| 108 | + - Most common keys are V(%memused), V(%commit) and others. |
| 109 | + returned: when O(type) is V(memory). |
| 110 | + type: dict |
| 111 | + sar_swap: |
| 112 | + description: |
| 113 | + - Dictionary that contains C(swap) data from C(sar). |
| 114 | + - It contains V(date), V(time) and all others keys from C(sar) data. |
| 115 | + - Most common keys are V(%swpused), V(%swpcad) and others. |
| 116 | + returned: when O(type) is V(swap). |
| 117 | + type: dict |
| 118 | + sar_net: |
| 119 | + description: |
| 120 | + - Dictionary that contains C(network) data from C(sar). |
| 121 | + - It contains V(date), V(time) and all others keys from C(sar) data. |
| 122 | + - Most common keys are V(IFACE), V(rxpck/s), V(txpck/s), v(%ifutil) and others. |
| 123 | + returned: when O(type) is V(network). |
| 124 | + type: dict |
| 125 | + sar_disk: |
| 126 | + description: |
| 127 | + - Dictionary that contains C(disk) data from C(sar). |
| 128 | + - It contains V(date), V(time) and all others keys from C(sar) data. |
| 129 | + - Most common keys are V(DEV), V(%util), V(await), V(rkB/s), V(wkB/s) and others. |
| 130 | + returned: when O(type) is V(disk). |
| 131 | + type: dict |
| 132 | + sar_load: |
| 133 | + description: |
| 134 | + - Dictionary that contains C(load) data from C(sar). |
| 135 | + - It contains V(date), V(time) and all others keys from C(sar) data. |
| 136 | + - Most common keys are V(ldavg-1), V(ldavg-5), V(ldavg-15) and others. |
| 137 | + returned: when O(type) is V(load). |
| 138 | + type: dict |
117 | 139 | ''' |
118 | 140 |
|
119 | 141 | from ansible.module_utils.basic import AnsibleModule |
|
0 commit comments