Giter Club home page Giter Club logo

check_mk_extensions's Introduction

Heinlein checkmk 2.2 Plugins

This repository contains checkmk plugins developed by Heinlein Support GmbH and released to the general public.

Development of these plugins can be sponsored by opening a support request via E-Mail to [email protected]

Repository structure

The repository has multiple branches for the specific checkmk versions.

check_mk_extensions's People

Contributors

bitstacker avatar dariks avatar felmean avatar florianheigl avatar gfokkema avatar gianlucastella1 avatar gurubert avatar hanneslink avatar jeff-cook avatar jens-maus avatar jplitza avatar marcogabriel avatar marmot21 avatar meisterluk avatar quatauta avatar robertoschwald avatar seppovic avatar systemheld avatar tdelov avatar tfbb avatar tklecker avatar vafhornung avatar wagnst avatar yogibaer75 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

check_mk_extensions's Issues

Usage of filehandles plugin

Hi,

There's no manpage for the filehandles plugin, so I think I am doing something wrong.
I have installed the latest version (4.0) which should work with 1.6, but I get the following exception when trying to run inventory:

Exception	
TypeError (unhashable type)

Traceback	
  File "/omd/sites/valvonta/lib/python/cmk_base/decorator.py", line 54, in wrapped_check_func
    status, infotexts, long_infotexts, perfdata = check_func(hostname, *args, **kwargs)
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 422, in check_discovery
    on_error="raise")
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 1057, in _get_host_services
    return _get_node_services(host_config, ipaddress, sources, multi_host_sections, on_error)
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 1065, in _get_node_services
    multi_host_sections, on_error)
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 1098, in _get_discovered_services
    multi_host_sections, on_error)
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 834, in _discover_services
    check_plugin_name, on_error):
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 935, in _execute_discovery
    discovered_items = _execute_discovery_function(discovery_function, section_content)
  File "/omd/sites/valvonta/lib/python/cmk_base/discovery.py", line 973, in _execute_discovery_function
    discovered_items = discovery_function(section_content)
  File "/omd/sites/valvonta/local/share/check_mk/checks/filehandles", line 82, in inventory_filehandles
    taglist, hostlist = rule[1:3]

Info variable gets populated correctly, and the output of the agent seems fine. It is the same format as in commented section in the beginning of the agent.

I have created one rule for it like this:

Process Name: 	%u
Process Matching: 	
Name of the User: 	

Not sure if it does what I want - one service per user which monitors the current file handle usage with both soft and hard limits.

CentOS 7 64-bit
CEE 1.6.0p6
Python 2.7.16

Agent bakery crash on checkmk 1.6.0b11

After creation of the rule to deploy the plugin, the baking of Agents fails:

Exception: Error creating agent for my-server: Error creating agents: Error creating cffd1e1f1bbd5641/linux_rpm agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/linux_deb agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/linux_tgz agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/windows_msi agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 8, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/windows/plugins/apcaccess.bat", plugins_dir + "/apcaccess.bat")
AttributeError: 'module' object has no attribute 'paths'
.
.
Agent baking started...
2019-09-18 12:57:37,811 [40] [cmk.web.automations 22586] Error running 'check_mk --automation bake-agents --' (exit code 2)
2019-09-18 12:57:37,813 [40] [cmk.web.background_process 22586] Exception in background function
Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk/gui/background_job.py", line 205, in _execute_function
    func_ptr(*args, **kwargs)
  File "/omd/sites/mk/lib/python/cmk/gui/cee/plugins/wato/agent_bakery.py", line 5184, in bake_agents_background_job
    watolib.check_mk_local_automation('bake-agents')
  File "/omd/sites/mk/lib/python/cmk/gui/watolib/automations.py", line 126, in check_mk_local_automation
    raise MKGeneralException(_hilite_errors(outdata))
MKGeneralException: Error creating agent for my-server: Error creating agents: Error creating cffd1e1f1bbd5641/linux_rpm agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/linux_deb agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/linux_tgz agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/windows_msi agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 8, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/windows/plugins/apcaccess.bat", plugins_dir + "/apcaccess.bat")
AttributeError: 'module' object has no attribute 'paths'
.
.

Exception: Error creating agent for my-server: Error creating agents: Error creating cffd1e1f1bbd5641/linux_rpm agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/linux_deb agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/linux_tgz agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 6, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/plugins/apcaccess", plugins_dir + "/apcaccess")
AttributeError: 'module' object has no attribute 'paths'
.

Error creating cffd1e1f1bbd5641/windows_msi agent for my-server: Error in bakery plugin "apcaccess": 'module' object has no attribute 'paths'

Traceback (most recent call last):
  File "/omd/sites/mk/lib/python/cmk_base/cee/agent_bakery.py", line 364, in execute_bakery_plugin
    bake_func(*func_args)
  File "/omd/sites/mk/local/share/check_mk/agents/bakery/apcaccess", line 8, in bake_apcaccess
    shutil.copy2(cmk.paths.local_agents_dir + "/windows/plugins/apcaccess.bat", plugins_dir + "/apcaccess.bat")
AttributeError: 'module' object has no attribute 'paths'
.
.

cephpools: invalid check parameter

Hi,

habe gerade die beiden Ceph Checks eingerichtet.
Ceph Status klappt wunderbar.
Beeim Ceph Pools bekomme ich beim inventarisieren in Check_MK folgenden Fehler:

Invalid check parameter: The type must be a dictionary, but it is a list! The parameter is: [] The variable name is: checkgroup_parameters:filesystem

bildschirmfoto 2017-08-25 um 13 05 32

MKP does not work with 1.2.8p13

  • Upload the MKP via WATO "Extension Packages".
  • try to activate the change ends with:

"Check parameter definition for entropy_avail has type Dictionary, but match_type None"

CheckMK Memcached.py Crash Report

CheckMK Version is 2.0.0p6 CRE

* /omd/sites/test/local/lib/python3/cmk/base/plugins/agent_based/memcached.py

Maybe these files are not compatible with your current Checkmk version. Please verify and only report this crash when you think this should be working.

Exception: TypeError ('state' must be a checkmk State constant, got 1)

