Hello to all.
I wrote an Item script.
The script (javascript) works correctly but I can’t do one thing.
I would like the script to write inside a file.
I tried to insert these lines of code but I get an error
const fs = require('fs'); -> error on this line
...
const filename = '/usr/lib/zabbix/externalscripts/Devices/${params.serial}.json';
fs.writeFileSync(filename, devicesJSON, 'utf8');
Do you know if you can do what I want ?
Thank you !
I wrote an Item script.
The script (javascript) works correctly but I can’t do one thing.
I would like the script to write inside a file.
I tried to insert these lines of code but I get an error
const fs = require('fs'); -> error on this line
...
const filename = '/usr/lib/zabbix/externalscripts/Devices/${params.serial}.json';
fs.writeFileSync(filename, devicesJSON, 'utf8');
Do you know if you can do what I want ?
Thank you !
Comment