Configure Usage Metrics
The Usage Metrics feature enables customers to report on the usage of Hubble by their users. It is not enabled by default, but is enabled by editing a configuration file on each web server, post deployment.
To enable the feature, open the file C:\Insight\YellowBoxWeb\Config\YellowBox.config in a text editor and find the section preceded by the comment “Activity Logger Settings”:
Activity Logger Settings
<!-- Activity Logger Settings --><!-- If Activity.Logging.Enabled value is "True", it will write logs to the external database. If the value is "False", it will write to the Repository database --><!-- Databse connection should be formatted according to the database type --><!-- MS SQL sample --><!-- <add key="Activity.Database.ConnectionString" value="Server=ServerName;Initial Catalog=databasename;User Id=userid;Password=password" /><add key="Activity.Database.ProviderName" value="System.Data.SqlClient"/> --><!-- Oracle sample --><!-- <add key="Activity.Database.ConnectionString" value="Default Row Prefetch=1000;Port Number=1521;Use Service Name=False;Server=ServerName;SID=VIS;UID=userid;PWD=password" /><add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcOracleFactory" /> --><!-- PostgreSQL sample --><!-- <add key="Activity.Database.ConnectionString" value="Server=ServerName;Port=5432;database=databasename;user id=userid;password=password;ApplicationName=Hubble;Pooling=false" /><add key="Activity.Database.ProviderName" value="Npgsql.NpgsqlFactory" /> --><!-- Accelerator sample --><!-- <add key="Activity.Database.ConnectionString" value="port=VW7;fetch size=3000; server=ServerName; user id=userid; password=password; database=db" /><add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcIngresFactory" /> --><!-- DB2 sample --><!-- <add key="Activity.Database.ConnectionString" value="Server=DatabaseServerIp;Database=DatabaseName;UID=userid;PWD=password;initial catalog=libraryname;" /><add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcDb2Factory" /> --><add key="Activity.Logging.Enabled" value="false" /><!-- Activity.Logging.Destination should be one of "Repository" or"ExternalDB" --><add key="Activity.Logging.Destination" value="Repository" /><add key="Activity.Database.ConnectionString" value="port=VW7;fetch size=3000; server=; user id=hubble; password=; database=db" /><add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcIngresFactory" /><!-- Activity Logger Settings -->
<!-- If Activity.Logging.Enabled value is "True", it will write logs to the external database. If the value is "False", it will write to the Repository database -->
<!-- Databse connection should be formatted according to the database type -
->
<!-- MS SQL sample -->
<!-- <add key="Activity.Database.ConnectionString" value="Server=ServerName;Initial Catalog=databasename;User Id=userid;Password=password" />
<add key="Activity.Database.ProviderName" value="System.Data.SqlClient"
/> -->
<!-- Oracle sample -->
<!-- <add key="Activity.Database.ConnectionString" value="Default Row Prefetch=1000;Port Number=1521;Use Service Name=False;Server=ServerName;SID=VIS;UID=userid;PWD=password" />
<add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcOracleFactory" /> -->
<!-- PostgreSQL sample -->
<!-- <add key="Activity.Database.ConnectionString" value="Server=ServerName;Port=5432;database=databasename;user id=userid;password=password;ApplicationName=Hubble;Pooling=false" />
<add key="Activity.Database.ProviderName" value="Npgsql.NpgsqlFactory" /
> -->
<!-- Accelerator sample -->
<!-- <add key="Activity.Database.ConnectionString" value="port=VW7;fetch size=3000; server=ServerName; user id=userid; password=password; database=db" />
<add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcIngresFactory" /> -->
<!-- DB2 sample -->
<!-- <add key="Activity.Database.ConnectionString" value="Server=DatabaseServerIp;Database=DatabaseName;UID=userid;PWD=password
;initial catalog=libraryname;" />
<add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcDb2Factory" /> -->
<add key="Activity.Logging.Enabled" value="false" />
<!-- Activity.Logging.Destination should be one of "Repository" or
"ExternalDB" -->
<add key="Activity.Logging.Destination" value="Repository" />
<add key="Activity.Database.ConnectionString" value="port=VW7;fetch size=3000; server=; user id=hubble; password=; database=db" />
<add key="Activity.Database.ProviderName" value="com.d11s.Relational.Jdbc.JdbcIngresFactory" />
- To enable usage metrics, change the setting of Activity.Logging.Enabled from false to true.
- Decide whether you want to record usage metrics in the Hubble repository, or in a different database. Note that Hubble does not currently have the ability to design reports over data in the Hubble repository. If you want to present the usage metrics within Hubble itself, you will need to store them in a database that Hubble can report over. The Vector database in the Hubble accelerator is an option, if you have one.
- If you want to record usage metrics in the Hubble repository, leave
Activity.Logging.Destinationwith the value “Repository”. No further editing is required. - If you want to record usage metrics in a different database:
- Change the value of
Activity.Logging.Destinationfrom “Repository” to “ExternalDB”. - You will need to supply entries for
Activity.Database.ProviderNameandActivity.Database.ConnectionString. Amongst the commented outlines, find the pair of entries that match your database type, e.g. Oracle, SQL Server, and use them as a template for your connection string and provider name values.
- Change the value of
- If you want to record usage metrics in the Hubble repository, leave
- Restart both the IIS service and the Hubble service “InsightYBService” to apply the changed settings.
- Repeat the instructions above for each Hubble web server you have.
The table useractivitylog for recording usage will be created automatically if it does not already exist.
Important: When you upgrade to a newer release of Hubble, you will need to manually restore the usage metrics settings afterwards, in the yellowbox.config file of each web server. Do not restore a backup of the file, but rather repeat the edits you made in the previous version.