updated vector state

This commit is contained in:
Paul 2023-12-06 04:10:43 +01:00
parent 9e82f25dd7
commit 2f62aaf91f
6 changed files with 27 additions and 24 deletions

View File

@ -4,27 +4,27 @@ vector-default:
file.managed: file.managed:
- name: /etc/default/vector - name: /etc/default/vector
- source: salt://vector/templates/vector.default.j2 - source: salt://vector/templates/vector.default.j2
- user: root - user: vector
- group: root - group: vector
- mode: 600 - mode: 600
- template: jinja - template: jinja
vector-config-dir: vector-config-dir:
file.directory: file.directory:
- name: /etc/vector - name: /etc/vector
- user: root - user: vector
- group: root - group: vector
- mode: 700 - mode: 700
# - watch_in: - watch_in:
# - service: vector-service - service: vector-service
vector-config-file: vector-config-file:
file.managed: file.managed:
- name: /etc/vector/vector.conf - name: /etc/vector/vector.yaml
- source: salt://vector/templates/vector.toml.j2 - source: salt://vector/templates/vector.yaml.j2
- user: root - user: vector
- group: root - group: vector
- mode: 600 - mode: 600
- template: jinja - template: jinja
# - watch_in: - watch_in:
# - service: vector-service - service: vector-service

View File

@ -4,7 +4,7 @@ vector:
install_dir: /usr/local/apps install_dir: /usr/local/apps
release_dir: /usr/local/apps/releases release_dir: /usr/local/apps/releases
mirror: https://github.com/vectordotdev/vector/releases/download mirror: https://github.com/vectordotdev/vector/releases/download
version: 0.32.1 version: 0.34.1
os: linux os: linux
arch: amd64 arch: amd64
variant: gnu variant: gnu

View File

@ -2,4 +2,4 @@
include: include:
- .install - .install
- .config - .config
#- .service - .service

View File

@ -9,8 +9,8 @@ vector-archive-extract:
- options: > - options: >
--strip 2 --strip 2
- if_missing: {{ vector.release_dir }}/vector-{{ vector.version }}/bin/vector - if_missing: {{ vector.release_dir }}/vector-{{ vector.version }}/bin/vector
# - watch_in: - watch_in:
# - service: vector-service - service: vector-service
vector-binary-symlink: vector-binary-symlink:
file.symlink: file.symlink:
@ -19,11 +19,11 @@ vector-binary-symlink:
- force: true - force: true
- require: - require:
- archive: vector-archive-extract - archive: vector-archive-extract
# - watch_in: - watch_in:
# - service: vector-service - service: vector-service
vector-cleanup: vector-cleanup:
software.cleanup: software.cleanup:
- name: vector - name: vector
- path: {{ vector.release_dir }} - path: {{ vector.release_dir }}
- version: "v{{ vector.version }}" - version: "{{ vector.version }}"

View File

@ -9,16 +9,15 @@ Requires=network-online.target
[Service] [Service]
User=vector User=vector
Group=vector Group=vector
ExecStartPre=/usr/bin/vector validate ExecStartPre=/usr/local/bin/vector validate
ExecStart=/usr/bin/vector ExecStart=/usr/local/bin/vector
ExecReload=/usr/bin/vector validate ExecReload=/usr/local/bin/vector validate
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
Restart=always Restart=always
AmbientCapabilities=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=-/etc/default/vector EnvironmentFile=-/etc/default/vector
# Since systemd 229, should be in [Unit] but in order to support systemd <229,
# it is also supported to have it here.
StartLimitInterval=10 StartLimitInterval=10
StartLimitBurst=5 StartLimitBurst=5
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -0,0 +1,4 @@
{%- from "vector/map.jinja" import vector with context -%}
---
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{{ vector.config|yaml(False) }}