summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Taggart <taggart@riseup.net>2015-01-22 13:10:10 -0800
committerMatt Taggart <taggart@riseup.net>2015-04-16 21:15:24 +0000
commit4ced0c5bbe605c322dc4103c3572ae18e69fa278 (patch)
tree6e023a7b631a8c8e554331e69a66358e433a9222
parentbdfc4c3c3be065c3d9110cb49bb3609d643e6041 (diff)
improve comments for ps stuff
-rw-r--r--manifests/ps.pp13
-rw-r--r--manifests/server/collect_ps.pp3
2 files changed, 11 insertions, 5 deletions
diff --git a/manifests/ps.pp b/manifests/ps.pp
index c84f583..1171a13 100644
--- a/manifests/ps.pp
+++ b/manifests/ps.pp
@@ -6,8 +6,12 @@ define check_mk::ps (
$levels = '1, 1, 1, 1',
$user = undef
) {
+ # This class is called on check-mk agent machines in order to create
+ # checks using the built-in ps check type. They create stored configs
+ # and then the check_mk::server::collect_ps class on the server
+ # generates the config file to set them up
- # lines look like
+ # lines in the ps.mk config file look like
# ( "foo.example.com", "ps", "NAME", ( "/usr/sbin/foo", 1, 1, 1, 1 ) )
# or with a user
# ( "foo.example.com", "ps", "NAME", ( "/usr/sbin/foo", "user", 1, 1, 1, 1 ) )
@@ -17,9 +21,10 @@ define check_mk::ps (
$check = " ( \"${host}\", \"ps\", \"${desc}\", ( \"${procname}\", ${levels} ) ),\n"
}
- # FIXME: we could be smarter about this and consolidate host checks that have
- # identical settings and that would make the config file make more sense
- # for humans. but for now we'll just do separate lines.
+ # FIXME: we could be smarter about this and consolidate host checks
+ # that have identical settings and that would make the config file
+ # make more sense for humans. but for now we'll just do separate
+ # lines (which may result in a very large file, but check-mk is fine)
concat::fragment { "check_mk_ps-${host}_${desc}":
target => $target,
content => $check,
diff --git a/manifests/server/collect_ps.pp b/manifests/server/collect_ps.pp
index 7a0fb8f..067a25c 100644
--- a/manifests/server/collect_ps.pp
+++ b/manifests/server/collect_ps.pp
@@ -2,6 +2,8 @@ class check_mk::server::collect_ps (
$config = "${::check_mk::config::etc_dir}/check_mk/conf.d/ps.mk"
) {
+ # this class gets run on the check-mk server in order to collect the
+ # stored configs created on clients and assemble the ps.mk config file
concat { $config:
owner => 'root',
group => 'root',
@@ -25,5 +27,4 @@ class check_mk::server::collect_ps (
content => "]\n",
order => 90,
}
-
}