EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prometheus role
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible-public
prometheus role
Commits
f379f350
Commit
f379f350
authored
2 years ago
by
Karl Grube
Browse files
Options
Downloads
Patches
Plain Diff
working on prometheus
parent
c9a324a8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
handlers/main.yml
+6
-0
6 additions, 0 deletions
handlers/main.yml
tasks/all.yml
+5
-0
5 additions, 0 deletions
tasks/all.yml
templates/prometheus.yml.j2
+48
-0
48 additions, 0 deletions
templates/prometheus.yml.j2
with
59 additions
and
0 deletions
handlers/main.yml
0 → 100644
+
6
−
0
View file @
f379f350
---
-
name
:
restart prometheus
service
:
name
:
prometheus
state
:
restarted
This diff is collapsed.
Click to expand it.
tasks/all.yml
+
5
−
0
View file @
f379f350
...
...
@@ -8,3 +8,8 @@
name
:
prometheus
state
:
started
enabled
:
yes
-
name
:
promtheus template
template
:
src
:
prometheus.yml.j2
dest
:
/etc/prometheus/prometheus.yml
notify
:
restart prometheus
This diff is collapsed.
Click to expand it.
templates/prometheus.yml.j2
0 → 100644
+
48
−
0
View file @
f379f350
# Sample config for Prometheus.
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'hardware'
# Alertmanager configuration
#alerting:
# alertmanagers:
# - static_configs:
# - targets: ['localhost:9093']
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
scrape_timeout: 5s
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: node
# If prometheus-node-exporter is installed, grab stats about the local
# machine by default.
static_configs:
- targets: ['localhost:9100']
- job_name: dns_scrape
dns_sd_configs:
- names:
- '{{datacenter}}'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment