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
80a184f8
Commit
80a184f8
authored
2 years ago
by
Karl Grube
Browse files
Options
Downloads
Patches
Plain Diff
working on prometheus + grafana
parent
7d3036cc
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
handlers/main.yml
+4
-0
4 additions, 0 deletions
handlers/main.yml
tasks/all.yml
+17
-2
17 additions, 2 deletions
tasks/all.yml
templates/prometheus.yml.j2
+0
-2
0 additions, 2 deletions
templates/prometheus.yml.j2
templates/prometheus_site.j2
+26
-0
26 additions, 0 deletions
templates/prometheus_site.j2
with
47 additions
and
4 deletions
handlers/main.yml
+
4
−
0
View file @
80a184f8
...
...
@@ -4,3 +4,7 @@
service
:
name
:
prometheus
state
:
restarted
-
name
:
reload nginx
service
:
name
:
nginx
state
:
reloaded
This diff is collapsed.
Click to expand it.
tasks/all.yml
+
17
−
2
View file @
80a184f8
---
-
name
:
prometheu
s installed
-
name
:
base package
s installed
package
:
name
:
prometheus
name
:
-
prometheus
-
nginx
-
name
:
prometheus started and enabled
service
:
name
:
prometheus
...
...
@@ -14,3 +16,16 @@
dest
:
/etc/prometheus/prometheus.yml
notify
:
restart prometheus
tags
:
prometheus_conf
-
name
:
prometheus site template
template
:
src
:
prometheus_site.j2
dest
:
/etc/nginx/sites-available/prometheus
notify
:
reload nginx
tags
:
nginx
-
name
:
site link
file
:
state
:
link
path
:
/etc/nginx/sites-enabled/prometheus
src
:
../sites-available/prometheus
notify
:
reload nginx
tags
:
nginx
This diff is collapsed.
Click to expand it.
templates/prometheus.yml.j2
+
0
−
2
View file @
80a184f8
...
...
@@ -34,8 +34,6 @@ scrape_configs:
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: dns_scrape
scheme: https
tls_config:
...
...
This diff is collapsed.
Click to expand it.
templates/prometheus_site.j2
0 → 100644
+
26
−
0
View file @
80a184f8
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name {{fqdn}};
#access_log /var/log/nginx_verbose ssl_verbose;
location / {
if ($ssl_client_s_dn != "CN={{grafana_cn}}" ){
return 403;
}
if ($ssl_client_verify != "SUCCESS"){
return 403;
}
proxy_pass http://[::1]:9090;
}
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.3;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA HIGH !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
ssl_certificate '/etc/ssl/step/{{fqdn}}.crt';
ssl_certificate_key '/etc/ssl/step/{{fqdn}}.key';
ssl_session_timeout 10m;
add_header Strict-Transport-Security max-age=15768000;
ssl_client_certificate '/etc/ssl/step/root.ca.crt';
ssl_verify_client on;
}
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