Hello,
If You are flexible on timing and prepared to have each output in a separate file (rather than appended to one big file) then You don't need a script. Config example below:
event-options {
generate-event {
1min time-interval 60;
}
policy record-every-1min {
events 1min;
then {
execute-commands {
commands {
"show chassis routing-engine";
}
output-filename monitoring;
destination local;
output-format text;
}
}
}
destinations {
local {
archive-sites {
/var/tmp;
}
}
}
}
The files (one file per each policy run) will be named /var/tmp/<hostname>-monitoring-<timestamp>
HTH
Thanks
Alex