Skip to the page
DataMosaic

Docs · Monitors

Files

Whether the files that should arrive have, and the ones that should leave did — the nightly export, each store's sales files, an interface's outbox — and what each reason in the Why column means.

Much of retail IT still moves in files: the nightly sales export, the price file for the morning, each store's transaction logs on their way to head office, the interface folder an ERP reads every ten minutes. When one of those stops, nothing fails loudly. The folder just stops changing.

A Files monitor looks in each folder and says whether it is changing as it should. A folder is one of two kinds, chosen under The folder is where files:

  • Arrive: something writes files into it, and the newest should be recent. The nightly export, the price files, each store's sales files at head office.
  • Wait to leave: something should empty it, and nothing should wait long. A store's outbox, an interface's inbox that the ERP picks up from.
StatusColourKindMeans
On timeGreenArriveThe newest file is younger than Late after
LateRedArriveThe newest file is older than Late after
No filesRedArriveNo file in it matches Files
FlowingGreenWait to leaveNothing has waited longer than Stuck after, and no more than Backlog over are waiting. An empty folder is flowing
BacklogAmberWait to leaveMore files are waiting than Backlog over, none of them for too long yet
StuckRedWait to leaveA file has waited longer than Stuck after
No folderRedEitherThe folder cannot be read. Why says why
No addressGreyEitherA store with no server address

In the answer, status is ontime, late, nofiles, flowing, backlog, stuck, missing or nohost.

A file's age is counted from when it was last written. Ages read 40 min, 27 h, 3 days 4 h.

#Before you start

  • Mosaic on your own server, with the host switch on. Reading folders is a host feature: it is off on Mosaic Cloud, and off on a server until whoever runs Mosaic starts it with MOSAIC_ACTIONS_HOST=on. The setup says so when it is off. See Commands, scripts, code and files.
  • The right to read the folders. Mosaic reads them as the account it runs as, from the machine it runs on. A share on another machine must let that account in. See Shares for a Files monitor.

Mosaic only reads the folder's list of files, their names, sizes and times. It never opens, moves or deletes a file.

#Setting it up

Press + beside Monitors and choose Files. Under Look at, choose a list or the stores.

FieldNotes
FoldersFor a list, one a line, on the machine Mosaic runs on or a share: \\fileserver\exports\sales, D:\interfaces\prices\in. A name before a | is shown in the table
Each store's folderFor the stores: \\{host}\pos\outbox. {host} is each store's server address
The folder is where filesArrive or Wait to leave, as above
FilesWhich files count: *.xml, SALES_*.csv. * stands for any run of letters, ? for one. Case does not matter. * alone is every file
Late after or Stuck after (minutes)1440, a day, to start with. 0 is never late or stuck
Backlog over (files)For a folder files leave from. 0 is never a backlog
Count the folders inside it tooOff to start with. On, files in the folders inside it count as well
Check every (minutes)15 to start with

Choose Late after from how often the files come, with room to spare. Files every hour: 90. One file a night at 02:00: 1500, a day and an hour, so the monitor goes red at 03:00 if a night was missed. A wait shorter than a day would turn red every day, before the next file is due.

An example list for a head office:

Nightly sales export | \\fileserver\exports\sales
Morning price file | D:\interfaces\prices\in
ERP inbox | \\erp-app01\interfaces\inbox

The first two Arrive; the third is where files Wait to leave, and belongs in a monitor of its own, since the kind is set for the whole monitor.

#The table

ColumnFieldHolds
Store and Code, or Namename, codeWho
FolderfolderThe folder read
StatusstatusAs above
FilesfilesHow many files match
Newest and Newest at, or Oldest and Oldest atnewest, newestAt, oldest, oldestAtThe file judged: the newest where files arrive, the oldest where they wait to leave
Age (min)ageMinutesThat file's age in minutes
WhyerrorEmpty while all is well
CheckedcheckedAtWhen it was read

The answer holds both the newest and the oldest; add the others under Display.

#Big folders

A folder is read up to its first 100,000 entries. One that holds more is judged on those, and Why says so: Only the first 100,000 entries were looked at. An archive folder that never empties is better watched by a pattern that matches today's files only, or left out.

#What Why says

WhyMeansWhat to do
The newest, SALES_20261121.csv, is 27 h old.Late: nothing newer has arrivedLook at whatever writes the files: the export job, the store's sender
No file here matches *.xml.Nothing matching has ever arrived, or it was all cleared awayCheck Files, and that the folder is the right one
TX_0412.xml has waited 3 h 20 min, with 41 more behind it.Stuck: whatever empties the folder has stoppedLook at the job or service that picks the files up
250 files waiting, more than 200.A backlog: files are leaving, slower than they comeWatch it; it turns red once the oldest waits past Stuck after
No such folder: \\fileserver\exports\sales.The path does not existCheck the path
The account Mosaic runs as may not read \\fileserver\exports\sales.Access deniedGive that account read on the share and the folder: see Shares for a Files monitor
\\store-001\pos\outbox cannot be reached: the server or the share is not answering.The server is down, or the share is not thereCheck the store's server, or the share's name
D:\interfaces\prices\in is a file, not a folder.The path names a fileName its folder, and the file under Files
… is busy.The folder is locked by something elseUsually passes by the next check
No address.The store has no server addressFill it in under Business Locations