Oglala Lakota College Archives
RAMADDA has a facility for site administrators to define a monitor for new entries. A monitor consists of a set of search criteria and an action. When a new entry is added into the repository all of the monitors are checked. If a monitor's search criteria matches the new entry then the action is performed.
Overview
To create a monitor as a site administrator go to the Admin->Monitors page. Select one of the monitor types to create. For example, here we have created a Copy Action. This checks if a new entry meets the given search criteria and if so will copy that entry into another folder.
images/monitor1.png?version=183
Specify a name, whether the action is enabled and a valid date range for when the action can run.

Next, specify the set of search criteria. For example, here we are only running this action when a new entry is created with name that matches the pattern "testit", of type Folder that is under the Top/source folder.
images/monitor2.png?version=183
Path Template
A number of monitor actions (e.g., Publish, Copy, GridSubset) create new entries under a specified folder entry. A path template can also be specified. The path template supports creating any number of new sub-folders under the main folder where the newly created entry will be added.

The path template takes the form:
sub_entry_name1/sub_entry_name2/...
Where each sub_entry_nameN is the name of a subentry that is created (of needed). Each sub_entry_name can contain a number of macros that are are based on the newly created entry.
${filename}: the name of the file or URL
${fileextension}: the file extension
${name}: the name of the entry
${user}:the user id
The following are based on the entries from/to date and the create date
${create_date},${from_date},${to_date}:full formatted date
${create_day},${from_day},${to_day}:day of month
${create_week},${from_week},${to_week}:week of month
${create_weekofyear},${from_weekofyear},${to_weekofyear}:week of year
${create_month},${from_month},${to_month}:numeric month
${create_year},${from_year},${to_year}:year
${create_monthname},${from_monthname},${to_monthname}:month name
You can also specify the entry type of the subentry with the syntax:
sub_entry_name1:type=some_type/sub_entry_name2/...
For example, if you wanted to make use of RAMADDA's point collection types you could specify the path to be
${from_monthname} ${to_year}:type=type_point_collection
This would result in a Collection entry with name derived from the month and year of the data of the newly created entry. So, if your data file is from June 2022 then you would have, e.g.:
June 2022/data file1.csv
June 2022/data file2.csv
...
A nested example using the collection of collections entry type (example here) would be:
Collection:type=type_point_collection_collection/${from_monthname} ${to_year}:type=type_point_collection
This would result in a Collection of Collections as the top-level entry called "Collection". Under that entry is a Collection entry with name derived from the month and year of the data of the newly created entry.
Publish Action
The Publish Monitor will automatically publish a new entry in a source RAMADDA into a destination RAMADDA.
Grid Subset Action
The Grid Subset Action allows you to automatically apply a grid subset to a newly added gridded data file. First, go the Grid Subset form for one of the source grids and select the subsetting parameters, e.g.-
images/monitor/subsetform1.png?version=183
Next, scroll down to the bottom of the form and click on the globe icon- . This copies the set of form arguments to the clipboard.
images/monitor/subsetform2.png?version=183
Next go to the Admin->Monitors page and create a new Grid Subset Action. Give it a name, select Gridded Data File for a type and choose an Ancestor folder. This is the folder entry where the source grids are located.
images/monitor/gridmonitor1.png?version=183
Next, open the Actions section. Select a destination folder. This is where the newly subsetted grids will be added. Then paste the Grid Subset arguments that you copied from step 1 into the Grid Subset Arguments field.
images/monitor/gridmonitor2.png?version=183
Then save off the monitor. You can test it by adding a new Gridded Data file to the Source folder. The monitor should be applied. You can check the results from the Admin->Logs->Monitor page
Applying Monitors through Extended Edit
RAMADDA provides a facility that a selected monitor can be applied to one or more entries in a folder using the Extended Edit facility.

Let's say you have a large number of gridded data files in GRIB format on some Source Folder. And you want to apply a subsetting to each file and have a number of converted NetCDF files.

First - set up a Grid Subset monitor as described above. But - do not specify an ancestor folder!.

Next - go to the Source folder entry that contains the source grids and, under the Entry Popup menu choose "Extended Edit". This provides a number of ways to edit in bulk one or more entries.

Open the "Send to monitors" section and choose your Grid Subset monitor then press the "Apply Monitor" button
images/monitor/extedit1.png?version=183
You will get a status page that shows the progress. This can be cancelled.
images/monitor/extedit2.png?version=183