Skip to content

Commit

Permalink
Add syslog source for pfsense
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroPower committed Oct 8, 2023
1 parent 708534c commit ec8bb80
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
6 changes: 6 additions & 0 deletions applications/base/traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ ingressRoute:
# samplingParam: 1.0

providers:
kubernetesCRD:
enabled: true
allowCrossNamespace: true
allowExternalNameServices: true
kubernetesIngress:
enabled: true
allowCrossNamespace: true
allowExternalNameServices: true
publishedService:
enabled: true
pathOverride: traefik/traefik
Expand Down
16 changes: 16 additions & 0 deletions applications/base/vector-aggregator/ingress-pfsense.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
name: pfsense-syslog
annotations:
'external-dns.alpha.kubernetes.io/hostname': 'pfsense-syslog.home.macro.network'
spec:
entryPoints:
- pfsensesyslog
routes:
- services:
- name: pfsense-logs
port: 5140
weight: 10
nativeLB: true
4 changes: 3 additions & 1 deletion applications/base/vector-aggregator/main.jsonnet
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// jsonnet base/vector-aggregator/main.jsonnet -J vendor

[]
local ingressPfsense = std.parseYaml(importstr 'ingress-pfsense.yaml');

ingressPfsense
20 changes: 20 additions & 0 deletions applications/base/vector-aggregator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ customConfig:
type: vector
address: 0.0.0.0:6010
version: "2"
pfsense_logs:
type: syslog
address: 0.0.0.0:5140
mode: udp
vector_metrics:
type: internal_metrics
transforms:
Expand All @@ -42,6 +46,8 @@ customConfig:
labels:
hostname: >-
{{`{{ host }}`}}
source: vector
job: kubernetes-journal
loki_kubernetes:
type: loki
inputs:
Expand Down Expand Up @@ -70,8 +76,22 @@ customConfig:
pod: >-
{{`{{ .pod_name }}`}}
source: vector
job: kubernetes-pods
stream: >-
{{`{{ .stream }}`}}
loki_pfsense:
type: loki
inputs:
- pfsense_logs
endpoint: http://loki-gateway.loki.svc.cluster.local:80
encoding:
codec: json
batch:
max_bytes: 2049000
out_of_order_action: accept
labels:
source: vector
job: pfsense
prom_exporter:
type: prometheus_exporter
inputs:
Expand Down
4 changes: 4 additions & 0 deletions applications/environments/home/traefik/application.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ local app = import '../../../base/traefik/application.libsonnet';
app.withBasePath('applications/environments/home/traefik').withChartParams({
'tlsOptions.default.clientAuth': 'null',
'service.annotations.metallb\\.universe\\.tf/loadBalancerIPs': '10.0.6.1',
'ports.pfsensesyslog.expose': 'true',
'ports.pfsensesyslog.port': '5140',
'ports.pfsensesyslog.exposedPort': '5140',
'ports.pfsensesyslog.protocol': 'UDP',
})

0 comments on commit ec8bb80

Please sign in to comment.