diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 36802a6..4b019db 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,10 +27,8 @@ jobs: with: version: v3.14.4 - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.6.1 - - name: Run chart-releaser uses: helm/chart-releaser-action@v1.6.0 + if: startsWith(github.ref, 'refs/tags/') env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/prometheus-mktxp/Chart.yaml b/charts/prometheus-mktxp/Chart.yaml index 0380fc4..6ef62e6 100644 --- a/charts/prometheus-mktxp/Chart.yaml +++ b/charts/prometheus-mktxp/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: prometheus-mikrotik-exporter description: Prometheus Exporter for Mikrotik RouterOS devices. type: application -version: 0.4.0 -appVersion: "v1.2.6" +version: 0.5.0 +appVersion: "v1.2.7" home: https://github.com/akpw/mktxp maintainers: - name: VRS-Factory diff --git a/charts/prometheus-mktxp/templates/deployment.yaml b/charts/prometheus-mktxp/templates/deployment.yaml index 2f485c8..1b84f9a 100644 --- a/charts/prometheus-mktxp/templates/deployment.yaml +++ b/charts/prometheus-mktxp/templates/deployment.yaml @@ -108,3 +108,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/prometheus-mktxp/templates/poddistruptionbudget.yaml b/charts/prometheus-mktxp/templates/poddistruptionbudget.yaml new file mode 100644 index 0000000..e16140d --- /dev/null +++ b/charts/prometheus-mktxp/templates/poddistruptionbudget.yaml @@ -0,0 +1,14 @@ +{{- if .Values.podDisruptionBudget -}} +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: {{ template "prometheus-mktxp.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "prometheus-mktxp.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "prometheus-mktxp.selectorLabels" . | nindent 6 }} +{{ toYaml .Values.podDisruptionBudget | indent 2 }} +{{- end }} diff --git a/charts/prometheus-mktxp/values.yaml b/charts/prometheus-mktxp/values.yaml index dd01257..dcab2f4 100644 --- a/charts/prometheus-mktxp/values.yaml +++ b/charts/prometheus-mktxp/values.yaml @@ -3,7 +3,7 @@ replicaCount: 1 image: repository: ghcr.io/akpw/mktxp pullPolicy: IfNotPresent - tag: "stable-20240603114403" + tag: "stable-20240821070725" imagePullSecrets: [] nameOverride: "" @@ -49,71 +49,130 @@ tolerations: [] affinity: {} +topologySpreadConstraints: [] + annotations: {} +podDisruptionBudget: {} + # maxUnavailable: 0 + config: - # mktxp + # mktxp.conf router: existingSecret: "" existingSecretKey: config value: | - ## Source: https://github.com/akpw/mktxp/blob/main/mktxp/cli/config/mktxp.conf ## Copyright (c) 2020 Arseniy Kuznetsov + ## + ## This program is free software; you can redistribute it and/or + ## modify it under the terms of the GNU General Public License + ## as published by the Free Software Foundation; either version 2 + ## of the License, or (at your option) any later version. + ## + ## This program is distributed in the hope that it will be useful, + ## but WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ## GNU General Public License for more details. [Sample-Router] - enabled = True # turns metrics collection for this RouterOS device on / off - hostname = localhost # RouterOS IP address - port = 8728 # RouterOS IP Port - username = username # RouterOS user, needs to have 'read' and 'api' permissions - password = password # RouterOS password + # for specific configuration on the router level, change here the defaults values from below + hostname = 192.168.88.1 + + [default] + # this affects configuration of all routers, unless overloaded on their specific levels + + enabled = True # turns metrics collection for this RouterOS device on / off + hostname = localhost # RouterOS IP address + port = 8728 # RouterOS IP Port + + username = username # RouterOS user, needs to have 'read' and 'api' permissions + password = password + use_ssl = False # enables connection via API-SSL servis no_ssl_certificate = False # enables API_SSL connect without router SSL certificate ssl_certificate_verify = False # turns SSL certificate verification on / off + plaintext_login = True # for legacy RouterOS versions below 6.43 use False + installed_packages = True # Installed packages dhcp = True # DHCP general metrics dhcp_lease = True # DHCP lease metrics + connections = True # IP connections metrics connection_stats = False # Open IP connections metrics - pool = True # Pool metrics + interface = True # Interfaces traffic metrics + + route = True # IPv4 Routes metrics + pool = True # IPv4 Pool metrics firewall = True # IPv4 Firewall rules traffic metrics + neighbor = True # IPv4 Reachable Neighbors + + ipv6_route = False # IPv6 Routes metrics + ipv6_pool = False # IPv6 Pool metrics ipv6_firewall = False # IPv6 Firewall rules traffic metrics - ipv6_neighbor = False # Reachable IPv6 Neighbors + ipv6_neighbor = False # IPv6 Reachable Neighbors + poe = True # POE metrics monitor = True # Interface monitor metrics netwatch = True # Netwatch metrics public_ip = True # Public IP metrics - route = True # Routes metrics wireless = True # WLAN general metrics wireless_clients = True # WLAN clients metrics capsman = True # CAPsMAN general metrics capsman_clients = True # CAPsMAN clients metrics - kid_control_devices = False # Kid Control metrics + + lte = False # LTE signal and status metrics (requires additional 'test' permission policy on RouterOS v6) + ipsec = False # IPSec active peer metrics + switch_port = False # Switch Port metrics + + kid_control_assigned = False # Allow Kid Control metrics for connected devices with assigned users + kid_control_dynamic = False # Allow Kid Control metrics for all connected devices, including those without assigned user + user = True # Active Users metrics queue = True # Queues metrics - remote_dhcp_entry = None # An MKTXP entry for remote DHCP info resolution (capsman/wireless) + + bgp = False # BGP sessions metrics + + remote_dhcp_entry = None # An MKTXP entry to provide for remote DHCP info / resolution + remote_capsman_entry = None # An MKTXP entry to provide for remote capsman info + use_comments_over_names = True # when available, forces using comments over the interfaces names check_for_updates = False # check for available ROS updates - # _mktxp + # _mktxp.conf scrapper: existingSecret: "" existingSecretKey: config value: | - ## Source: https://github.com/akpw/mktxp/blob/main/mktxp/cli/config/_mktxp.conf ## Copyright (c) 2020 Arseniy Kuznetsov + ## + ## This program is free software; you can redistribute it and/or + ## modify it under the terms of the GNU General Public License + ## as published by the Free Software Foundation; either version 2 + ## of the License, or (at your option) any later version. + ## + ## This program is distributed in the hope that it will be useful, + ## but WITHOUT ANY WARRANTY; without even the implied warranty of + ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ## GNU General Public License for more details. [MKTXP] - port = 49090 - socket_timeout = 2 + listen = '0.0.0.0:49090' # Space separated list of socket addresses to listen to, both IPV4 and IPV6 + socket_timeout = 5 + initial_delay_on_failure = 120 max_delay_on_failure = 900 delay_inc_div = 5 - bandwidth = False # Turns metrics bandwidth metrics collection on / off - bandwidth_test_interval = 600 # Interval for colllecting bandwidth metrics - minimal_collect_interval = 5 # Minimal metric collection interval - verbose_mode = False # Set it on for troubleshooting - fetch_routers_in_parallel = False # Set to True if you want to fetch multiple routers parallel + + bandwidth = False # Turns metrics bandwidth metrics collection on / off + bandwidth_test_interval = 600 # Interval for collecting bandwidth metrics + minimal_collect_interval = 5 # Minimal metric collection interval + + verbose_mode = False # Set it on for troubleshooting + + fetch_routers_in_parallel = False # Fetch metrics from multiple routers in parallel / sequentially max_worker_threads = 5 # Max number of worker threads that can fetch routers (parallel fetch only) - max_scrape_duration = 10 # Max duration of individual routers' metrics collection (parallel fetch only) - total_max_scrape_duration = 30 # Max overall duration of all metrics collection (parallel fetch only) + max_scrape_duration = 30 # Max duration of individual routers' metrics collection (parallel fetch only) + total_max_scrape_duration = 90 # Max overall duration of all metrics collection (parallel fetch only) + + compact_default_conf_values = False # Compact mktxp.conf, so only specific values are kept on the individual routers' level