Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart: prometheus-mikrotik-exporter v0.5.0 #5

Merged
merged 6 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ jobs:
with:
version: v3.14.4

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-releaser
uses: helm/[email protected]
if: startsWith(github.ref, 'refs/tags/')
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 2 additions & 2 deletions charts/prometheus-mktxp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus-mktxp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
14 changes: 14 additions & 0 deletions charts/prometheus-mktxp/templates/poddistruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
107 changes: 83 additions & 24 deletions charts/prometheus-mktxp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ replicaCount: 1
image:
repository: ghcr.io/akpw/mktxp
pullPolicy: IfNotPresent
tag: "stable-20240603114403"
tag: "stable-20240821070725"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -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