Traceback:

 File "/omd/sites/test/lib/python3/cmk/base/checking.py", line 582, in get_aggregated_result
    result = _aggregate_results(check_function(**kwargs))
  File "/omd/sites/test/lib/python3/cmk/base/checking.py", line 813, in _aggregate_results
    perfdata, results = _consume_and_dispatch_result_types(subresults)
  File "/omd/sites/test/lib/python3/cmk/base/checking.py", line 857, in _consume_and_dispatch_result_types
    for subr in subresults:
  File "/omd/sites/test/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 89, in filtered_generator
    for element in generator(*args, **kwargs):
  File "/omd/sites/test/local/lib/python3/cmk/base/plugins/agent_based/memcached.py", line 208, in check_memcached
    yield Result(state=status,
  File "/omd/sites/test/lib/python3/cmk/base/api/agent_based/checking_classes.py", line 349, in __new__
    state, summary, details = _create_result_fields(**kwargs)
  File "/omd/sites/test/lib/python3/cmk/base/api/agent_based/checking_classes.py", line 375, in _create_result_fields
    raise TypeError(f"'state' must be a checkmk State constant, got {state}")

The script output on the server is normal.

redis check will unknown when database is emptied out.

Scenario:
redis with non empty db, it's inventarized as:
OK - db0: None (warn/crit at None/None)

when db is emptied(all keys were removed) - that check will disappear:
UNKNOWN - check failed - please submit a crash report!

by the way - there is lack of performance data for that checks.

check_mk 1.2.6p2, plugin to redis from current master, redis 2.8.17

sslcertificates and checkmk 2.0

Currently getting the following errors with v7.2 installed under checkmk 2.0p1

Starting job...
WARNING: Exception in discovery function of check plugin 'sslcertificates': unexpected type in discovery: <class 'cmk.base.check_api_utils.Service'>
Completed.

Also config-settings in WATO not available.

'df_translation' is not defined

Hello,

just installed version 2.0 and I got this error:

CRIT: Loading "/omd/sites/site_name/local/share/check_mk/web/plugins/metrics/dell_sc.py" failed: name 'df_translation' is not defined (!!)

Thanks for this plugin!
Andrea

ceph plugin disappears after creating / modifying any rule

Hi,
ceph-10.4.mkp installed at check-mk-raw-2.0.0p8_0.buster installs and works great until
any rule is added / deleted / changed in the gui.
After that, mkp list does not show "ceph" anymore so that it must be manually reinstalled.

web.log shows things like:
2021-08-31 13:21:01,888 [40] [cmk.web 168035] http://localhost:5004/woext/check_mk/run_cron.py/woext/check_mk/run_cron.py Failed to load plugin /omd/sites/woext/local/share/check_mk/web/plugins/wato/ceph_cee.py: No module named 'cmk.gui.cee'

Any ideas ?

Thanks, Stefan

Ceph 9.3 for Checkmk 1.6 - is there still a general overview possible?

Hi there,

after updating to the latest Ceph plugin 9.3 for Checkmk 1.6 I found that now every single node shows its Ceph information. Before it was available at the Ceph admin host which was a pretty clear overview.

Is this behaviour somehow achievable with the current version of the extension too?

Thanks anyway and regards

sslcertificates: compatibility with checkmk 2

Loading GUI plugins...
Failed to load plugin /omd/sites/mysite/local/share/check_mk/web/plugins/wato/check_parameters_sslcertificates.py: __init__() got an unexpected keyword argument 'min_len'
Traceback (most recent call last):
  File "/omd/sites/mysite/lib/python3/cmk/gui/utils/__init__.py", line 164, in load_web_plugins
    exec(f.read(), globalvars)
  File "<string>", line 28, in <module>
TypeError: __init__() got an unexpected keyword argument 'min_len'

ERROR: Failed to load some GUI plugins. You will either have
       to remove or update them to be compatible with this
       Checkmk version.

removing the min_len parameter from

TextAscii(title = _('Reason'), allow_empty = False, size = 72, min_len = 5),
is a workaround

I'm not sure if this is a result of this but it also failed to migrate the configuration for me when updating from checkmk 1.6.0p19

Another note:
https://exchange.checkmk.com/p/sslcertificates links to https://github.com/HeinleinSupport/check_mk/tree/master/sslcertificates which does not exist anymore, instead it should link to https://github.com/HeinleinSupport/check_mk_extensions/tree/master/sslcertificates/

entropy_avail incompatible with Check_MK 1.2.8?

I installed the latest relase of the entropy_avail mkp package in Check_MK 1.2.8p11 installation. After this, I started getting errors in the WATO web interface:
Check parameter definition for entropy_avail has type Dictionary, but match_type None
Maybe entropy_avail needs to be adjusted for a newer Check_MK generation?

Unkown UPS / no data

Hello,
First thing first, thanks for working on this plugin.

I'm having an issue with my UPS being detected as "Unkown UPS / no data". There is a typo in "unknown", and something isn't parsed correctly in the output for me:

<<apcaccess:sep(58)>>
[[apcupsd.conf]]
APC : 001,032,0752
DATE : 2021-03-18 21:27:02 -0400
HOSTNAME : server
VERSION : 3.14.14 (31 May 2016) slackware
UPSNAME : server
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2021-03-14 04:40:04 -0400
MODEL : CP1500PFCLCD
STATUS : ONLINE
LINEV : 114.0 Volts
LOADPCT : 12.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 68.5 Minutes
MBATTCHG : 20 Percent
MINTIMEL : 20 Minutes
MAXTIME : 0 Seconds
OUTPUTV : 114.0 Volts
DWAKE : -1 Seconds
LOTRANS : 88.0 Volts
HITRANS : 139.0 Volts
ALARMDEL : No alarm
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STATFLAG : 0x05000008
SERIALNO : 000000000000
NOMINV : 120 Volts
NOMPOWER : 900 Watts
END APC : 2021-03-18 21:27:03 -0400

Anothing thing I could suggest as an improvement would be to name the service with the UPS model or some sort of ID, since I'm not sure this would work well with multiple UPS hooked up to the same host in Checkmk.

Error when updating CRE version with apcaccess plugin

Every update since I installed the apcaccess plugin (just did 2.0.0p3 to 2.0.0p4), I get this error:

OMD[test]:~$ cmk-update-config -v
Initializing application...
Loading GUI plugins...
Updating Checkmk configuration...
ATTENTION: Some steps may take a long time depending on your installation, e.g. during major upgrades.
 1/15 Migrate deprecated network topology dashlet...
 2/15 Update global settings...
 3/15 Rewriting WATO tags...
 4/15 Rewriting WATO hosts and folders...
 5/15 Rewriting WATO rulesets...
Replacing ruleset non_inline_snmp_hosts with snmp_backend_hosts
 6/15 Rewriting autochecks...
Transform failed: host='server', plugin='apcaccess', ruleset='apcaccess', params={'model': 'apcupsd.conf'}, error=AssertionError('non-empty params vanished')
 7/15 Cleanup version specific caches...
 8/15 Migrating fs_used name...
 9/15 Migrate pagetype topics...
 10/15 Migrate LDAP connections...
 11/15 Rewrite BI Configuration...
Skipping conversion of bi.mk (already done)
 12/15 Set version specific user attributes...
 13/15 Rewriting inventory data...
Skipping py2 inventory data update (already done)
 14/15 Migrate audit log...
No audit log present. Skipping.
 15/15 Rename discovered host label files...
Done

wireguard plugin makes checkmk 2.0 "crash"

After updating checkmk to 2.0.0, the wireguard plugin is not working.

The crash report:

Exeption:

AttributeError ('dict' object has no attribute 'iteritems')

Traceback:

File "/omd/sites/timdebruijn/lib/python3/cmk/base/decorator.py", line 37, in wrapped_check_func
status, infotexts, long_infotexts, perfdata = check_func(hostname, *args, **kwargs)
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 778, in check_discovery
services, host_label_discovery_result = _get_host_services(
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1574, in _get_host_services
services, host_label_discovery_result = _get_node_services(
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1595, in _get_node_services
services, host_label_discovery_result = _get_discovered_services(
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1623, in _get_discovered_services
discovered_services, host_label_discovery_result = _discover_host_labels_and_services(
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1392, in _discover_host_labels_and_services
discovered_services = [] if discovery_parameters.only_host_labels else _discover_services(
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1444, in _discover_services
service_table.update({
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1444, in
service_table.update({
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1512, in _execute_discovery
yield from _enriched_discovered_services(hostname, check_plugin.name, plugins_services)
File "/omd/sites/timdebruijn/lib/python3/cmk/base/discovery.py", line 1526, in _enriched_discovered_services
for service in plugins_services:
File "/omd/sites/timdebruijn/lib/python3/cmk/base/api/agent_based/register/check_plugins.py", line 72, in filtered_generator
for element in generator(*args, **kwargs):
File "/omd/sites/timdebruijn/lib/python3/cmk/base/api/agent_based/register/check_plugins_legacy.py", line 88, in discovery_migration_wrapper
for element in original_discovery_result:
File "/omd/sites/timdebruijn/local/share/check_mk/checks/wireguard", line 39, in inventory_wireguard
for interface, peers in parsed.iteritems():

Local Variables:

{'parsed': {'wg0': {'REDACTED': {'allowed-ips': '192.168.100.101/32',
'endpoint': 'REDACTED:55107',
'latest-handshake': 1615306323,
'persistent-keepalive': '25',
'transfer-rx': 4140,
'transfer-tx': 16832}}}}

I use the latest mkp version (0.6)

If additional information is needed, please let me know.

dir_size and cmk2.0

Hi,

just upgraded to cmk 2. I am using dir_size 4.1 which is in the cmk 2.0 branch but i get the following error when trying to bake the agent.

Exception: Error running automation call bake-agents (exit code 2), error: 
Error creating agent for ftp.home.local: Error creating agents: Error creating e85d467675af2e2c/linux_deb agent for ftp.home.local: Error in bakery plugin "dir_size": name 'shutil' is not defined

Traceback (most recent call last):
  File "/omd/sites/main/lib/python3/cmk/base/cee/bakery/agent_bakery.py", line 426, in _execute_pre_17_bakery_plugin
    bake_func(**func_args)
  File "<string>", line 21, in bake_dir_size
NameError: name 'shutil' is not defined
.
.

More information can be found in ~/var/log/web.log

Is there something broken with the update or is this plugin not yet compatible?

Thanks in advanced.

UNKNOWN - Unable to find status information.

Here's our problem.

On the checkmk interface only "UNKNOWN - Unable to find status information." for ceph.

However, our pools are listed.

OK fs_Ceph Pool mytestpool [Open the action menu]
OK - 1.28% used (85.89 GB of 6.54 TB), trend: 0.00 B / 24 hours 54 m 105 s
OK fs_Ceph Pool proxmoxstorage [Open the action menu]
OK - 0.88% used (58.55 GB of 6.51 TB), trend: 0.00 B / 24 hours 54 m 105 s

We have the following information:

Check_MK version 1.4.0p26
Bonding Interface bond0 OK - mode: IEEE 802.3ad Dynamic link aggregation, eth3/00:90:fa:99:23:44 up, eth0/a4:bf:01:50:8f:d3 up, bond status: up
Bonding Interface bond1 OK - mode: IEEE 802.3ad Dynamic link aggregation, eth2/00:90:fa:99:23:3c up, eth1/a4:bf:01:50:8f:d4 up, bond status: up
CPU load OK - 15 min load 0.00 at 48 Cores (0.00 per Core)
CPU utilization OK - user: 0.0%, system: 0.0%, wait: 0.0%, steal: 0.0%, guest: 0.0%, total: 0.1%
Ceph UNKNOWN - Unable to find status information.

ii ceph 12.2.5-1xenial amd64 distributed storage and file system

check huawei_port crashed

Hi,

the check is crached with this error:

Exception KeyError (u'0')
Traceback File "/omd/sites/pdm_test/share/check_mk/modules/check_mk_base.py", line 1460, in execute_check result = sanitize_check_result(check_function(item, params, info), check_uses_snmp(checkname)) File "/omd/sites/pdm_test/local/share/check_mk/checks/huawei_port", line 110, in check_huawei_port msg += '; port mode: %s' % huawei_port_modes[portinfo[16]]
Local Variables {'item': u'C01 C01 T00 C00 P00 01', 'msg': u'FC-Port @ CTE0.A.IOM1.P0; WWN: 2008e4c2d1fd27a2; configured rate: auto; speed: 8 Gbit/s', 'params': {'configRate': u'0', 'logicType': u'1', 'mode': u'0', 'speedRate': u'8', 'status': u'1'}, 'parsed': {'C01 C01 T00 C00 P00 01': ['FC', u'CTE0.A.IOM1.P0', u'3', u'14', u'0', u'0', u'1114368', u'1', u'1', u'2008e4c2d1fd27a2', u'1114368', u'1', u'1', u'0', u'8', u'2008e4c2d1fd27a2', u'0'], 'C01 C01 T00 C00 P01 01': ['FC', u'CTE0.A.IOM1.P1', u'3', u'24', u'0', u'0', u'1114369', u'1', u'1', u'2009e4c2d1fd27a2', u'1114369', u'1', u'1', u'0', u'8', u'2009e4c2d1fd27a2', u'0'], 'C01 C01 T00 C00 P02 01': ['FC', u'CTE0.A.IOM1.P2', u'0', u'0', u'0', u'0', u'1114370', u'1', u'1', u'200ae4c2d1fd27a2', u'1114370', u'1', u'1', u'0', u'8', u'200ae4c2d1fd27a2', u'0'], 'C01 C01 T00 C00 P03 01': ['FC', u'CTE0.A.IOM1.P3', u'0', u'0', u'0', u'0', u'1114371', u'1', u'1', u'200be4c2d1fd27a2', u'1114371', u'1', u'1', u'0', u'8', u'200be4c2d1fd27a2', u'0'], 'C01 C01 T00 C01 P00 01': ['FC', u'CTE0.B.IOM1.P0', u'10', u'72', u'0', u'2', u'17891584', u'1', u'1', u'2018e4c2d1fd27a2', u'17891584', u'1', u'1', u'0', u'8', u'2018e4c2d1fd27a2', u'0'], 'C01 C01 T00 C01 P01 01': ['FC', u'CTE0.B.IOM1.P1', u'56', u'103', u'0', u'1', u'17891585', u'1', u'1', u'2019e4c2d1fd27a2', u'17891585', u'1', u'1', u'0', u'8', u'2019e4c2d1fd27a2', u'0'], 'C01 C01 T00 C01 P02 01': ['FC', u'CTE0.B.IOM1.P2', u'0', u'0', u'0', u'0', u'17891586', u'1', u'1', u'201ae4c2d1fd27a2', u'17891586', u'1', u'1', u'0', u'8', u'201ae4c2d1fd27a2', u'0'], 'C01 C01 T00 C01 P03 01': ['FC', u'CTE0.B.IOM1.P3', u'0', u'0', u'0', u'0', u'17891587', u'1', u'1', u'201be4c2d1fd27a2', u'17891587', u'1', u'1', u'0', u'8', u'201be4c2d1fd27a2', u'0'], 'C02 C00 T00 C00 P00 00': ['iSCSI', u'', u'', u'', u'', u'', u'131072', u'5', u'1', u'2c:ab:00:7b:dc:08', u'131072', u'1', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C00 P01 00': ['iSCSI', u'', u'', u'', u'', u'', u'131073', u'5', u'1', u'2c:ab:00:7b:dc:08', u'131073', u'1', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C00 P02 00': ['iSCSI', u'', u'', u'', u'', u'', u'131074', u'5', u'0', u'2c:ab:00:7b:dc:08', u'131074', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C00 P03 00': ['iSCSI', u'', u'', u'', u'', u'', u'131075', u'5', u'0', u'2c:ab:00:7b:dc:08', u'131075', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C01 P00 00': ['iSCSI', u'', u'', u'', u'', u'', u'16908288', u'5', u'1', u'88:cf:98:db:b8:9d', u'16908288', u'1', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C01 P01 00': ['iSCSI', u'', u'', u'', u'', u'', u'16908289', u'5', u'1', u'88:cf:98:db:b8:9d', u'16908289', u'1', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C01 P02 00': ['iSCSI', u'', u'', u'', u'', u'', u'16908290', u'5', u'0', u'88:cf:98:db:b8:9d', u'16908290', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C00 T00 C01 P03 00': ['iSCSI', u'', u'', u'', u'', u'', u'16908291', u'5', u'0', u'88:cf:98:db:b8:9d', u'16908291', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C00 P00 00': ['iSCSI', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'139264', u'1', u'5', u'10.133.18.81', u'255.255.255.0', u'0'], 'C02 C32 T00 C00 P02 00': ['iSCSI', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'139266', u'0', u'8', u'172.31.128.101', u'255.255.255.0', u'0'], 'C02 C32 T00 C00 P03 00': ['iSCSI', u'CTE0.A.H0', u'0', u'0', u'0', u'0', u'139267', u'5', u'0', u'a8:ca:7b:bc:da:3c', u'139267', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C00 P04 00': ['iSCSI', u'CTE0.A.H1', u'0', u'0', u'0', u'0', u'139268', u'5', u'0', u'a8:ca:7b:bc:da:3e', u'139268', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C00 P05 00': ['iSCSI', u'CTE0.A.H2', u'0', u'0', u'0', u'0', u'139269', u'5', u'0', u'a8:ca:7b:bc:da:3b', u'139269', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C00 P06 00': ['iSCSI', u'CTE0.A.H3', u'0', u'0', u'0', u'0', u'139270', u'5', u'0', u'a8:ca:7b:bc:da:3d', u'139270', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C01 P00 00': ['iSCSI', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'16916480', u'1', u'5', u'10.133.18.82', u'255.255.255.0', u'0'], 'C02 C32 T00 C01 P02 00': ['iSCSI', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'16916482', u'0', u'8', u'172.31.128.102', u'255.255.255.0', u'0'], 'C02 C32 T00 C01 P03 00': ['iSCSI', u'CTE0.B.H0', u'0', u'0', u'0', u'0', u'16916483', u'5', u'0', u'a8:ca:7b:bc:da:2e', u'16916483', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C01 P04 00': ['iSCSI', u'CTE0.B.H1', u'0', u'0', u'0', u'0', u'16916484', u'5', u'0', u'a8:ca:7b:bc:da:30', u'16916484', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C01 P05 00': ['iSCSI', u'CTE0.B.H2', u'0', u'0', u'0', u'0', u'16916485', u'5', u'0', u'a8:ca:7b:bc:da:2d', u'16916485', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C32 T00 C01 P06 00': ['iSCSI', u'CTE0.B.H3', u'0', u'0', u'0', u'0', u'16916486', u'5', u'0', u'a8:ca:7b:bc:da:2f', u'16916486', u'0', u'1', u'0.0.0.0', u'0.0.0.0', u'0'], 'C02 C96 T00 C00 P00 09': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'278028288', u'1', u'4', u'12', u'12', u'5203db201f41103f'], 'C02 C96 T00 C00 P01 09': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'278028289', u'0', u'4', u'-1', u'-1', u'5203db201f41103f'], 'C02 C97 T00 C01 P00 09': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'294805760', u'1', u'4', u'12', u'12', u'5203db201f41113f'], 'C02 C97 T00 C01 P01 09': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'294805761', u'0', u'4', u'-1', u'-1', u'5203db201f41113f'], 'C15 C32 T00 C00 P01 01': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'2039809', u'1', u'4', u'12', u'12', u'50022a1060708000'], 'C15 C32 T00 C00 P02 01': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'2039810', u'1', u'4', u'12', u'12', u'50022a1060708000'], 'C15 C32 T00 C01 P01 01': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'18817025', u'1', u'4', u'12', u'12', u'50022a1060708100'], 'C15 C32 T00 C01 P02 01': ['SAS', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'18817026', u'1', u'4', u'12', u'12', u'50022a1060708100']}, 'perfdata': [], 'portinfo': ['FC', u'CTE0.A.IOM1.P0', u'3', u'14', u'0', u'0', u'1114368', u'1', u'1', u'2008e4c2d1fd27a2', u'1114368', u'1', u'1', u'0', u'8', u'2008e4c2d1fd27a2', u'0'], 'res': 0}

Regards
Karsten

ups_alarms improvement

Hello,

I have some UPS that return always ".0.0.0.0.0.0.0.0.0.0.0" (or SNMPv2-SMI::zeroDotZero.0.0.0.0.0.0.0.0.0) also if there aren't any alarms. The following patch solve the problem:

--- /tmp/ups_alarms	2020-06-08 15:14:46.054594187 +0200
+++ local/share/check_mk/checks/ups_alarms	2020-05-29 07:46:04.865377806 +0200
@@ -79,15 +79,17 @@
                       '.1.3.6.1.2.1.33.1.6.3.23': 'upsAlarmShutdownImminent',
                       '.1.3.6.1.2.1.33.1.6.3.24': 'upsAlarmTestInProgress',
     }
-    numAlarms = len(info[1])
+    numAlarms = saveint(info[0][0])
     if numAlarms > 0:
         uptime = parse_snmp_uptime(info[2][0][0])
         alarms = []
         for alarm in info[1]:
+            if alarm[0] == '.0.0.0.0.0.0.0.0.0.0.0':
+                continue
             alarmtime = parse_snmp_uptime(alarm[1])
             alarms.append("%s (was %s ago)" % (transUpsAlarm.get(alarm[0], alarm[0]),
                                                get_age_human_readable(uptime - alarmtime)))
-        return 2, "%d Alarms present\n%s" % (numAlarms, "\n".join(alarms))
+        return 2, "%d Alarms present (see long output)\n%s" % (numAlarms, "\n".join(alarms))
     else:
         return 0, "No Alarms present"

Upstream extensions

Hey guys,

I am wondering, now that CheckMK supports pull requests at https://github.com/tribe29/checkmk, why not move the extensions there so that they ship with CheckMK? Wouldn’t it be beneficial to skip the searching and installing of extensions and just have CheckMKs auto inventory make it all work by default?

kemplb: inventory not working / snmp_scan_function OID not available

Hey, we had a small issue here with the inventory function today. it seems like the snmp_scan_function is checking an OID which is not necessarily available in every configuration.

I described the problem and solution here: http://sitweak.wordpress.com/2014/05/14/problem-solved-monitoring-kemp-loadbalancers-with-check_mk-kemplb_real_servers-kemplb_rsvs-and-kemp_virtual_server/. Feel free to contact me on twitter or leave a comment in my blog.

Thanks for your effort!

Heiko

hpsa 5.2 Smart Array P244br shows Drives as CRIT but they are OK

Everything looks OK on this "Smart Array P244br" but checkmk displays them as CRIT.
I am wondering why.

$ cmk -vpn MYHOST | grep HP
HP RAID Array 0:A    OK - Solid 0 MB                                          ()
HP RAID Controller 0 OK - P244br                                              ()
HP RAID Drive 0:A:1I:1:1 CRIT - 0:A:1I:1:1 800 Solid State SAS GB,                ()
HP RAID Drive 0:A:1I:1:2 CRIT - 0:A:1I:1:2 800 Solid State SAS GB,                ()

Though the hpssacli command tells me everything is fine:

# hpssacli controller all show config

Smart Array P244br in Slot 0 (Embedded)   (sn: XXXXXXXXXXXX)


   Port Name: 1I

   Internal Drive Cage at Port 1I, Box 1, OK
   array A (Solid State SAS, Unused Space: 0  MB)


      logicaldrive 1 (745.2 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, Solid State SAS, 800 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, Solid State SAS, 800 GB, OK)

This is the agent output

# ./mh_hpsa 
<<<hpsa_controller>>>
0 OK P244br
<<<hpsa_array>>>
0:A OK Solid 0 MB
<<<hpsa_drive>>>
0:A:1I:1:1 800 Solid State SAS GB,
0:A:1I:1:2 800 Solid State SAS GB,

Same with "bash -x"

# bash -x ./mh_hpsa 
+ export INFOMGR_BYPASS_NONSA=1
+ INFOMGR_BYPASS_NONSA=1
+ RAID_CHECK_TOOL=hpacucli
+ '[' -x /usr/sbin/hpssacli ']'
+ RAID_CHECK_TOOL=hpssacli
+ '[' -e /proc/driver/cciss -o -e /sys/bus/cciss -o -e /sys/bus/pci/drivers/hpsa ']'
+ echo '<<<hpsa_controller>>>'
<<<hpsa_controller>>>
+ cc=-1
+ CMD='hpssacli controller all show'
+ read -a cont
++ hpssacli controller all show
+ is_integer
+ '[' '' -eq '' ']'
+ return 2
+ read -a cont
+ is_integer 0
+ '[' 0 -eq 0 ']'
+ return 0
+ cc=0
+ read -a cstat
++ hpssacli controller slot=0 show
++ grep 'Controller Status'
+ '[' OK = OK ']'
+ echo '0 OK P244br'
0 OK P244br
+ controllers[$cc]=0
+ read -a cont
+ is_integer
+ '[' '' -eq '' ']'
+ return 2
+ read -a cont
+ echo '<<<hpsa_array>>>'
<<<hpsa_array>>>
++ seq 0 0
+ for c in '$(seq 0 $cc)'
+ ac=-1
+ CMD='hpssacli controller slot=0 array all show'
+ read -a cary
++ hpssacli controller slot=0 array all show
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XSmartX = XarrayX -o XSmartX = XArrayX ']'
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XarrayX = XarrayX -o XarrayX = XArrayX ']'
+ ac=0
+ read -d + -a x
++ hpssacli controller slot=0 array A show
++ sed 's/(Embedded)//'
+ read -a ary
+ [[ hpssacli = \h\p\a\c\u\c\l\i ]]
+ [[ OK = \S\o\l\i\d ]]
+ echo '0:A OK Solid 0 MB'
0:A OK Solid 0 MB
+ arrays[$ac]=A
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ echo '<<<hpsa_drive>>>'
<<<hpsa_drive>>>
++ seq 0 0
+ for c in '$(seq 0 $cc)'
++ seq 0 0
+ for a in '$(seq 0 $ac)'
+ CMD='hpssacli controller slot=0 array A physicaldrive all show'
+ read -a pdrv
++ hpssacli controller slot=0 array A physicaldrive all show
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XSmartX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XarrayX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' XStateX = XHDD,X ']'
+ '[' XStateX = XSSD,X ']'
+ echo -n '0:A:1I:1:1 800 Solid State SAS '
0:A:1I:1:1 800 Solid State SAS + '[' GB, ']'
+ echo GB,
GB,
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' XStateX = XHDD,X ']'
+ '[' XStateX = XSSD,X ']'
+ echo -n '0:A:1I:1:2 800 Solid State SAS '
0:A:1I:1:2 800 Solid State SAS + '[' GB, ']'
+ echo GB,
GB,
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv

rspamd check fails, when there are no mails scanned

If there are no mails scanned, rspamc does not output the dict "actions", hence the check fails.
Added test for existing "actions" section in info.
Additionally, if there are no mails scanned, "total" remains 0, which fails the rate calculation later (division by zero).

Added pull request #70

NameError: name 'parse_json' is not defined

Hi,

I am using check_mk Raw 1.4.0p34, and I am trying to monitor my ceph cluster using your plugins I am getting this below error .

  1. I copied ceph-5.8.mkp files to /omd/sites/nms/version/skel/var/check_mk/packages folder and executed this below command.

check_mk -P install ceph-5.8.mkp

Post that installation I am getting this below error while trying to list the packages.

check_mk -vP list

Error in plugin file /usr/share/check_mk/checks/cephdf: name 'parse_json' is not defined

Please let me know how to resolve this.

Regards,
Abdul

Webinject enhancements

I developed some enhancements for Webinject checks based on your extension.

https://github.com/robertoschwald/check_mk_plugins/tree/master/webinject/src

Enhancements:

  • Packaged check_webinject Nagios check with the package (Version 1.94)
  • Reusable test files, as you can specify the config file name and the test file name. With this, you can use a common test file for many hosts, but webinject config files per host.
  • Configure username / password as needed by your webinject tests.

Feel free to move it into your plugin.
Just leave a note when you've done, so I can remove it from my repo. Thanks.

dell_sc_ctlrfan plugin needs default lower value?

Hello,

This plugin return an error:

Traceback (most recent call last):
  File "/omd/sites/nagtism/share/check_mk/modules/check_mk.py", line 4909, in <module>
    exit_status = do_check(hostname, ipaddress, check_types)
  File "/omd/sites/nagtism/share/check_mk/modules/check_mk_base.py", line 1236, in do_check
    do_all_checks_on_host(hostname, ipaddress, only_check_types)
  File "/omd/sites/nagtism/share/check_mk/modules/check_mk_base.py", line 1523, in do_all_checks_on_host
    res = execute_check(checkname, item, params, description, aggrname, address)
  File "/omd/sites/nagtism/share/check_mk/modules/check_mk_base.py", line 1459, in execute_check
    result = sanitize_check_result(check_function(item, params, info), check_uses_snmp(checkname))
  File "/omd/sites/nagtism/local/share/check_mk/checks/dell_sc_ctlrfan", line 39, in check_dell_sc_ctlrfan
    res = check_fan(saveint(line[3]), params)
  File "/omd/sites/nagtism/local/share/check_mk/checks/fan.include", line 32, in check_fan
    warn, crit= params.get("lower", (None, None))
AttributeError: 'NoneType' object has no attribute 'get'

Setting default value for lower values solve the problem. This is my patch that contains also the solution for issue #35 (I don't know if my default values are consistent or not)

--- /omd/sites/nagtism/checks.old/dell_sc_ctlrfan.orig	2018-06-27 13:22:55.809582553 +0200
+++ dell_sc_ctlrfan	2018-06-27 13:32:10.674842726 +0200
@@ -16,6 +16,10 @@
 # to the Free Software Foundation, Inc., 51 Franklin St,  Fifth Floor,
 # Boston, MA 02110-1301 USA.
 
+factory_settings["dell_sc_ctlrfan_default_levels"] = {
+    "lower" : (7000, 6000),
+}
+
 def item_dell_sc_ctlrfan(line):
     ctlr, fan = line[0].split('.')
     return "Ctlr %s Fan %s" % (ctlr, fan)
@@ -34,7 +38,7 @@
         if item_dell_sc_ctlrfan(line) == item:
             res = check_fan(saveint(line[3]), params)
             ctlrfan_state = state.get(saveint(line[1]), ('unknown', 3))
-            info_text = "%s, %s RPM, State is %s %s" % (
+            info_text = "%s, %s RPM, State is %s" % (
                 line[2],
                 line[3],
                 ctlrfan_state[0],
@@ -55,4 +59,5 @@
     'snmp_scan_function'    : False, # lambda oid: 'compellent' in oid('.1.3.6.1.2.1.1.1.0').lower() and oid(".1.3.6.1.4.1.674.11000.2000.500.1.2.1.0") != None,
     'group'                 : "hw_fans",
     'includes'              : [ 'fan.include' ],
+    'default_levels_variable':"dell_sc_ctlrfan_default_levels",
 }

Andrea

hpsa 5.2 reports Array as CRIT on "Smart Array P440ar" but they are OK

Array 0:A and 0:B are reported by checkmk as CRIT but they look OK in "hpssacli controller all show config"

I am wondering why.

cmk -vpn MYOTHERSERVER | grep HP
HP RAID Array 0:A    CRIT - 0:A Status: SAS (0.0%) Used                       ()
HP RAID Array 0:B    CRIT - 0:B Status: SAS (0.0%) Used                       ()
HP RAID Controller 0 OK - P440ar                                              ()
HP RAID Drive 0:A:1I:1:1 OK - SAS 300 GB assigned                                 ()
HP RAID Drive 0:A:1I:1:2 OK - SAS 300 GB assigned                                 ()
HP RAID Drive 0:B:1I:1:3 OK - SAS 600 GB assigned                                 ()
HP RAID Drive 0:B:1I:1:4 OK - SAS 600 GB assigned                                 ()
HP RAID Drive 0:B:2I:1:5 OK - SAS 600 GB assigned                                 ()

Looks OK to me:

# hpssacli controller all show config

Smart Array P440ar in Slot 0 (Embedded)   (sn: XXXXXXXXXXXXXXXXX)


   Port Name: 1I

   Port Name: 2I

   Internal Drive Cage at Port 1I, Box 1, OK

   Internal Drive Cage at Port 2I, Box 1, OK
   array A (SAS, Unused Space: 0  MB)


      logicaldrive 1 (279.4 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)

   array B (SAS, Unused Space: 0  MB)


      logicaldrive 2 (1.1 TB, RAID 5, OK)

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 600 GB, OK)

The agent output:

# ./mh_hpsa 
<<<hpsa_controller>>>
0 OK P440ar
<<<hpsa_array>>>
0:A Status: SAS (0.0%) Used
0:B Status: SAS (0.0%) Used
<<<hpsa_drive>>>
0:A:1I:1:1 OK SAS 300 GB assigned
0:A:1I:1:2 OK SAS 300 GB assigned
0:B:1I:1:3 OK SAS 600 GB assigned
0:B:1I:1:4 OK SAS 600 GB assigned
0:B:2I:1:5 OK SAS 600 GB assigned

Same with "bash -x"

# bash -x ./mh_hpsa 
+ export INFOMGR_BYPASS_NONSA=1
+ INFOMGR_BYPASS_NONSA=1
+ RAID_CHECK_TOOL=hpacucli
+ '[' -x /usr/sbin/hpssacli ']'
+ RAID_CHECK_TOOL=hpssacli
+ '[' -e /proc/driver/cciss -o -e /sys/bus/cciss -o -e /sys/bus/pci/drivers/hpsa ']'
+ echo '<<<hpsa_controller>>>'
<<<hpsa_controller>>>
+ cc=-1
+ CMD='hpssacli controller all show'
+ read -a cont
++ hpssacli controller all show
+ is_integer
+ '[' '' -eq '' ']'
+ return 2
+ read -a cont
+ is_integer 0
+ '[' 0 -eq 0 ']'
+ return 0
+ cc=0
+ read -a cstat
++ hpssacli controller slot=0 show
++ grep 'Controller Status'
+ '[' OK = OK ']'
+ echo '0 OK P440ar'
0 OK P440ar
+ controllers[$cc]=0
+ read -a cont
+ is_integer
+ '[' '' -eq '' ']'
+ return 2
+ read -a cont
+ echo '<<<hpsa_array>>>'
<<<hpsa_array>>>
++ seq 0 0
+ for c in '$(seq 0 $cc)'
+ ac=-1
+ CMD='hpssacli controller slot=0 array all show'
+ read -a cary
++ hpssacli controller slot=0 array all show
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XSmartX = XarrayX -o XSmartX = XArrayX ']'
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XarrayX = XarrayX -o XarrayX = XArrayX ']'
+ ac=0
+ read -d + -a x
++ hpssacli controller slot=0 array A show
++ sed 's/(Embedded)//'
+ read -a ary
+ [[ hpssacli = \h\p\a\c\u\c\l\i ]]
+ [[ Status: = \S\o\l\i\d ]]
+ echo '0:A Status: SAS (0.0%) Used'
0:A Status: SAS (0.0%) Used
+ arrays[$ac]=A
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XarrayX = XarrayX -o XarrayX = XArrayX ']'
+ ac=1
+ read -d + -a x
++ hpssacli controller slot=0 array B show
++ sed 's/(Embedded)//'
+ read -a ary
+ [[ hpssacli = \h\p\a\c\u\c\l\i ]]
+ [[ Status: = \S\o\l\i\d ]]
+ echo '0:B Status: SAS (0.0%) Used'
0:B Status: SAS (0.0%) Used
+ arrays[$ac]=B
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ '[' XX = XarrayX -o XX = XArrayX ']'
+ read -a cary
+ echo '<<<hpsa_drive>>>'
<<<hpsa_drive>>>
++ seq 0 0
+ for c in '$(seq 0 $cc)'
++ seq 0 1
+ for a in '$(seq 0 $ac)'
+ CMD='hpssacli controller slot=0 array A physicaldrive all show'
+ read -a pdrv
++ hpssacli controller slot=0 array A physicaldrive all show
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XSmartX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XarrayX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' X300X = XHDD,X ']'
+ '[' X300X = XSSD,X ']'
+ echo -n '0:A:1I:1:1 OK SAS 300 GB '
0:A:1I:1:1 OK SAS 300 GB + '[' ']'
+ echo assigned
assigned
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' X300X = XHDD,X ']'
+ '[' X300X = XSSD,X ']'
+ echo -n '0:A:1I:1:2 OK SAS 300 GB '
0:A:1I:1:2 OK SAS 300 GB + '[' ']'
+ echo assigned
assigned
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ for a in '$(seq 0 $ac)'
+ CMD='hpssacli controller slot=0 array B physicaldrive all show'
+ read -a pdrv
++ hpssacli controller slot=0 array B physicaldrive all show
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XSmartX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XarrayX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' X600X = XHDD,X ']'
+ '[' X600X = XSSD,X ']'
+ echo -n '0:B:1I:1:3 OK SAS 600 GB '
0:B:1I:1:3 OK SAS 600 GB + '[' ']'
+ echo assigned
assigned
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' X600X = XHDD,X ']'
+ '[' X600X = XSSD,X ']'
+ echo -n '0:B:1I:1:4 OK SAS 600 GB '
0:B:1I:1:4 OK SAS 600 GB + '[' ']'
+ echo assigned
assigned
+ read -a pdrv
+ '[' XphysicaldriveX = XphysicaldriveX ']'
+ '[' X600X = XHDD,X ']'
+ '[' X600X = XSSD,X ']'
+ echo -n '0:B:2I:1:5 OK SAS 600 GB '
0:B:2I:1:5 OK SAS 600 GB + '[' ']'
+ echo assigned
assigned
+ read -a pdrv
+ '[' XX = XphysicaldriveX ']'
+ read -a pdrv

Thanks

Illegal scan function in check_infortrend*

Hi,

I'll be making some patches but in case you're headscratching:

The infortrend checks have a check function that probs for an OIDs existance.
A check function shouldn't access any external non-cached data if data can be pulled from cache.
So fix is to only look if the infortrend mib subtree is listed in the 1.3.4.1.6.1....2 oid.

Anyway, will be making a pr.

Error after installing

I use OMD 1.2.8p4 and get the following error after install the plug in and clicking wato.

Traceback (most recent call last): File "/omd/sites/COMPANY/share/check_mk/web/htdocs/wato.py", line 234, in page_handler modefunc("buttons") File "/omd/sites/COMPANY/share/check_mk/web/htdocs/wato.py", line 12176, in mode_edit_ruleset groupname = g_rulegroups[group][0] KeyError: 'agents'

cephpools: performance graphs s

Die Performance Graphen zeigen bei mir inkorrekte Daten an, obwohl der Service Output stimmt. Im Graph filesystem_size ist die Größe um zwei Einheiten verschoben (MB statt TB), used, free, warn & crit werden gar nicht angezeigt, die anderen Graphen ergeben überhaupt keinen Sinn:

graphs

Hab sowohl unter 1.4.0p7 als auch unter 1.2.8p26 (beides cee) getestet. Kann jemand das reproduzieren?

sslcertificates using

Hi,
what do i have to specify as path on windows for the sslcertificates check?
Are s/mime certificates evaluated as well?

ceph: Function size_trend not found after upgrade to check_mk 1.5.0

After upgrading to check_mk version 1.5.0 all ceph checks crash with the following exception:

MKGeneralException (Function size_trend not found. Please include "size_trend.include" in your check)

I was able to fix it by adding the size_trend.include in those files:
/omd/sites/fc/local/share/check_mk/checks/cephstatus
/omd/sites/fc/local/share/check_mk/checks/cephosd
/omd/sites/fc/local/share/check_mk/checks/cephpools
/omd/sites/fc/local/share/check_mk/checks/cephdf

Rspamd check: rrd errors

Hi there,
we are using your rspamd check (0.4/branch cmk1.6), thanks for this!
But at our cmk Installation (CheckMK Raw 1.6.0p14) the rrd graphs only show an traceback error.
Is it possible that this check works only for the Enterprise Edition?
Link to rrd error screenshots: https://cloud.s-v.de/index.php/s/LIwV3HEm9bSl4Ez
PW: rspamd
Thanks in advance!

SAN in output

I changed the Linux plugin so that not only the subject of the certificate appears in the output but also the subject alternative names if available.

cert_algosign=$($OPENSSL x509 -inform $inform -noout -text -in "$certfile" | awk '/Signature Algorithm: / { print $3; exit;}' )
# determine SAN 
cert_san=$($OPENSSL x509 -inform $inform -noout -text -in "$certfile" | sed -ne 's/^\(*\)Subject:/\1/p;/X509v3 Subject Alternative Name/{N;s/^.*\n//;:a;s/^\( *\)\(.*\), /\1\2\n\1/;ta;p;q; }' | sed -e 's/ //g'|tr '\n' ';')
#echo "$certfile $cert_enddate_epoch $cert_algosign $cert_subject"
# Output 
echo "$certfile $cert_enddate_epoch $cert_algosign $cert_san"

Ceph Plugin not shown (inventory)

Hello,

we're trying to get your ceph plugin to work.
We use the following versions here:

CheckMK: 1.4.0p 26
Ceph: 12.2.5-1xenial

After the MKP has been installed, you can see the ceph data in the agend output. However, the new service is not displayed in WATO.

Agent and server show the following:
####################################################################
root@ceph-02:/usr/lib/check_mk_agent/plugins# ./ceph
<<>>>
cluster:
id: 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
health: HEALTH_OK

services:
mon: 3 daemons, quorum tn-ceph-01,tn-ceph-02,tn-ceph-03
mgr: tn-ceph-controller(active), standbys: tn-ceph-01
osd: 12 osds: 12 up, 12 in

data:
pools: 2 pools, 256 pgs
objects: 37110 objects, 144 GB
usage: 445 GB used, 21015 GB / 21460 GB avail
pgs: 256 active+clean

io:
client: 0 fps rd, 798 kB/s wr, 0 op/s rd, 18 op/s wr

<<>>>
GLOBAL:
SIZE AVAIL RAW USED %RAW USED
21460G 21015G 445G 2.08
POOLS:
NAME ID USED %USED MAX AVAIL OBJECTS
storage 1 59952M 0.88 6609G 15122
myytestpool 3 87948M 1.28 6609G 21988

####################################################################

If the MKP 5.7 is installed, we get the following errors:
####################################################################
mkp list ceph
Error in plugin file /omd/sites/neusta/local/share/check_mk/checks/cephdf: name 'parse_json' is not defined
Error in plugin file /omd/sites/neusta/local/share/check_mk/checks/cephosd: name 'parse_json' is not defined
Error in plugin file /omd/sites/neusta/local/share/check_mk/checks/cephstatus: name 'parse_json' is not defined
/omd/sites/neusta/local/share/check_mk/checks/ceph
/omd/sites/neusta/local/share/check_mk/checks/cephpools
/omd/sites/neusta/local/share/check_mk/checks/cephdf
/omd/sites/neusta/local/share/check_mk/checks/cephosd
/omd/sites/neusta/local/share/check_mk/checks/cephstatus
/omd/sites/neusta/local/share/check_mk/agents/bakery/ceph
/omd/sites/neusta/local/share/check_mk/agents/plugins/ceph
/omd/sites/neusta/local/share/check_mk/web/plugins/wato/agent_bakery_ceph.py
/omd/sites/neusta/local/share/check_mk/web/plugins/metrics/ceph.py
/omd/sites/neusta/local/share/check_mk/pnp-templates/check_mk-cephdf.php
/omd/sites/neusta/local/share/check_mk/pnp-templates/check_mk-cephosd.php
/omd/sites/neusta/local/share/check_mk/pnp-templates/check_mk-cephpools.php
/omd/sites/neusta/local/share/check_mk/pnp-templates/check_mk-cephstatus.php
####################################################################

But the plugin is loaded:
####################################################################
check_mk -L |grep ceph
ceph tcp (no man page present)
cephpools tcp (no man page present)
####################################################################

With version 4.1 this does not happen.

However, in both cases it does not work as desired.

jira_notifications not working with Check_MK 1.5.0p13

Hi, I am trying to use jira_notifications with Check_MK 1.5.0p13. Followed the documentation and have defined URL, Username, Password, Project ID and Issue type ID in Notification screen. But when a notification is generated, I don't see any call to Jira server. Enabled access_log on Jira server and don't see any request coming in from Check_MK. notifications log is only showing that rule matched and notification sent, but nothing gets received into Jira.

Since I am new to Python, any idea on where to look into troubleshoot and make this work with Jira?

Thanks.

Postconf not working through check_mk 1.2.4

Installed plugin on monitoring server and agent host. Server finds it in the re-inventory, but when run, the following error is logged in check_mk's debug log:

Invalid output from plugin or error in check:
  Check_MK Version: 1.2.4
  Date:             2014-01-04 04:07:54
  Host:             nks-p-mail-000-c.ssn.nks.net
  Service:          Postfix Config
  Check type:       postconf
  Item:             None
  Parameters:       None
  Traceback (most recent call last):
        File "/var/lib/check_mk/precompiled/nks-p-mail-000-c.ssn.nks.net", line 884, in do_all_checks_on_host
          ^@j^F^@|^W^@<83>^A^@^A|^N^@j^F^@|^O^@|^R^@|^U^@|^V^@d^E^@|^D^@f^F^@<83>^A^@^Aq<95>^@W|^L^@d^O^@|^D^@^Vd^P^@j^G^@|
        File "/var/lib/check_mk/precompiled/nks-p-mail-000-c.ssn.nks.net", line 1869, in check_postconf
      TypeError: 'NoneType' object is not iterable

  Agent info:       [['2bounce_notice_recipient', '=', 'postmaster'],

Running the "postfix" agent script on the agent's host spits out the postfix configuration as expected.

All other checks through check_mk to the agent seem to be functional.

hpsa 5.2 (too) many invocations of hpssacli

I noticed that e.g. in this case hpssacli gets invoked 7 times.

# time bash -x ./mh_hpsa 2>&1| grep '^++ hpssacli'
++ hpssacli controller all show
++ hpssacli controller slot=0 show
++ hpssacli controller slot=0 array all show
++ hpssacli controller slot=0 array A show
++ hpssacli controller slot=0 array B show
++ hpssacli controller slot=0 array A physicaldrive all show
++ hpssacli controller slot=0 array B physicaldrive all show

real	0m4.052s

Does it make sense to run hpssacli several times ?
Isn't all information already included in "hpssacli controller all show config" ?

# hpssacli controller all show config

Smart Array P440ar in Slot 0 (Embedded)   (sn: XXXXXXXXXX )


   Port Name: 1I

   Port Name: 2I

   Internal Drive Cage at Port 1I, Box 1, OK

   Internal Drive Cage at Port 2I, Box 1, OK
   array A (SAS, Unused Space: 0  MB)


      logicaldrive 1 (279.4 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)

   array B (SAS, Unused Space: 0  MB)


      logicaldrive 2 (1.1 TB, RAID 5, OK)

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 600 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 600 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 600 GB, OK)

Can't use wato to connect

If i fill the arguments in WATO i can't connect to pingdom. I get a 401 error then.

If i use the commanline i get the output .. but i have to put the password in 'password' .. could that be the problem that it is not working in WATO?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.