Gitlab Community Edition Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GWDG-Puppet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Benedikt Wegmann
GWDG-Puppet
Commits
8f00d9aa
Commit
8f00d9aa
authored
8 years ago
by
Benedikt Wegmann
Browse files
Options
Downloads
Patches
Plain Diff
monit: template für Dateisysteme
parent
e5c32b4b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
files/etc/monit/conf.d/system
+2
-9
2 additions, 9 deletions
files/etc/monit/conf.d/system
manifests/monit.pp
+7
-1
7 additions, 1 deletion
manifests/monit.pp
templates/etc/monit/conf.d/filesystems.erb
+6
-0
6 additions, 0 deletions
templates/etc/monit/conf.d/filesystems.erb
with
15 additions
and
10 deletions
files/etc/monit/conf.d/system
+
2
−
9
View file @
8f00d9aa
check system $HOST
# if loadavg (5min) > 8 for 4 cycles then alert
# if memory usage > 80% for 4 cycles then alert
# if cpu usage (user) > 80% for 4 cycles then alert
# if cpu usage (system) > 50% for 4 cycles then alert
# if cpu usage (wait) > 50% for 4 cycles then alert
check filesystem root with path /
if space usage > 80% for 5 times within 15 cycles then alert
if inode usage > 80% for 5 times within 15 cycles then alert
if memory usage > 90% for 4 cycles then alert
if cpu usage (wait) > 50% for 4 cycles then alert
This diff is collapsed.
Click to expand it.
manifests/monit.pp
+
7
−
1
View file @
8f00d9aa
class
ubuntu_server::monit
(
$admin_user
=
"madmin"
,
$admin_passwd
=
"gEt0ffMyL4wn"
,
$admin_emails
,
$mailserver
=
"mailer.gwdg.de"
,
$monit_basis_config_template
=
"ubuntu_server/etc/monit/conf.d/config.erb"
,
$monit_config_dir
=
"puppet:///modules/ubuntu_server/etc/monit/conf.d"
)
{
class
ubuntu_server::monit
(
$admin_user
=
"madmin"
,
$admin_passwd
=
"gEt0ffMyL4wn"
,
$admin_emails
,
$mailserver
=
"mailer.gwdg.de"
,
$monit_basis_config_template
=
"ubuntu_server/etc/monit/conf.d/config.erb"
,
$monit_filesystems_config_template
=
"ubuntu_server/etc/monit/conf.d/filesystems.erb"
,
$monit_config_dir
=
"puppet:///modules/ubuntu_server/etc/monit/conf.d"
)
{
File
{
owner
=>
root
,
...
...
@@ -16,6 +16,12 @@ class ubuntu_server::monit($admin_user = "madmin", $admin_passwd = "gEt0ffMyL4wn
require
=>
Package
[
'monit'
],
}
~>
Service
[
'monit'
]
file
{
'/etc/monit/conf.d/filesystems'
:
ensure
=>
present
,
content
=>
template
(
$monit_filesystems_config_template
),
require
=>
Package
[
'monit'
],
}
~>
Service
[
'monit'
]
service
{
'monit'
:
ensure
=>
running
,
require
=>
Package
[
'monit'
],
...
...
This diff is collapsed.
Click to expand it.
templates/etc/monit/conf.d/filesystems.erb
0 → 100644
+
6
−
0
View file @
8f00d9aa
<%
@local_volumes
.
each
do
|
volume
|
-%>
check filesystem fs_
<%=
volume
%>
with path
<%=
volume
%>
if space usage > 80% for 5 times within 15 cycles then alert
if inode usage > 80% for 5 times within 15 cycles then alert
<%
end
-%>
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