GRE Prometheus metrics

The Genero Report Engine (GRE) server provides performance and diagnostic metrics with Prometheus.

Key features of Prometheus include:

  • Time series storage: Metrics are stored as time series data, allowing you to track changes over time.
  • Flexible metric naming: Metric names and labels help you group and filter data for easier analysis.
  • HTTP endpoint scraping: Prometheus collects metrics by regularly scraping designated HTTP endpoints, ensuring you have up-to-date information.
  • Alerting mechanisms: You can set up alerting rules for notification when specific metric conditions are met.
  • Visualization tools: For example, Grafana for dashboarding, allowing you to visualize metrics.

Prometheus metrics are available only when GRE runs as a daemon in distributed mode using the -l command line argument. This is because Prometheus tracks statistics over time, which requires a long running process. For more information on distributed mode, go to Deployment architecture.

You can find metrics at http://localhost:9400/metrics. When GRE is started with the -l option, metrics collection for Prometheus is enabled. For more information on Prometheus and its capabilities, go to the Prometheus documentation.

Prometheus additionally reports metrics that the GRE log file and the GRE daemon Log Window currently provide.

The GRE Prometheus server provides default JVM Metrics. For more information, go to JVM.

Metric types

Metrics are quantitative measurements that provide insights into the performance and behaviour of reports generated. Prometheus supports several metric types. We use the following:
  • Counter: A cumulative metric that represents a single numerical value that only increases (for example, total requests, timeout errors).
  • Gauge: A metric that can go up and down (for example, current memory usage, number of DVMs running).
  • Histogram: A metric that samples observations and counts them in configurable ranges, known as "buckets", that categorize the observed values. Each bucket counts the number of observations within its range, such as response times falling below 100 ms, 500 ms, and 1 second (for example, request duration).

Exposed metrics

Dimension (label) Field name Description Metric type
fourjs_gre_is_alive Health check. Equals 1 if the server is running. Counter
fourjs_gre_nb_of_reports_total Total number of reports. Counter
fourjs_gre_nb_of_report_pages_total Total number of pages. Counter
fourjs_gre_processing_time_in_ms_total Total processing time in milliseconds. Counter
fourjs_gre_nb_of_reports_which_started_in_queue_total This metric counts the total number of reports which started queued. Counter
fourjs_gre_peak_nb_of_concurrent_reports Peak number of concurrent reports. Gauge
fourjs_gre_current_report_queue_length Current number of queued reports. Gauge
fourjs_gre_current_nb_of_concurrent_reports Current number of concurrent reports. Gauge
fourjs_gre_peak_report_queue_length_over_last_period Maximum number of queued reports over the last period, 30 seconds. Gauge
fourjs_gre_peak_nb_of_concurrent_reports_over_last_period Maximum number of reports running concurrently or queued over the last period, 30 seconds. Gauge
fourjs_gre_system_cpu_load The value returned by java.lang.management.OperatingSystemMXBean.getSystemLoadAverage(), see OperatingSystemMXBean (Java Platform SE 8 )
fourjs_gre_system_available_processors The value returned by java.lang.management.OperatingSystemMXBean.getAvailableProcessors(). For more information, go to OperatingSystemMXBean (Java Platform SE 8 )
fourjs_gre_pages_per_second_report_distribution Reports distribution by average number of pages per second. Buckets go from 0-5 to 25+ pages per second, with a step of 5. Histogram
Per report name (report_name) fourjs_gre_nb_of_reports_per_report_name Number of reports by input file name. Counter
Per report name (report_name) fourjs_gre_nb_of_report_pages_per_report_name Number of pages by input file name. Counter
Per report name (report_name) fourjs_gre_processing_time_in_ms_per_report_name Processing time in milliseconds by input file name. Counter
Per output format (output_format) fourjs_gre_nb_of_reports_per_output_format Number of reports by output format. Counter
Per output format (output_format) fourjs_gre_nb_of_report_pages_per_output_format Number of pages by output format. Counter
Per output format (output_format) fourjs_gre_processing_time_in_ms_per_output_format Processing time in milliseconds by output format. Counter
Per user (user) fourjs_gre_nb_of_reports_per_user Number of reports for user. Counter
Per user (user) fourjs_gre_nb_of_report_pages_per_user Number of pages for user. Counter
Per user (user) fourjs_gre_processing_time_in_ms_per_user Processing time in milliseconds for user. Counter
  • Per report name (report_name) refers to the .4rp filename in the attribute PxmlLayouter.styleUrl, and the default is <GenericReport>).
  • Per output format (output_format). pdf, svg, rtf, xlsx, etc. The default is Other).
  • Per user (user) refers to the attribute PxmlLayouter.distributedRequestingUserName, and the default is <Anonymous>).

Time period

Some metrics report values over the last period, typically using gauges that track peak observations within a rolling time window of 30 seconds. This method preserves short spikes that may occur between Prometheus scrapes.

For example, the fourjs_gre_peak_nb_of_concurrent_reports_over_last_period metric records the highest number of concurrent report executions observed during a 30 seconds time window, even if the peak was brief.

To avoid missing these spikes, set the Prometheus scrape interval shorter than 30 seconds.

For more information on Prometheus metrics, go to Understanding metrics in the Genero Application Server User Guide.