...
Info |
---|
As Prometheus and Grafana are external to Connexion, you can create your own queries, charts, tables, and alerts independent of Connexion version. You can also aggregate data across many different Connexion instances, or other platforms such as AWS, operating systems, database hosts, etc. |
Prometheus
Prometheus is an open-source systems monitoring and alerting toolkit. It is a standalone open source project and maintained independently of any company. To emphasize this, and to clarify the project's governance structure, Prometheus joined the Cloud Native Computing Foundation in 2016 as the second hosted project, after Kubernetes.
Prometheus collects and stores its metrics as time series data, i.e. metrics information is stored with the timestamp at which it was recorded, alongside optional key-value pairs called labels.
Grafana
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share beautiful dashboards with your team and foster a data driven culture. Read more about Grafana.
Architecture Overview
Connexion metrics are http-hosted in the Prometheus text format. Connexion aggregates metrics across all child processes and then surfaces them over an http(s) connection. Prometheus is configured to ingest these metrics and store them in its time-series database. The frequency of ingestion and the data retention period are configurable within Prometheus.
...
Info |
---|
Prometheus and Grafana are not installed as part of Connexion. You must download and install them yourself. They support many different platforms, both on-site and cloud. |
Performance Implications
In order to minimize any performance degradation, each metric can be individually enabled (often on a per-channel basis). We strongly recommend you only enable metrics being actively monitored, or, only enable metrics required for debugging/diagnostic purposes temporarily.
Using a Grafana dashboard to monitor the performance of Connexion servers can be a good way to gauge the impact of enabled metrics.
Enable Connexion Metrics
The Connexion metrics platform is disabled by default. To enable the metrics endpoint (which will be scraped by Prometheus), run the Configuration Wizard and navigate to the Services Options
page.
...
Once you have confirmed the metrics endpoint is working, you will need to point your installed copy of Prometheus at it.
Prometheus Scraping
Once you have installed Prometheus (https://prometheus.io/docs/prometheus/latest/installation/, no additional packages are required), navigate to the prometheus.yml
configuration file.
...
Once you have confirmed the UP state, you should install and configure Grafana.
Grafana Configuration
Once installed, Grafana exposes a web console on port 3000. Navigate to your Grafana host and select the Add your first data source
link.
...
Select the Prometheus option and fill in the Host address. If your Grafana instance will be accessible outside a secured network, you must secure it (there are many options for this).
Now that you have the metrics infrastructure in place, learn how to create and configure metrics within Connexion.