-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #891 from atyronesmith/add_openstack_network_exporter
telemetry-role: add support for the openstack-network-exporter
- Loading branch information
Showing
5 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
roles/edpm_telemetry/templates/openstack_network_exporter.json.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"image": "{{ edpm_telemetry_openstack_network_exporter_image }}", | ||
"restart": "always", | ||
"recreate": true, | ||
"privileged": true, | ||
"ports": ["9105:9105"], | ||
"command": [], | ||
"net": "host", | ||
"environment": { | ||
"OS_ENDPOINT_TYPE":"internal", | ||
"OPENSTACK_NETWORK_EXPORTER_YAML":"/etc/openstack_network_exporter/openstack_network_exporter.yaml" | ||
}, | ||
{% if edpm_telemetry_healthcheck %} | ||
"healthcheck": { | ||
"test": "/openstack/healthcheck openstack-netwo", | ||
"mount": "/var/lib/openstack/healthchecks/openstack_network_exporter" | ||
}, | ||
{% endif %} | ||
"volumes": [ | ||
"{{ edpm_telemetry_config_dest }}/openstack_network_exporter.yaml:/etc/openstack_network_exporter/openstack_network_exporter.yaml:z", | ||
{% if tls_cert_exists|bool %} | ||
"{{ edpm_telemetry_certs }}:/etc/openstack_network_exporter/tls:z", | ||
{% endif %} | ||
"/var/run/openvswitch:/run/openvswitch:rw,z", | ||
"/var/lib/openvswitch/ovn:/run/ovn:rw,z", | ||
"/proc:/host/proc:ro" | ||
] | ||
} |
124 changes: 124 additions & 0 deletions
124
roles/edpm_telemetry/templates/openstack_network_exporter.yaml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2024 Robin Jarry | ||
# | ||
# This is the configuration file for OpenStack openstack-network-exporter. It is | ||
# written in the YAML format. The exporter will lookup the configuration file | ||
# at /etc/openstack-network-exporter.yaml by default. The path can be changed via | ||
# the OPENSTACK_NETWORK_EXPORTER_YAML environment variable. | ||
# | ||
# All settings have default values and some of them can be overriden via | ||
# environment variables as indicated in their description. | ||
|
||
--- | ||
# Local addess and port to listen to for scraping HTTP requests. Can be | ||
# "127.0.0.1:<port>" or "[::1]:<port>" to limit to localhost. If address is | ||
# omited, listen on all addresses. | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_HTTP_LISTEN | ||
# Default: ":1981" | ||
# | ||
http-listen: ":9105" | ||
|
||
# The HTTP path where to serve responses to prometheus scrapers. | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_HTTP_PATH | ||
# Default: /metrics | ||
# | ||
#http-path: /metrics | ||
|
||
# The path to a TLS certificate to enable HTTPS support. | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_TLS_CERT | ||
# Default: "" | ||
# | ||
{% if tls_cert_exists|bool %} | ||
tls-cert: "/etc/openstack_network_exporter/tls/tls.crt" | ||
{% endif %} | ||
|
||
# The path to a TLS certificate secret key to enable HTTPS support. | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_TLS_KEY | ||
# Default: "" | ||
# | ||
{% if tls_cert_exists|bool %} | ||
tls-key: "/etc/openstack_network_exporter/tls/tls.key" | ||
{% endif %} | ||
|
||
# Space separated list of valid users and passwords. Leave empty to disable | ||
# authentication. Authentication will only be enforced when TLS is enabled. | ||
# | ||
# Example: | ||
# | ||
# auth-users: | ||
# - name: admin | ||
# password: admin | ||
# - name: foobar | ||
# password: s3cr3t | ||
# - name: johndoe | ||
# password: p4ssw0rd | ||
# | ||
# Default: [] | ||
# | ||
#auth-users: [] | ||
|
||
# Overall log verbosity of the exporter. | ||
# | ||
# Supported levels are: debug info notice warning error critical | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_LOG_LEVEL | ||
# Default: notice | ||
# | ||
log-level: info | ||
|
||
# The absolute path to the runtime directory of ovn-controller. This folder is | ||
# expected to contain the the ovn-controller pid file "ovn-controller.pid" and | ||
# its unixctl socket "ovn-controller.$pid.ctl". | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_OVN_RUNDIR | ||
# Default: /run/ovn | ||
# | ||
|
||
# The absolute path to the runtime directory of openvswitch. This folder is | ||
# expected to contain the ovsdb-server socket endpoint "db.sock", the | ||
# "ovs-vswitchd.pid" file and each bridge openflow management sockets | ||
# "$bridge_name.mgmt". | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_OVS_RUNDIR | ||
# Default: /run/openvswitch | ||
# | ||
#ovs-rundir: /run/openvswitch | ||
|
||
# The mount path of the procfs directory to search for the PID found in | ||
# ovs-vswitchd.pid. When running the exporter in a different PID namespace than | ||
# OVS, this will need to be changed to another folder. | ||
# | ||
# Env: OPENSTACK_NETWORK_EXPORTER_OVS_PROCDIR | ||
# Default: /proc | ||
# | ||
ovs-procdir: /host/proc | ||
|
||
# List of metric collectors to scrape and export. To list the available | ||
# collectors and the metrics they export, use "openstack-network-exporter -l". If | ||
# the list is empty (default) all collectors will be enabled. | ||
# | ||
# Default: [] | ||
# | ||
#collectors: [] | ||
#collectors: | ||
# - bridge | ||
# - counters | ||
# List of metric sets to export. This is cumulative with the collectors option. | ||
# The "openstack-network-exporter -l" flag will list all supported metrics along | ||
# with their set name. If the list is empty (default) all metrics from enabled | ||
# collectors will be exported. | ||
# | ||
# Supported sets are: base errors perf counters debug | ||
# | ||
# Default: [base, errors, perf, counters] | ||
# | ||
metric-sets: | ||
- base | ||
- errors | ||
- perf | ||
- counters | ||
- debug |