SonarW Warehouse Monitoring Service (WMS)

SonarW’s WMS service is a set of statics that are computed and stored by SonarW in a collection plus a dashboard that presents this information. The data is maintained in a collection called sonar_state in a database called sonar_log that exists within every SonarW instance. This collection contains documents from multiple jSonar components. Documents referring to the statistics of the database are marked by the value SonarW in the component field. A document is automatically written to this collection by the database every 5 minutes. This parameter is configurable; change it by setting a different value for stats_daemon_wait_period in sonard.conf and restarting SonarW.

Each document in the collection contains the following fields:

  • “_id” : a unique object ID.
  • “component” : The string: “SonarW”.
  • “ts” : The timestamp the sample was taken, in UTC.
  • “upTimeSec” : The number of seconds the system has been running.
  • “currentUsers” : The current number of users signed onto the system.
  • “userLoginPerInterval” : The number of users who have signed on since during this reporting interval.
  • “sonarNormalizedCpuUsage” : The total amount of CPU the sonard process used, by all cores, expressed as a percent of the total available (between 0 and 100%).
  • “sonarCpuUsage” : The total amount of CPU the sonard processed used. On an 8 core system, a number between 0 and 800.
  • “peakCpuUsagePerInterval” : The peak amount of CPU used by the sonard process in the interval.
  • “loadAverage1m” : The 1 minute load average.
  • “loadAverage5m” : The 5 minute load average.
  • “loadAverage15m” : The 15 minute load average.
  • “sonarResidentMemoryKb” : The amount of resident memory the sonard process used, in KB.
  • “sonarVirtualMemoryKb” : The amount of virtual memory the sonard process used, in KB.
  • “totalMemoryKb” : The total amount of memory available on this host.
  • “memReservationMaxKb” : The maximum amount of memory which may be reserved within the sonard process, in KB.
  • “memReservationCurKb” : The current amount of memory reserved within the sonard process, in KB.
  • “sonarFilesystemUsedPercent” : The amount of the file system (containing $SONAR_HOME) which is in use (expressed as a percentage).
  • “sortingFilesystemUsedPercent” : The amount of the file system (containing the sorting backup director, default /tmp) which is in use (expressed as a percentage).
  • “openCursors” : The number of open cursors.
  • “curDatabases” : The current number of databases.
  • “curCollections” : The current number of collections.
  • “runningQueries” : The number of queries currently running.
  • “waitingQueries” : The number of waiting queries.
  • “queriesPerInterval” : The number of queries processed during this reporting interval.
  • “cacheMaxMemoryLimitKb” : The amount of memory reserved for data cache, in KB.
  • “cacheCurMemoryUsedKb” : The amount of cache memory currently used, in KB.
  • “cacheMaxBlockCount” : The maximum number of blocks reserved for cache.
  • “cacheCurBlockCount” : The current number of blocks used for cache.
  • “cacheHitRatio” : The percentage of requests serviced by cached data.
  • “cacheHitRatioPerInterval” : The percentage of requests serviced by cached data in this reporting interval.
  • “diskReadBlockPerInterval” : The number of disk blocks read during this interval.
  • “currentConnections” : The current number of client connections.
  • “availableConnections” : The number of available client connections.

In addition, WMS includes a dashboard that presents values from this collection. In order to use the WMS dashboard you need to install jSonar’s JSON Studio and you need to import the WMS dashboard definitions into SonarW.

When you install SonarW a directory will be created in /usr/share/sonarw/wms.

Using credentials that allow you to create a new database and write to that database use mongorestore to create the lmrm__wms database from this data:

mongorestore -h localhost --port <your port> -u <your user> -p <your pwd>
   --authenticationDatabase <e.g. admin> -d lmrm__wms /usr/share/sonarw/wms/lmrm_wms

Then install JSON Studio.

To use the dashboard point your browser to https://<your hostname>:8443/wms.xhtml and authenticate using your credentials to SonarW.