Info |
---|
ALPHABETA We are actively developing and refining this feature. Usage and APIs are subject to change. Please send your feedback. |
...
Once you have installed Prometheus (https://prometheus.io/docs/prometheus/latest/installation/, no additional packages are required), navigate .
Navigate to the prometheus.yml
configuration file.
...
job_name: You can optionally set this to ‘Connexion’. This can be useful if you choose to include other metrics sources (database servers, AWS, etc.)
scheme: This must be changed to
https
targets: For each Connexion instance you wish to scrape, enter a
- targets: MyCxnServerDnsName:Port
entry.labels / instance: If your server DNS name is not what you want displayed in your dashboards, enter a descriptive name in the
instance
block.insecure_skip_verify: Set this to
true
to tell Prometheus to accept the Connexion self-signed certificate.
Example:
Code Block |
---|
# my global config global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. # scrape_timeout is set to the global default (10s). # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: # - alertmanager:9093 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. rule_files: # - "first_rules.yml" # - "second_rules.yml" # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. - job_name: "Connexion" scheme: https # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ["localhost:8092"] labels: instance: 'JR-Work' tls_config: insecure_skip_verify: true |
Info |
---|
NOTE: Do not use tabs when editing the Prometheus yml file |
Prometheus exposes a web console on port 9090. Navigate to this page on your Prometheus host and then select the Status
menu and Targets
item. If Prometheus is able to scrape the Connexion endpoint, your screen should display an UP
state in green.
...
Once you have confirmed the UP state, you should install and configure Grafana.
Prometheus doesn’t support installation as a service (on Windows) out of the box. If you want to install Prometheus as a service on Windows, you will need to download nssm, or, use the copy of nssm distributed with Grafana. You can use the following commands to install prometheus as a service:
Code Block | ||
---|---|---|
| ||
nssm install prometheus <path to prometheus.exe here>
nssm set prometheus AppParameters --web.listen-address :9092 <--only if you want to change the default port
nssm set prometheus AppParameters --storage.tsdb.retention.time 365d <--only if you want to change the default retention |
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.
Info |
---|
The default username/password to log into Grafana is admin/admin. You will be prompted to change this. |
...
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).
...