remove portainer and promtail

This commit is contained in:
2024-07-20 04:26:02 +01:00
parent cd4f19e4cf
commit 41a53cc221
5 changed files with 2 additions and 77 deletions

View File

@@ -98,14 +98,11 @@ docker volume create --driver local --opt type=none --opt device=/ --opt o=bind
### Portainer
mantained by ansible [myInfra.dev.homesrv01 role](ansible/roles/myInfra.dev.homesrv01/README.md)
mantained by ansible myInfra.docker.portainer role
### Promtail
#### Setup & Update
``` bash
services/promtail/docker-run.sh
```
mantained by ansible myInfra.docker.promtail role
### telegraf

View File

@@ -3,8 +3,6 @@ scriptPath="$(dirname "$(readlink -f "$0")")"
doWork(){
apt update -y
apt upgrade -y
#$scriptPath/../services/portainer/docker-run.sh
$scriptPath/../services/promtail/docker-run.sh
$scriptPath/../services/telegraf/docker-run.sh
$scriptPath/../services/code-server/docker-run.sh
$scriptPath/../services/nginx/docker-run.sh

View File

@@ -1,5 +0,0 @@
#! /bin/bash
docker pull portainer/portainer-ce
docker stop portainer
docker rm portainer
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer:/data portainer/portainer-ce

View File

@@ -1,49 +0,0 @@
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://lansrv01.dev.lan:3100/loki/api/v1/push
scrape_configs:
- job_name: varlogs
static_configs:
- targets:
- localhost
labels:
job: varlogs
host: homesrv01
__path__: /var/log/*log
- job_name: systemd-journal
journal:
json: true
max_age: 12h
path: /var/log/journal
# matches: _TRANSPORT=kernel
labels:
job: systemd-journal
host: homesrv01
relabel_configs:
- source_labels: ['__journal__systemd_unit']
target_label: 'journal_systemd_unit'
- source_labels: ['__journal_syslog_identifier']
target_label: 'journal_syslog_identifier'
- source_labels: ['__journal__hostname']
target_label: 'journal_hostname'
- job_name: docker
docker_sd_configs:
- host: unix:///var/run/docker.sock
refresh_interval: 1s
pipeline_stages:
- static_labels:
host: "homesrv01"
job: "docker"
relabel_configs:
- source_labels: ['__meta_docker_container_name']
regex: '/(.*)'
target_label: "container_name"
- source_labels: ['__meta_docker_container_id']
target_label: "container_id"

View File

@@ -1,16 +0,0 @@
#! /bin/bash
docker container stop promtail
docker container remove promtail
scriptPath="$(dirname "$(readlink -f "$0")")"
docker run -d \
--name promtail \
-v ${scriptPath}/config:/mnt/config \
-v /var/log:/var/log \
-v /var/log/journal/:/var/log/journal/ \
-v /run/log/journal/:/run/log/journal/ \
-v /etc/machine-id:/etc/machine-id \
-v /var/run/docker.sock:/var/run/docker.sock \
grafana/promtail:latest \
-config.file=/mnt/config/promtail-config.yaml