Skip to content

Instantly share code, notes, and snippets.

@tzeejay
Created July 15, 2021 19:07
Show Gist options
  • Save tzeejay/9767cbd368cd933ac313c6956f352d86 to your computer and use it in GitHub Desktop.
Save tzeejay/9767cbd368cd933ac313c6956f352d86 to your computer and use it in GitHub Desktop.
server:
http_listen_port: 9080
grpc_listen_port: 0
clients:
- url: https://endpoint/loki/api/v1/push
scrape_configs:
- job_name: systemd-journal
journal:
labels:
job: systemd-journal
host: housekeeping-api-01.sudosecuritygroup.comi
service: housekeeping-api
agent: promtail
path: /var/log/journal
relabel_configs:
- source_labels: ['__journal__systemd_unit']
target_label: 'unit'
pipeline_stages:
- match:
selector: '{job:"systemd-journal"}'
stages:
- regex:
expression: '\btextIWantToMatchSoThatICanKeepTheseLogsOnly\b'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment