I've created a discovery rule that collects a list of files.
The list goes something like this:
Then, I added the preprocessing "CSV to JSON".
For that discovery, there's a macro, {#MAILING.NAME} -> $..name
For testing, I've created an item prototype to get the file size.
After that, Zabbix created an item for each file with the wrong file path.
It added literal brackets and backslashes to the file path, therefore, making the item unsupported.
vfs.file.size["["C:\\FTP\\import\\20220709_Cacs3_v83_Processad o_no _servidor_PXW1CEADG018.txt"]"]
Any idea of how to correct that?
The list goes something like this:
Code:
$ zabbix_get -s PXW1CEADG016 -k system.run["powershell.exe -File C:\zabbix\scripts\mailing_file_stats.ps1"] name C:\FTP\import\bkp C:\FTP\import\20220709013444_cacs10_v83.txt C:\FTP\import\20220709013444_cacs10_v83.txt.log C:\FTP\import\20220709013444_cacs11_v83.txt C:\FTP\import\20220709013444_cacs11_v83.txt.log C:\FTP\import\20220709013445_cakauto4.txt C:\FTP\import\20220709013445_cakauto4.txt.log C:\FTP\import\20220709_Cacs3_v83_PXW1CEADG018.txt C:\FTP\import\20220709_Cacs9_v83_PXW1CEADG021.txt
For that discovery, there's a macro, {#MAILING.NAME} -> $..name
For testing, I've created an item prototype to get the file size.
Code:
vfs.file.size[{#MAILING.NAME}]
It added literal brackets and backslashes to the file path, therefore, making the item unsupported.
vfs.file.size["["C:\\FTP\\import\\20220709_Cacs3_v83_Processad o_no _servidor_PXW1CEADG018.txt"]"]
Any idea of how to correct that?
Comment