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
8150411b
Commit
8150411b
authored
1 year ago
by
Nicolas Baudoin
Browse files
Options
Downloads
Patches
Plain Diff
Updated the Prometheus role
parent
7cf85974
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
defaults/main.yml
+1
-0
1 addition, 0 deletions
defaults/main.yml
tasks/debian.yml
+7
-0
7 additions, 0 deletions
tasks/debian.yml
tasks/main.yml
+7
-1
7 additions, 1 deletion
tasks/main.yml
templates/prometheus_systemd.j2
+46
-0
46 additions, 0 deletions
templates/prometheus_systemd.j2
with
61 additions
and
1 deletion
defaults/main.yml
+
1
−
0
View file @
8150411b
...
...
@@ -9,3 +9,4 @@ prometheus_client_cn: "prometheus.{{domain_name}}"
prometheus_federators
:
[]
prometheus_federator
:
False
backup_prometheus
:
True
use_service_vrf
:
False
This diff is collapsed.
Click to expand it.
tasks/debian.yml
+
7
−
0
View file @
8150411b
...
...
@@ -11,3 +11,10 @@
src
:
default_prometheus.j2
notify
:
restart prometheus
tags
:
prometheus_conf
-
name
:
systemd file
template
:
src
:
prometheus_systemd.j2
dest
:
/etc/systemd/system/prometheus.service
notify
:
restart prometheus
tags
:
systemd
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
7
−
1
View file @
8150411b
...
...
@@ -10,7 +10,13 @@
-
import_tasks
:
service.yml
-
include_tasks
:
"
{{ansible_os_family|lower}}.yml"
tags
:
prometheus_conf
tags
:
prometheus_conf,systemd
-
name
:
set my interfaces
import_role
:
name
:
my_interfaces
when
:
my_interfaces is defined
tags
:
my_interfaces
-
name
:
client certificates
import_role
:
...
...
This diff is collapsed.
Click to expand it.
templates/prometheus_systemd.j2
0 → 100644
+
46
−
0
View file @
8150411b
[Unit]
Description=Monitoring system and time series database
Documentation=https://prometheus.io/docs/introduction/overview/ man:prometheus(1)
[Service]
Restart=on-failure
User=prometheus
EnvironmentFile=/etc/default/prometheus
ExecStart=/usr/bin/prometheus $ARGS
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=20s
SendSIGKILL=no
# IP rule adjustments for Prometheus
{% if use_service_vrf == True %}
ExecStartPre=+/usr/sbin/ip -6 rule add dport 9100 lookup service priority 900
ExecStartPre=+/usr/sbin/ip -6 rule add from all sport 9100 lookup service priority 899
ExecStop=+/usr/sbin/ip -6 rule del from all sport 9100 lookup service priority 899
ExecStop=+/usr/sbin/ip -6 rule del dport 9100 lookup service priority 900
{% endif %}
# systemd hardening-options
AmbientCapabilities=
CapabilityBoundingSet=
DeviceAllow=/dev/null rw
DevicePolicy=strict
LimitMEMLOCK=0
LimitNOFILE=8192
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
PrivateUsers=true
ProtectControlGroups=true
ProtectHome=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=full
RemoveIPC=true
RestrictNamespaces=true
RestrictRealtime=true
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target
\ No newline at end of file
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