-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
240 additions
and
31 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
170 changes: 170 additions & 0 deletions
170
k8s/turingpi/apps/monitoring/mktxp-exporter/app/helmrelease.yaml
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,170 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: mktxp-exporter | ||
namespace: monitoring | ||
spec: | ||
interval: 5m | ||
chart: | ||
spec: | ||
chart: app-template | ||
version: 3.5.1 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: bjw-s | ||
namespace: flux-system | ||
interval: 1m | ||
values: | ||
defaultPodOptions: | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
fsGroup: 65534 | ||
fsGroupChangePolicy: OnRootMismatch | ||
seccompProfile: | ||
type: RuntimeDefault | ||
controllers: | ||
mktxp-exporter: | ||
replicas: 1 | ||
containers: | ||
app: | ||
image: | ||
repository: ghcr.io/akpw/mktxp | ||
tag: stable-20240821070725 | ||
pullPolicy: IfNotPresent | ||
resources: | ||
limits: | ||
memory: 128Mi | ||
requests: | ||
cpu: 10m | ||
memory: 32Mi | ||
probes: | ||
liveness: | ||
enabled: true | ||
readiness: | ||
enabled: true | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: ["ALL"] | ||
service: | ||
app: | ||
controller: mktxp-exporter | ||
ports: | ||
metrics: | ||
port: 49090 | ||
protocol: HTTP | ||
serviceMonitor: | ||
app: | ||
serviceName: mktxp-exporter | ||
endpoints: | ||
- port: metrics | ||
persistence: | ||
config: | ||
type: secret | ||
name: mktxp-exporter-config | ||
defaultMode: 0400 | ||
globalMounts: | ||
- path: /mktxp | ||
secrets: | ||
config: | ||
stringData: | ||
mktxp.conf: |- | ||
[CRS310] | ||
hostname = 192.168.254.253 | ||
[default] | ||
username = ${NET_MONITORING_USER} | ||
password = ${NET_MONITORING_PASS} | ||
enabled = True # turns metrics collection for this RouterOS device on / off | ||
hostname = localhost # RouterOS IP address | ||
port = 8728 # RouterOS IP Port | ||
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 | ||
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 # IPv6 Reachable Neighbors | ||
poe = True # POE metrics | ||
monitor = True # Interface monitor metrics | ||
netwatch = True # Netwatch metrics | ||
public_ip = True # Public IP metrics | ||
wireless = True # WLAN general metrics | ||
wireless_clients = True # WLAN clients metrics | ||
capsman = True # CAPsMAN general metrics | ||
capsman_clients = True # CAPsMAN clients 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 | ||
bgp = False # BGP sessions metrics | ||
certificate = False # Certificates 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.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 | ||
[MKTXP] | ||
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 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 = 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 |
6 changes: 6 additions & 0 deletions
6
k8s/turingpi/apps/monitoring/mktxp-exporter/app/kustomization.yaml
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,6 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./helmrelease.yaml |
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,25 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app mktxp-exporter | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: monitoring | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
path: ./k8s/turingpi/apps/monitoring/mktxp-exporter/app | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: homelab | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 5m | ||
postBuild: | ||
substituteFrom: | ||
- kind: Secret | ||
name: cluster-secrets |
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