Custom Cache Designer (CDD)
The CCD allows you to quickly add custom data caches to your monitor. Custom data can come from the following sources:
-
SQL
-
HTTP
-
Solution Package Caches
-
InfluxDB (added in 6.0.1)
For data sources other than InfluxDB, you can optionally transform your data using a varietry of functions, combine it with Solution Package data, and store history via the Historian. For InfluxDB data, transformations and history are handled by Influx and therefore functions and history storage options are disabled in the CCD. History data is automatically queried from the InfluxDB as needed for displays.
Once your custom caches are deployed, the data in those caches is available in the data server for use in custom alerts and custom displays.
Performance Considerations
Adding custom data to your data server increases the memory requirements for that data server. The Deployment section help explains how to determine the amount of memory used by each cache. Since you do not know the performance impact of a cache before deploying it for the first time, you should never use the CCD to design and deploy new caches in a production data server. Cache design should always be done in a non-production data server. While editing a cache file, an undeployed copy of all caches in the file is loaded into the data server in order to support editing functionality such as Preview and column selection. Not only does this add to the data server load, but it also requires fast response from the data server to update the CDD user interface. Therefore, cache design should be done on a server that is running with a minimal amount of data until you are ready to deploy and check the memory requirements. Once you have successfully deployed the cache in a non-production data server and determined the amount of memory it needs, it can be copied over to production.
Getting Started
Depending on the source of your cache data, you may need to do some setup before you can start designing caches:
-
InfluxDB and SQL - Click the HOME button on this page, then select the data server where you will add your caches. In the Custom Cache Data section, add one or more connections to InfluxDB or SQL, save your properties and restart the data server. In the custom cache editor, you will reference these connections by the given connection name.and SQL - Click the HOME button on this page, then select the data server where you will add your caches. In the Custom Cache Data section, add one or more connections to InfluxDB or SQL, save your properties and restart the data server. In the custom cache editor, you will reference these connections by the given connection name.
- HTTP - In order to access custom http data, you must post the data to your data server. A sample node application is included in your installation under rtvapm/sampleapps/httpfeed to illustrate how to post HTTP data to your data server. See the README.txt file in that directory for instructions on how to implement your own application or run the sample application.
- Solution Package Caches - no setup required.
Once you have setup your data, you can start creating custom caches. The panel on the left shows a list of your custom cache files and the main panel allows you to edit the caches in those files. To get started, click <New> in the left panel to start a new cache file, then click the + under Caches to add a new cache. Fill in the name of the cache (must be unique) and the initial data for the cache. For caches not attached to InfluxDB, you can add one or more functions to transform the cache and for all caches you can edit the cache properties. Once you have finished editing your caches, click the Save button at the top of the display list. This will save the cache file, but will not deploy it to the data server.
Tip: Save your work often as the CCD has a 20 minute timeout. If the CCD is open and you have not interacted with it in 20 minutes, a warning will show that your display will be closed and any unsaved changes will be lost. This timeout helps limit the load on the data server which opens a copy of the cache being edited with live data attachments in order to support the CCD user interface.
Deploy
To deploy your cache file, click on the Deploy Cache button at the top of the main panel. Navigate to the monitor and you will see your new cache in the Cache Table. Back in the designer, click <New> to create another new cache file or select an existing cache file to add more caches or edit an existing cache. Click X (delete) to delete the selected cache file or Save As to save a copy of it.
When you save changes to an existing cache file, these changes are not deployed until you click the Deploy Cache File button. At that point, the previous version of the cache file is unloaded, then the new one is deployed. When you delete a cache file, it is deleted from the data server. To automatically deploy your cache whenever the data server starts up, turn on the Deploy on Startup toggle at the top of the main panel.
Tip: Click the ? button in the top right corner of any section to display help text specific to that section. There is also a help button in most of the dialogs.
Location on Disk
Custom caches are stored in your installation under projects/custom/caches. To copy caches from one data server to another, copy the whole caches directory into the projects/custom directory of the target data server. For caches attached to InfluxDB and SQL, you will need to add connections in the target data server. For caches attached to HTTP data, you will need to have your http sender application send to the target data server. When deployed with HA data servers, custom caches will be saved to the active data server installation. You will need to manually copy them over to the backup data server.
All of the caches in the projects/custom/caches directory that have Deploy on Startup enabled are loaded by the data server on startup.