Store and Forward Alarm

Twice in the last week something went wrong with my customer’s “store and forward” process. The first time, I caught it before the local cache was full. The second time, I was too late and lost 49,000 records. (Local Cache is set to 100,000 records.)

Is there an alarm I can set up to notify me that the store and forward process has broken?

Of course solving the problem is the best approach but this also happened to me last year and I really don’t like losing data so an alarm would be handy while I am debugging the problem.

Yes, you can. Just make an expression tag with the following expression:getCachedRowCount("YourDBName")It will return the number of rows. You can alarm on the expression tag when it gets over some threshold.


Unfortunately getCachedRowCount() is not returning a useful number. I have 1600 rows pending in the local cache and it is returning a value of -1???

Found the problem. The cache is in default_db not default. Therefore when getCachedRowCount() is used it is evaluating default not default_db (which it created, by the way). Change it to default_db (where default is your database name and everything works).

That function should only return -1 if the data source name is incorrect. You’ll want it to be the name of Ignition’s connection to your database.

If you are not specifying a data source, then it defaults to the default data source for the SQLTag provider which will need to be set up in the Ignition Gateway: Configure --> SQLTags: Real-time --> Edit

Is it possible to read getCashedRowCount on a backup gateway. Just found out that the cache is full on the backup and so when failover occurs data is lost.

As of 8.1.2 there are system tags available that hold information about the store and forward system: