I believe there is currently a document defect for the $file variable:
Current:
$file: Returns the name of the file or the file name pattern, which the probe is monitoring in the monitoring profile. If there are more than one file, it returns the array of file names and the probe executes the command for that number of times.
What it should be:
$file: Returns the name of the file or the file name pattern, which the probe is monitoring in the monitoring profile.
I have requested the document team to correct this at this time.
if you would like to see this changed please do open an enhancement request.
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
------------------------------
Original Message:
Sent: 10-23-2019 12:55 AM
From: Max Lim
Subject: dirscan $file variable not working
Hi All,
I'm using dirscan v3.17 probe on UIM 8.5.1.
I'm simply trying to monitor an empty folder and alert when a file appears in that folder. In the alarm details I would like to know the name of the file.
According to documentation:
"$file: Returns the name of the file or the file name pattern, which the probe is monitoring in the monitoring profile. If there are more than one file, it returns the array of file names and the probe executes the command for that number of times."
https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/alphabetical-probe-articles/dirscan-file-and-directory-scan/v3-1-dirscan-im-configuration/v3-1-dirscan-im-gui-reference
So in the Message Pool, I've added $file in the alarm "FileNumberAlarm" thinking that will show the name of the file.
However, it simply adds an asterick which it's getting from the Pattern field.
According to this support case, it's supposed to be "by design" which makes no sense. The probe GUI won't let you leave that Pattern field blank.
https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=67511
Anyone know what I'm doing wrong?
Thanks,
Max.