add: prometheus
This commit is contained in:
parent
4abd64dbc9
commit
27d74362d3
13
prometheus/docker-compose/prometheus/docker-compose.yaml
Normal file
13
prometheus/docker-compose/prometheus/docker-compose.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
ports:
|
||||
- 4117:9090
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus-config:/etc/prometheus
|
||||
- prom_data:/prometheus
|
||||
volumes:
|
||||
prom_data:
|
||||
@ -0,0 +1,24 @@
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 15s
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- static_configs:
|
||||
- targets: []
|
||||
scheme: http
|
||||
timeout: 10s
|
||||
api_version: v1
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
honor_timestamps: true
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
metrics_path: /metrics
|
||||
scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost:9090
|
||||
# - job_name: elzim # Change to whatever you like
|
||||
# static_configs:
|
||||
# - targets: ['192.168.2.66:9100'] #Change this to your server's IP
|
||||
26
prometheus/jenkins/Jenkinsfile
vendored
Normal file
26
prometheus/jenkins/Jenkinsfile
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Git pull && docker compose restart') {
|
||||
steps {
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'infra.1', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''cd /home/rschneider/infra
|
||||
git pull
|
||||
cd /home/rschneider/infra/prometheus/docker-compose/prometheus
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
''', execTimeout: 120000,
|
||||
flatten: false,
|
||||
makeEmptyDirs: false,
|
||||
noDefaultExcludes: false,
|
||||
patternSeparator: '[, ]+',
|
||||
remoteDirectory: '',
|
||||
remoteDirectorySDF: false,
|
||||
removePrefix: '', sourceFiles: '')],
|
||||
usePromotionTimestamp: false,
|
||||
useWorkspaceInPromotion: false,
|
||||
verbose: true)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -25,3 +25,4 @@ router redirects port range 4100-4200 to the infra server
|
||||
| 4114 | pihole | pihole web | https://pihole.rschneider.net |
|
||||
| 4115 | nextcloud | nextcloud web | https://nextcloud.rschneider.net |
|
||||
| 4116 | grafana | grafana web | https://grafana.rschneider.net |
|
||||
| 4117 | prometheus | prometheus web | https://prometheus.rschneider.net |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user