Skip to content

Commit 7eee1cb

Browse files
authored
Add additional proxmox_type tag to nodes (DataDog#21581)
* add proxmox_type tag * add changelog
1 parent c09404e commit 7eee1cb

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

proxmox/changelog.d/21581.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add additional `proxmox_type` tag to nodes.

proxmox/datadog_checks/proxmox/check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ def _collect_resource_metrics(self):
298298
vm_id = resource.get('vmid')
299299
hostname = self._get_vm_hostname(vm_id, resource_name, node)
300300
elif resource_type_remapped == NODE_RESOURCE:
301+
resource_tags.add('proxmox_type:host')
301302
hostname = node
302303

303304
resource_val = {

proxmox/tests/test_unit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def test_resource_count_metrics(dd_run_check, aggregator, instance):
120120
'proxmox_server:http://localhost:8006/api2/json',
121121
'testing',
122122
'proxmox_type:node',
123+
'proxmox_type:host',
123124
'proxmox_name:ip-122-82-3-112',
124125
'proxmox_id:node/ip-122-82-3-112',
125126
],
@@ -328,6 +329,7 @@ def test_external_tags(dd_run_check, aggregator, instance, datadog_agent):
328329
'proxmox_id:node/ip-122-82-3-112',
329330
'proxmox_name:ip-122-82-3-112',
330331
'proxmox_type:node',
332+
'proxmox_type:host',
331333
]
332334
},
333335
)

0 commit comments

Comments
 (0)