Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
checkmk-formula
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
salt
checkmk-formula
Commits
17161344
Commit
17161344
authored
5 years ago
by
Dennis Ahrens
Browse files
Options
Downloads
Patches
Plain Diff
Proper location for gluster and documentation
parent
bb58e423
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+83
-0
83 additions, 0 deletions
README.md
checkmk/custom-files/gluster
+51
-0
51 additions, 0 deletions
checkmk/custom-files/gluster
checkmk/debian/gluster.sls
+1
-1
1 addition, 1 deletion
checkmk/debian/gluster.sls
with
135 additions
and
1 deletion
README.md
+
83
−
0
View file @
17161344
...
...
@@ -2,3 +2,86 @@
This formula provides rough capabilities to install the checkmk-agent and basic plugins that come with it.
It also contains a rough construction to run eapol_test against radsecproxy or freeradius.
## Structure of this formula
### States
*
`checkmk/debian/`
all states related to debian based boxes.
*
`checkmk/freebsd.sls`
for freebsd we are only able to roll out the agent - this state does it.
### Files used by states and needed for our minions.
*
`checkmk/checkmk_files/`
contains files that came from check_mk itself.
Including files to install checkmk agent and agent plugins that were distributed by check mk itself.
*
`checkmk/custom_files/`
contains agent plugins we've written ourselfes
*
`checkmk/third-party-files/`
contains agent plugins provided by someone else
## States
This formula provides several states that install or configure checkmk further.
The following example shows how to install the agent on a minion together with additional plugins.
**/srv/salt/top.sls**
```
base:
'yourminionglob':
- checkmk.debian
- checkmk.debian.mk_apt
- checkmk.debian.mk_logins
- checkmk.debian.netstat
- checkmk.debian.apache_status
```
### `checkmk.debian`
Installs and enables the checkmk agent on debian based systems.
### `checkmk.freebsd`
Installs and enables the checkmk agent on freebsd based systems.
### `checkmk.debian.apache_status`
Installs the
[
apache_status
](
https://checkmk.com/cms_check_apache_status.html
)
agent plugin.
Also configures checkmk regarding the plugin and the apache webserver as well.
Related files are in this folder directly.
### `checkmk.debian.contrack`
Installs the contrack agent plugin from heinlein.
### `checkmk.debian.gluster`
Installs the gluster agent plugin.
It is a custom plugin from us - located in
`checkmk/custom-files/gluster`
.
Documentation is currently located inside of the bash script.
### `checkmk.debian.netstat`
Installs the
[
netstat.linux
](
https://checkmk.com/cms_check_netstat.html
)
agent plugin
### `checkmk.debian.nginx_status`
Installs the
[
nginx_status
](
https://checkmk.com/cms_check_nginx_status.html
)
agent plugin.
### `checkmk.debian.mk_apt`
Installs the
[
mk_apt
](
https://checkmk.com/cms_check_apt.html
)
agent plugin
### `checkmk.debian.mk_logins`
Installs the
[
mk_logins
](
https://checkmk.com/cms_check_logins.html
)
agent plugin
### `checkmk.debian.mk_postgres`
Installs the
[
mk_postgres
](
https://checkmk.com/cms_check_postgres_stats.html
)
agent plugin
### `checkmk.debian.radsec`
Installs the radsec plugin.
### `checkmk.debian.smart`
Installs the
[
smart.stats
](
https://checkmk.com/cms_check_smart.stats.html
)
agent plugin
\ No newline at end of file
This diff is collapsed.
Click to expand it.
checkmk/c
heckmk
-files/gluster
→
checkmk/c
ustom
-files/gluster
+
51
−
0
View file @
17161344
#!/bin/bash
# gluster agent plugin
#
# * determine all volumes
# * determie all bricks for this volume
# * discover brick information - yields output like that:
#
# Status of volume: fileadmin
# ------------------------------------------------------------------------------
# Brick : Brick t3web-00.it.hs-hannover.de:/srv/gluster/fileadmin
# TCP Port : 49152
# RDMA Port : 0
# Online : Y
# Pid : 609
# File System : xfs
# Device : /dev/sdd1
# Mount Options : rw,relatime,attr2,inode64,noquota
# Inode Size : N/A
# Disk Space Free : 108.5GB
# Total Disk Space : 120.0GB
# Inode Count : 62914048
# Free Inodes : 62693863
#
# We currently only utilize the Online: Y information.
# check the status of all bricks in all volumes
echo
"<<<local>>>"
;
# iterate over all available volumns
for
volume
in
$(
gluster volume list
)
do
# find all bricks for this volume
for
brick
in
$(
gluster volume info
$volume
|
grep
-E
'^Brick[0-9]: '
|
sed
-e
's/Brick[0-9]: //g'
)
do
# grab the full status of this brick
brick_status
=
$(
gluster volume status
$volume
$brick
detail
)
online
=
$(
echo
"
$brick_status
"
|
grep
-E
'^Online'
|
cut
-d
':'
-f2
|
tr
-d
'[:space:]'
)
case
"
$online
"
in
...
...
@@ -17,6 +44,7 @@ do
done
done
# expose glusterfs mounts as well
# https://github.com/bbhenry/check_mk_agent/blob/master/plugins/mk_gluster_mount.sh
echo
"<<<mounts>>>"
;
grep
fuse.glusterfs < /proc/mounts
...
...
This diff is collapsed.
Click to expand it.
checkmk/debian/gluster.sls
+
1
−
1
View file @
17161344
hsh_checkmk_gluster_plugin:
file.managed:
- name: /usr/lib/check_mk_agent/plugins/gluster
- source: salt://checkmk/c
heckmk
-files/gluster
- source: salt://checkmk/c
ustom
-files/gluster
- mode: 755
- user: root
- group: root
...
...
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