From 9082862f719e3fe9eac5192114893e4281a6d1fb Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 30 Jan 2008 21:37:34 +0000 Subject: rearranged some stuff --- files/plugins/selinuxenforced | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 files/plugins/selinuxenforced (limited to 'files/plugins/selinuxenforced') diff --git a/files/plugins/selinuxenforced b/files/plugins/selinuxenforced new file mode 100755 index 0000000..2f88b9b --- /dev/null +++ b/files/plugins/selinuxenforced @@ -0,0 +1,32 @@ +#!/bin/sh +# -*- sh -*- +# +# Plugin to count the daily amount of Virii (qmailscan) +# +# Contributed by David Obando (david@cryptix.de) - 03.12.2005 +# + +# define the logfiles. when you rotate them at any other time than 00:00 you have to define two logfiles: +#LOG0=/var/spool/qmailscan/quarantine.log +#LOG1=/var/spool/qmailscan/quarantine.log.1 + +if [ "$1" = "autoconf" ]; then + echo yes + exit 0 +fi + +if [ "$1" = "config" ]; then + echo 'graph_title enforced amount' + echo 'graph_args --upper-limit 1 -l 0 ' + echo 'graph_vlabel Is the system selinux enforced?' + echo 'graph_scale no\n'; + echo 'graph_category selinux' + echo 'enforced.label IsEnforced' + #echo 'enforced.draw AREA' + echo 'enforced.draw LINE2' + + exit 0 +fi + +echo -n "enforced.value " && cat /selinux/enforce + -- cgit v1.2.3 From 14105f0629c105ffe276807fc2c6adfe84fbdac7 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 29 Mar 2008 14:27:08 +0000 Subject: fixed header --- files/plugins/selinuxenforced | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'files/plugins/selinuxenforced') diff --git a/files/plugins/selinuxenforced b/files/plugins/selinuxenforced index 2f88b9b..16a3f66 100755 --- a/files/plugins/selinuxenforced +++ b/files/plugins/selinuxenforced @@ -1,14 +1,9 @@ #!/bin/sh # -*- sh -*- # -# Plugin to count the daily amount of Virii (qmailscan) +# Plugin to monitor the status of selinux # -# Contributed by David Obando (david@cryptix.de) - 03.12.2005 -# - -# define the logfiles. when you rotate them at any other time than 00:00 you have to define two logfiles: -#LOG0=/var/spool/qmailscan/quarantine.log -#LOG1=/var/spool/qmailscan/quarantine.log.1 +# Contributed by admin(at)immerda.ch if [ "$1" = "autoconf" ]; then echo yes -- cgit v1.2.3 From 60e94ded2bb418c532a25b9fc3a8d05aaf424b40 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 30 May 2009 20:20:54 +0200 Subject: improved enforced munin plugin --- files/plugins/selinuxenforced | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'files/plugins/selinuxenforced') diff --git a/files/plugins/selinuxenforced b/files/plugins/selinuxenforced index 16a3f66..e157e3d 100755 --- a/files/plugins/selinuxenforced +++ b/files/plugins/selinuxenforced @@ -23,5 +23,8 @@ if [ "$1" = "config" ]; then exit 0 fi -echo -n "enforced.value " && cat /selinux/enforce - +if [ -r /selinux/enforce ]; then + echo -n "enforced.value " && cat /selinux/enforce +else + echo "enforced.value 0" +fi -- cgit v1.2.3