Developer Documentation Library > Interviewer - Server > Monitoring and tuning system performance > Monitoring and tuning the system > Monitoring the system by using Prometheus and Grafana > Enabling interview web tier (mrIWeb) metrics
 
Enabling interview web tier (mrIWeb) metrics
To enable and configure the Interview Web Tier metrics, use the following settings in the mrIWeb web.config file, which is in C:\Program Files\IBM\SPSS\DataCollection\7\Interviewer Server\Server\mrIWeb:
Metrics = {Enabled|Disabled}
To collect metrics and enable the metrics endpoint, specify Enabled.
The default value is Disabled.
MetricsCredentials = <string>
Secure the metrics endpoint by setting MetricsCredentials to a random string.
Requests to the metrics endpoint must include an “Authentication” HTTP header variable with a value of Bearer followed by the metric credentials, for example: Bearer mrIWeb.
If you do not want to secure the metrics endpoint, set MetricsCredentials to an empty string; you do not need an Authentication header.
The default value is mrIWeb.
Metric types
gauge
An instantaneous measurement of a value which can go up or down: for example, the CPU percentage.
counter
A value that only increases when an event occurs: for example, the number of requests received.
Counter metrics are normally used in a rate calculation, i.e. the increase the counter value over a specific period of time.
summary
Summary metrics are normally used to represent timed events: for example, the length of time to process a request. The metric consists of two values, “sum” and “count”.
“sum” is the total sum of the measured value.
“count” is the number of measurements.
These are typically used to calculate the following values:
the rate at which the event is occurring, by calculating the change in the count value
an average value over a period, by calculating the change in the sum value divided by the change in the count value.
Metrics returned by mrIWeb
The metrics returned by mrIWeb include the following items, and the Windows performance counters which are described in Monitoring performance counters.
System metrics which measure the CPU and memory of the server
mrIWeb reports the following system metrics for convenience. If you need only basic system metrics, you do not have to set up a separate service on the computer to collect only the supply system metrics.
system_cpu_percent
(Gauge.) System CPU time, as a percentage of the available CPU time.
system_memory_available
(Gauge.) Physical memory installed, measured in KB.
system_memory_percent
(Gauge.) System memory used, as a percentage of installed memory.
system_memory_used
(Gauge.) System memory used, measured in KB.
Process metrics which measure the CPU and memory of the app pool hosting the Interview Web Tier instance
process_cpu_percent
(Gauge.) Process CPU time, as a percentage of available CPU time.
process_memory_committed
(Gauge.) Process committed memory (KB).
process_memory_percent
(Gauge.) Process committed memory as a percentage of installed physical memory.
process_memory_working_set
(Gauge.) Process working set size (KB).
Request metrics for the requests that the web application is receiving and processing;
request_duration_seconds
(Summary.) The duration in seconds taken to process an incoming request.
requests_failed_total
(Counter.) The number of requests that had a non-successful response.
requests_queued
(Gauge.) The number of requests that are waiting to be handled.
requests_total
(Counter.) The total number of requests.
threads_active
(Gauge.) The number of threads that are actively handling requests.
Interview web tier state metrics
engines_failed
(Gauge.) The number of interviewer session engines that have been moved to the failed engines list.
engines_registered
(Gauge.) The number of interviewer session engines registered with the web tier.
engines_unregistered
(Gauge.) The number of interviewer session engines that have been unregistered.
Engine request metrics
The Interview Web Tier makes requests to mrIEngWS to get the pages of the interview. The Interview Web Tier times those requests.
If you want to get the engine request metrics, include an IncludeEngineMetrics=True parameter when requesting the metrics.
engine_request_duration_seconds
(Summary.) The duration in seconds for an interviewing engine to respond to a request.
This metric consists of multiple time series labeled with the engine name, method name (IsActive, PercentLoaded, CreateInterviewWithAuthentication, or PostInterviewEvent), and project name.
If there has been no activity on a time series (that is, engine/method/project combination) for 24 hours, that metric is discarded and it is no longer returned by the metric endpoint.
See also
Enabling interview engine tier (mrIEngWS) metrics
Enabling Web API metrics
Enabling Windows operating system metrics
Monitoring the system by using Prometheus and Grafana