About Configuring the TimesTen Exporter and Prometheus with No Authentication

To use the TimesTen exporter and Prometheus without authentication, you must configure Prometheus for use without authentication and then start the Exporter (without authentication).

Prometheus provides a sample configuration in a file called prometheus.yml. This file is available when you download Prometheus. In this file is a section (block) called scrape_configs. You modify the settings of the parameters in this block in order to configure Prometheus to scrape metrics from the Exporter and to scrape such metrics without authentication.

In particular, you modify these settings in the scrape_configs block:
  • job_name: This is the job name that you assign to scrape the metrics from the Exporter. You can specify any name for job_name.
  • metrics_path: This is the HTTP resource path from which Prometheus fetches the TimesTen metrics from the Exporter. The Exporter uses the /metrics HTTP resource path. This is also the Prometheus default HTTP resource path. Therefore, you do not have to set the metrics_path parameter. If not set, Prometheus uses the default /metrics for the HTTP resource path.

  • scheme: This is the protocol scheme used for requests. The HTTP protocol is used when you configure the Exporter and Prometheus without authentication. This is also the Prometheus default. Therefore, you do not have to set the scheme parameter.

  • static_configs block: This block contains the targets parameter. For the targets parameter, you specify the host that the Exporter runs on and the port number that the Exporter listens on. The naming convention is host:portnumber. For example, if the Exporter runs on the myhost host and listens on the 12346 port number, then you set the targets parameter to myhost:12346.

After you modify the Prometheus configuration file, the next step is to start the Exporter. You use the TimesTen ttExporter utility with the -insecure option to start the Exporter. The -insecure option denotes no authentication. The -port p option is required when you start the Exporter (where p is the port number that the Exporter listens on). This port number must match the port number you specify in the Prometheus configuration file. (Specifically, in the Prometheus configuration file, the port number is the port number you supply to the targets parameter of the static_configs block.)

Once you start the Exporter, the Exporter continues to run until you stop it with a signal such as SIGINTR or SIGTERM. You can also have ttExporter write its process ID into a file when you start the Exporter. You use the ttExporter utility with the -pid-file pidfilename option to accomplish this. You can then stop the Exporter by terminating the ttExporter process ID that was stored in the pidfilename file.

See Configuring the TimesTen Exporter and Prometheus with No Authentication for a complete example illustrating how to configure the Exporter and Prometheus to have Prometheus scrape TimesTen metrics from the Exporter (without authentication).

See ttExporter in the Oracle TimesTen In-Memory Database Reference for details on the ttExporter utility.

See https://prometheus.io/docs/prometheus/latest/configuration/configuration/ and https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config for more information on the Prometheus configuration file.