Module: check_mk
Branch: master
Commit: 799631f70855d5c25c39b7c17147d2bb2dc919a1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=799631f70855d5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 29 15:26:30 2013 +0100
Linux agent: add section for livestatus monitoring
---
agents/check_mk_agent.linux | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 206d353..4c56913 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -429,6 +429,22 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
stat -c "%n|%s|%Y" $(cat "$MK_CONFDIR/fileinfo.cfg")
fi
+# Get stats about OMD monitoring cores running on this machine.
+# Since cd is a shell builtin the check does not affect the performance
+# on non-OMD machines.
+if cd /omd/sites
+then
+ echo '<<<livestatus_status:sep(59)>>>'
+ for live in */tmp/run/live
+ do
+ if [ -S "$live" ] ; then
+ site=${live%%/*}
+ echo "[$site]"
+ echo -e "GET status" | /omd/sites/$site/bin/unixcat /omd/sites/$live
+ fi
+ done
+fi
+
# Einbinden von lokalen Plugins, die eine eigene Sektion ausgeben
if cd $PLUGINSDIR
Module: check_mk
Branch: master
Commit: 04a7d3c63eaf89febad9572de46fdfcc7bb0d106
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04a7d3c63eaf89…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 29 15:27:40 2013 +0100
Remove some trailing space in Linux agent
---
agents/check_mk_agent.linux | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 4c56913..60fe10f 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -67,14 +67,14 @@ then
fi
# Print out Partitions / Filesystems. (-P gives non-wrapped POSIXed output)
-# Heads up: NFS-mounts are generally supressed to avoid agent hangs.
+# Heads up: NFS-mounts are generally supressed to avoid agent hangs.
# If hard NFS mounts are configured or you have too large nfs retry/timeout
-# settings, accessing those mounts from the agent would leave you with
+# settings, accessing those mounts from the agent would leave you with
# thousands of agent processes and, ultimately, a dead monitored system.
# These should generally be monitored on the NFS server, not on the clients.
echo '<<<df>>>'
-# The exclusion list is getting a bit of a problem. -l should hide any remote FS but seems
+# The exclusion list is getting a bit of a problem. -l should hide any remote FS but seems
# to be all but working.
excludefs="-x smbfs -x tmpfs -x cifs -x iso9660 -x udf -x nfsv4 -x nfs -x mvfs -x zfs"
df -PTlk $excludefs | sed 1d
@@ -156,7 +156,7 @@ if type ethtool > /dev/null
then
for eth in $(sed -e 1,2d < /proc/net/dev | cut -d':' -f1)
do
- echo "[$eth]"
+ echo "[$eth]"
ethtool $eth | egrep '(Speed|Duplex|Link detected|Auto-negotiation):'
done
fi
@@ -207,7 +207,7 @@ date +%s
sed -e 1,2d -e 's/:/ /g' < /proc/net/dev
-if type ipmitool >/dev/null
+if type ipmitool >/dev/null
then
echo '<<<ipmi>>>'
IPMI_FILE=$MK_CONFDIR/ipmitool_sensors.cache
@@ -217,17 +217,17 @@ then
# Do not use cache file after 20 minutes
IPMI_MAXAGE=1200
-
+
# Check if file exists and is recent enough
if [ -s $IPMI_FILE ]
then
NOW=$(date +%s)
MTIME=$(stat -c %Y $IPMI_FILE)
- if [ $((NOW - MTIME)) -le $IPMI_MAXAGE ] ; then
+ if [ $((NOW - MTIME)) -le $IPMI_MAXAGE ] ; then
USE_IPMI_FILE=1
fi
fi
-
+
if [ -s "$IPMI_FILE" ]
then
grep -v 'command failed' "$IPMI_FILE" \
@@ -235,7 +235,7 @@ then
| egrep -v '^[^ ]+ na ' \
| grep -v ' discrete '
fi
-
+
if [ -z "$USE_IPMI_FILE" -a ! -e "$IPMI_FILE.new" ]
then
setsid bash -c "set -o noclobber ; ipmitool sensor list > $IPMI_FILE.new && mv $IPMI_FILE.new $IPMI_FILE || rm -f $IPMI_FILE*" &
@@ -250,7 +250,7 @@ fi
# that timeout, it leaves and empty cache file. We skip this check forever
# if we find that empty cache file.
sdrcache=/var/cache/.freeipmi/sdr-cache/sdr-cache-$(hostname).127.0.0.1
-if type ipmi-sensors >/dev/null && [ ! -e "$sdrcache" -o -s "$sdrcache" ]
+if type ipmi-sensors >/dev/null && [ ! -e "$sdrcache" -o -s "$sdrcache" ]
then
echo '<<<ipmi_sensors>>>'
# No cache file existing? => Impose a high time limit. We do not suffice
@@ -268,7 +268,7 @@ then
WAITMAX=
fi
# Newer ipmi-sensors version have new output format; Legacy format can be used
- if ipmi-sensors --help | grep -q legacy-output; then
+ if ipmi-sensors --help | grep -q legacy-output; then
IPMI_FORMAT="--legacy-output"
else
IPMI_FORMAT=""
@@ -276,16 +276,16 @@ then
# Aquire lock with flock in order to avoid multiple runs of ipmi-sensors
# in case of parallel or overlapping calls of the agent.
(
- flock -n 200 --wait 60
+ flock -n 200 --wait 60
# At least with ipmi-sensoirs 0.7.16 this group is Power_Unit instead of "Power Unit"
for class in Temperature Power_Unit Fan
do
$WAITMAX ipmi-sensors $IPMI_FORMAT --sdr-cache-directory /var/cache -g "$class" | sed -e 's/ /_/g' -e 's/:_\?/ /g' -e 's@ \([^(]*\)_(\([^)]*\))@ \2_\1@'
- # In case of a timeout immediately leave loop.
+ # In case of a timeout immediately leave loop.
if [ $? = 255 ] ; then break ; fi
WAITMAX="waitmax 3"
done
- ) 200>>"$sdrcache"
+ ) 200>>"$sdrcache"
fi
# State of LSI MegaRAID controller via MegaCli. You can download that tool from:
@@ -295,7 +295,7 @@ if type MegaCli >/dev/null ; then
echo '<<<megaraid_pdisks>>>'
for part in $(MegaCli -EncInfo -aALL -NoLog < /dev/null \
| sed -rn 's/:/ /g; s/[[:space:]]+/ /g; s/^ //; s/ $//; s/Number of enclosures on adapter ([0-9]+).*/adapter \1/g; /^(Enclosure|Device ID|adapter) [0-9]+$/ p'); do
- [ $part = adapter ] && echo ""
+ [ $part = adapter ] && echo ""
[ $part = 'Enclosure' ] && echo -ne "\ndev2enc"
echo -n " $part"
done
@@ -340,7 +340,7 @@ if type ntpq > /dev/null 2>&1 ; then
waitmax 2 ntpq -p | sed -e 1,2d -e 's/^\(.\)/\1 /' -e 's/^ /%/'
fi
-if type nvidia-settings >/dev/null && [ -S /tmp/.X11-unix/X0 ]
+if type nvidia-settings >/dev/null && [ -S /tmp/.X11-unix/X0 ]
then
echo '<<<nvidia>>>'
for var in GPUErrors GPUCoreTemp
@@ -379,7 +379,7 @@ if type cl_status > /dev/null 2>&1; then
for NODE in $(cl_status listnodes); do
if [ $NODE != $(echo $HOSTNAME | tr 'A-Z' 'a-z') ]; then
STATUS=$(cl_status nodestatus $NODE)
- echo -n "$NODE $STATUS"
+ echo -n "$NODE $STATUS"
for LINK in $(cl_status listhblinks $NODE 2>/dev/null); do
echo -n " $LINK $(cl_status hblinkstatus $NODE $LINK)"
done
@@ -426,12 +426,12 @@ fi
if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
echo '<<<fileinfo:sep(124)>>>'
date +%s
- stat -c "%n|%s|%Y" $(cat "$MK_CONFDIR/fileinfo.cfg")
+ stat -c "%n|%s|%Y" $(cat "$MK_CONFDIR/fileinfo.cfg")
fi
# Get stats about OMD monitoring cores running on this machine.
# Since cd is a shell builtin the check does not affect the performance
-# on non-OMD machines.
+# on non-OMD machines.
if cd /omd/sites
then
echo '<<<livestatus_status:sep(59)>>>'
Module: check_mk
Branch: master
Commit: a12db175a42e2ef47a748dd389ed25f09388720e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a12db175a42e2e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 29 12:18:03 2013 +0100
Make page_header configurable in global settings
---
ChangeLog | 1 +
web/plugins/wato/check_mk_configuration.py | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6ff06cf..c53a231 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -34,6 +34,7 @@
* FIX: list valuespecs could not be extended after once saving
* FIX: fix title of foldable areas contained in list valuespecs
* FIX: Fixed bug where pending log was not removed in multisite setup
+ * Make page_header configurable in global settings
Event Console:
* Added UNIX socket for sending events to the EC
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 0a3b406..1cc6f1e 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -182,6 +182,15 @@ register_configvar(group,
default_value = "dashboard.py"),
domain = "multisite")
+register_configvar(group,
+ "page_heading",
+ TextUnicode(title = _("HTML-Title of HTML Multisite GUI"),
+ help = _("This title will be displayed in your browser's title bar or tab. If you are "
+ "using OMD then you can embed a <tt>%s</tt>. This will be replaced by the name "
+ "of the OMD site."),
+ size = 80,
+ default_value = u"Check_MK %s"),
+ domain = "multisite")
register_configvar(group,
"wato_hide_filenames",
Module: check_mk
Branch: master
Commit: a7c873dd2cdeeb29664cf65d8ccae7ebbee385bb
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a7c873dd2cdeeb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 22 14:47:53 2013 +0100
Updated bug entries #0899
---
.bugs/899 | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/.bugs/899 b/.bugs/899
new file mode 100644
index 0000000..d35d822
--- /dev/null
+++ b/.bugs/899
@@ -0,0 +1,22 @@
+Title: Make negated values in "sections" possible
+Component: checks
+State: open
+Date: 2013-01-22 12:07:39
+Targetversion: 1.4.0
+Class: feature
+
+Recent windows agent ini files have a sections specification, where you can specify which sections to run.
+
+I would like to see the reverse of this – a sections-not – which would specify sections NOT to run.
+
+We have several machines that hang on once section or another for some reason. It would be nice to be able to remove just that section, without have to manually specify all the other sections that we do want to run
+
+
+[global]
+ Sections-not = ps
+
+To not run ps, but to do run all other available sections.
+
+Or, modify the existing one to accept a not (!)
+Global
+ Sections = !ps
Module: check_mk
Branch: master
Commit: fd8fade11cb066891e9d1c780eb4927a87ca1f4e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd8fade11cb066…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 22 14:48:49 2013 +0100
winperf_processor now outputs float usage instead of integer
---
ChangeLog | 1 +
checks/winperf_processor | 11 +++++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0fef4f9..d2d0f0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
Checks & Agents:
+ * winperf_processor now outputs float usage instead of integer
* FIX: mssql_counters.file_sizes - Fixed wrong value for "Log Files" in output
* FIX: drbd: Parameters for expected roles and disk states can now be set to
None to disable alerting on changed values
diff --git a/checks/winperf_processor b/checks/winperf_processor
index 01231e4..a64f131 100644
--- a/checks/winperf_processor
+++ b/checks/winperf_processor
@@ -53,8 +53,15 @@ def check_winperf_util(item, params, info):
if ticks_per_sec == 0.0:
used_perc = 0.0
else:
+ # We get the value of the PERF_100NSEC_TIMER_INV here.
+ # This counter type shows the average percentage of active time observed
+ # during the sample interval. This is an inverse counter. Counters of this
+ # type calculate active time by measuring the time that the service was
+ # inactive and then subtracting the percentage of active time from 100 percent.
+ #
+ # 1 tick = 100ns, convert to seconds
cpusecs_per_sec = ticks_per_sec / 10000000.0
- used_perc = 100 * (1 - cpusecs_per_sec)
+ used_perc = (100.0 * num_cpus) * (1 - cpusecs_per_sec)
if used_perc < 0:
used_perc = 0
@@ -70,7 +77,7 @@ def check_winperf_util(item, params, info):
else:
num_txt = " / %d CPUs" % num_cpus
- infotext = " - %d%% used%s (in last %d secs)" % (int(used_perc), num_txt, timedif)
+ infotext = " - %0.2f%% used%s (in last %d secs)" % (used_perc, num_txt, timedif)
if crit != None and used_perc >= crit:
return (2, "CRIT" + infotext, perfdata)
Module: check_mk
Branch: master
Commit: 2ee03a5b75d00e7cc420c5b4fd1a6af04870c519
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2ee03a5b75d00e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 22 15:32:36 2013 +0100
Added url to ifype mib specification to if* check manpages
---
.bugs/900 | 12 ++++++++++++
.bugs/901 | 14 ++++++++++++++
checkman/hpux_if | 3 ++-
checkman/if | 3 ++-
checkman/if64 | 3 ++-
checkman/if_lancom | 3 ++-
checkman/lnx_if | 3 ++-
checkman/mcdata_fcport | 3 ++-
8 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/.bugs/900 b/.bugs/900
new file mode 100644
index 0000000..5546662
--- /dev/null
+++ b/.bugs/900
@@ -0,0 +1,12 @@
+Title: Make multisite optional username from configured environment vars
+Component: multisite
+State: open
+Date: 2013-01-22 14:49:10
+Targetversion: 1.4.0
+Class: feature
+
+For example X_FORWARDED_USER or REMOTE_USER should be usable as "user" within
+multisite. At the moment we only use req.user, which seem only to be set, when
+one really authenticated with the local webserver.
+In case of some reverse proxy setups and single sign on environments, this is
+not possible. Make it configurable, disabled by default!
diff --git a/.bugs/901 b/.bugs/901
new file mode 100644
index 0000000..74c993c
--- /dev/null
+++ b/.bugs/901
@@ -0,0 +1,14 @@
+Title: uptime checks: add thresholds
+Component: checks
+State: open
+Date: 2013-01-22 14:53:09
+Targetversion: 1.4.0
+Class: feature
+
+The uptime checks should be consolidated to use the same check logics (uptime.include).
+
+Add the following:
+
+- Thresholds (warn/crit for upper and lower limits)
+- WATO valuespec
+- update the check manpage
diff --git a/checkman/hpux_if b/checkman/hpux_if
index c82e74d..8b69ebf 100644
--- a/checkman/hpux_if
+++ b/checkman/hpux_if
@@ -99,7 +99,8 @@ parameters (dict): Due to its complexity, this check now uses a dictionary as
if_inventory_porttypes (list of strings): List of interface types the inventory should create checks for.
Default is {[ '6', '32', '117' ]}, which means that all Ethernet, Frame Relay and Gigabit Ethernet ports
will be monitored. Virtual and loopback ports will be ignored. Please look into the check implementation
- of in the SNMP MIB description of {ifType} for a complete list of port types.
+ of in the SNMP MIB description of {ifType} for a complete list of port types. Another good source for possible
+ port types and their meanings might be http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
if_inventory_portstates (list of strings): Per default this variable is set to {['1']}, which means that
only ports found in the state {up} are being added to the monitoring. If you set this to {['1', '2', '5']} then
diff --git a/checkman/if b/checkman/if
index 4b32d98..15b2a9b 100644
--- a/checkman/if
+++ b/checkman/if
@@ -106,7 +106,8 @@ parameters (dict): Due to its complexity, this check now uses a dictionary as
if_inventory_porttypes (list of strings): List of interface types the inventory should create checks for.
Default is {[ '6', '32', '117' ]}, which means that all Ethernet, Frame Relay and Gigabit Ethernet ports
will be monitored. Virtual and loopback ports will be ignored. Please look into the check implementation
- of in the SNMP MIB description of {ifType} for a complete list of port types.
+ of in the SNMP MIB description of {ifType} for a complete list of port types. Another good source for possible
+ port types and their meanings might be http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
if_inventory_portstates (list of strings): Per default this variable is set to {['1']}, which means that
only ports found in the state {up} are being added to the monitoring. If you set this to {['1', '2', '5']} then
diff --git a/checkman/if64 b/checkman/if64
index eac4bcd..f503ae1 100644
--- a/checkman/if64
+++ b/checkman/if64
@@ -107,7 +107,8 @@ parameters (dict): Due to its complexity, this check now uses a dictionary as
if_inventory_porttypes (list of strings): List of interface types the inventory should create checks for.
Default is {[ '6', '32', '117' ]}, which means that all Ethernet, Frame Relay and Gigabit Ethernet ports
will be monitored. Virtual and loopback ports will be ignored. Please look into the check implementation
- of in the SNMP MIB description of {ifType} for a complete list of port types.
+ of in the SNMP MIB description of {ifType} for a complete list of port types. Another good source for possible
+ port types and their meanings might be http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
if_inventory_portstates (list of strings): Per default this variable is set to {['1']}, which means that
only ports found in the state {up} are being added to the monitoring. If you set this to {['1', '2', '5']} then
diff --git a/checkman/if_lancom b/checkman/if_lancom
index 76df25a..25639df 100644
--- a/checkman/if_lancom
+++ b/checkman/if_lancom
@@ -109,7 +109,8 @@ parameters (dict): Due to its complexity, this check now uses a dictionary as
if_inventory_porttypes (list of strings): List of interface types the inventory should create checks for.
Default is {[ '6', '32', '117' ]}, which means that all Ethernet, Frame Relay and Gigabit Ethernet ports
will be monitored. Virtual and loopback ports will be ignored. Please look into the check implementation
- of in the SNMP MIB description of {ifType} for a complete list of port types.
+ of in the SNMP MIB description of {ifType} for a complete list of port types. Another good source for possible
+ port types and their meanings might be http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
if_inventory_portstates (list of strings): Per default this variable is set to {['1']}, which means that
only ports found in the state {up} are being added to the monitoring. If you set this to {['1', '2', '5']} then
diff --git a/checkman/lnx_if b/checkman/lnx_if
index df8f992..8545749 100644
--- a/checkman/lnx_if
+++ b/checkman/lnx_if
@@ -104,7 +104,8 @@ parameters (dict): Due to its complexity, this check now uses a dictionary as
if_inventory_porttypes (list of strings): List of interface types the inventory should create checks for.
Default is {[ '6', '32', '117' ]}, which means that all Ethernet, Frame Relay and Gigabit Ethernet ports
will be monitored. Virtual and loopback ports will be ignored. Please look into the check implementation
- of in the SNMP MIB description of {ifType} for a complete list of port types.
+ of in the SNMP MIB description of {ifType} for a complete list of port types. Another good source for possible
+ port types and their meanings might be http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
if_inventory_portstates (list of strings): Per default this variable is set to {['1']}, which means that
only ports found in the state {up} are being added to the monitoring. If you set this to {['1', '2', '4']} then
diff --git a/checkman/mcdata_fcport b/checkman/mcdata_fcport
index 6b54a6a..5f64627 100644
--- a/checkman/mcdata_fcport
+++ b/checkman/mcdata_fcport
@@ -99,7 +99,8 @@ parameters (dict): Due to its complexity, this check now uses a dictionary as
if_inventory_porttypes (list of strings): List of interface types the inventory should create checks for.
Default is {[ '6', '32', '117' ]}, which means that all Ethernet, Frame Relay and Gigabit Ethernet ports
will be monitored. Virtual and loopback ports will be ignored. Please look into the check implementation
- of in the SNMP MIB description of {ifType} for a complete list of port types.
+ of in the SNMP MIB description of {ifType} for a complete list of port types. Another good source for possible
+ port types and their meanings might be http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib.
if_inventory_portstates (list of strings): Per default this variable is set to {['1']}, which means that
only ports found in the state {up} are being added to the monitoring. If you set this to {['1', '2', '5']} then