CRS Script Menu Access Counter

Unanswered Question
Feb 27th, 2009

I have been trying to find a way or find a table in the CRS SQL database that we could use to track how often a Menu is access in one of our scripts. Does anyone know if this exists in the SQL database or a way to script out some kind of increment to a document on the server? Thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
sferland Fri, 02/27/2009 - 13:12

The concept of "counter" has never been implemented by Cisco in the CRS.

Since most of my customers need this type of tracking, I built a custom library which provide me all the tools I need for that.

Here are the methods of this library:

- public boolean incCounter(String pCounterName, int pValue)

- public boolean decCounter(String pCounterName, int pValue)

- public boolean setCounter(String pCounterName, int pValue)

- public String getCounter(String pCounterName)

- public boolean writeCounters(String pSessionID)

During the call, all the counters value are kept in an HashMap variable. Then, when the call ends, the method "writeCounters" will insert all of them into the database in a special table.

Here is the specification of the table:

- Session_ID : varchar

- Start_Hour : date

- End_Hour : date

- CNT_XXXX : int

- CNT_YYYY : int

- CNT_ZZZZ : int

- ...

I have one column per counter in my script. So, one row, is equal to one call. Columns Start_Hour and End_Hour are populated directly in the custom class. At constructor time and then when I call "writeCounters".

I hope this help.

Actions

This Discussion