Skip to content

Commit

Permalink
Upgrade/promtail (#62)
Browse files Browse the repository at this point in the history
fix(promtail): upgrade to 2.9.1
fix(promtail): label journal jobs with host name

Closed #60
Closed #59

ci: use tailscale oauth key
ci: use oauth key id and secret to authenticate to tailscale
ci: use v2 of tailscale setup action
ci: add ci tag to the github runner tailscale machine

---------

Signed-off-by: Bruce Becker <brucellino@protonmail.com>
  • Loading branch information
brucellino authored Oct 14, 2023
1 parent 40ec3f6 commit 1fd5fb5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ jobs:
- name: check
run: echo "${{ steps.changes.outputs.NOMAD_FILES_CHANGED }}"
- name: Setup Tailscale
uses: tailscale/github-action@main
uses: tailscale/github-action@v2
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_KEY }}
tags: tag:ci
- name: check connectivity
run: ifconfig ; host sense.orca-ordinal.ts.net
- name: Checkout change
Expand Down
56 changes: 30 additions & 26 deletions monitoring/templates/promtail.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,33 @@ clients:
- url: http://localhost:9999/loki/loki/api/v1/push

scrape_configs:
- job_name: consul
static_configs:
- targets:
- localhost
labels:
job: consul
__path__: /home/consul/*.log
- job_name: nomad
static_configs:
- targets:
- localhost
labels:
job: nomad
__path__: /var/log/nomad*.log
- job_name: journal
journal:
max_age: 12h
path: /var/log/journal
matches: _TRANSPORT
labels:
job: systemd-journal
relabel_configs:
- source_labels: ['__journal__systemd_unit']
target_label: 'unit'
- source_labels: ['__journal_syslog_identifier']
target_label: 'syslog_identifier'
- job_name: consul
static_configs:
- targets:
- localhost
labels:
job: consul
__path__: /home/consul/*.log
- job_name: nomad
static_configs:
- targets:
- localhost
labels:
job: nomad
__path__: /var/log/nomad*.log
- job_name: journal
journal:
json: false
max_age: 12h
path: /var/log/journal
matches: _TRANSPORT=kernel
labels:
job: systemd-journal
relabel_configs:
- source_labels: ['__journal__systemd_unit']
target_label: 'unit'
- source_labels: ['__journal_syslog_identifier']
target_label: 'syslog_identifier'
- source_labels:
- __journal__hostname
target_label: nodename

0 comments on commit 1fd5fb5

Please sign in to comment.