18 lines
557 B
Python
18 lines
557 B
Python
import yaml
|
|
|
|
file_path = r'C:\Users\joao.goncalves\Desktop\zabbix-itguys\templates_gold\pfsense_hybrid_snmp_agent\template_pfsense_hybrid_gold.yaml'
|
|
|
|
try:
|
|
with open(file_path, 'r', encoding='utf-8') as f:
|
|
data = yaml.safe_load(f)
|
|
|
|
macros = data['zabbix_export']['templates'][0]['macros']
|
|
|
|
print(f"Total macros: {len(macros)}")
|
|
for i, m in enumerate(macros):
|
|
val = m.get('value')
|
|
print(f"Macro {i+1} ({m['macro']}): Type={type(val)} Value='{val}'")
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|