summaryrefslogtreecommitdiff
path: root/example/site_check_mk/files
diff options
context:
space:
mode:
Diffstat (limited to 'example/site_check_mk/files')
-rw-r--r--example/site_check_mk/files/adjust.mk12
-rw-r--r--example/site_check_mk/files/agent/apt/check_apt15
-rw-r--r--example/site_check_mk/files/agent/logwatch/syslog_header.cfg1
-rw-r--r--example/site_check_mk/files/agent/logwatch/syslog_tail.cfg11
-rw-r--r--example/site_check_mk/files/host_contactgroups.mk3
-rw-r--r--example/site_check_mk/files/ignore.mk97
-rw-r--r--example/site_check_mk/files/nohost.mk3
-rw-r--r--example/site_check_mk/files/parents.mk8
-rw-r--r--example/site_check_mk/files/submission.mk4
-rw-r--r--example/site_check_mk/files/use_ssh.mk4
10 files changed, 158 insertions, 0 deletions
diff --git a/example/site_check_mk/files/adjust.mk b/example/site_check_mk/files/adjust.mk
new file mode 100644
index 0000000..5c0566e
--- /dev/null
+++ b/example/site_check_mk/files/adjust.mk
@@ -0,0 +1,12 @@
+# adjust.mk - checks we need to adjust the defaults
+
+## global defaults
+# memory usage (default 150/200%, float val indicates % of physical RAM)
+memused_default_levels = (90.0, 95.0)
+
+## host overrides
+# some check types cannot be adjusted via check_parameters, so we explicitly
+# create redundant checks using host lists or tags
+checks += [
+ ( ['foo.example.org','bar.example.org'], 'cpu.threads', None, (6000, 7000) ),
+]
diff --git a/example/site_check_mk/files/agent/apt/check_apt b/example/site_check_mk/files/agent/apt/check_apt
new file mode 100644
index 0000000..223dd8a
--- /dev/null
+++ b/example/site_check_mk/files/agent/apt/check_apt
@@ -0,0 +1,15 @@
+#!/bin/sh
+# check_apt wrapper to gather more info about pending packages
+
+# call the original plugin
+MSG=`/usr/lib/nagios/plugins/check_apt $*`
+
+EXIT=$?
+
+echo -n $MSG | sed 's/available for upgrade/upgradable/' | sed 's/ updates//' | sed 's/\./:/'
+
+if [ "$EXIT" != "0" ]
+then
+apt-get -s upgrade|egrep '(^ |wi ll be up|kept back)'|sed 's/The following packages will be upgraded://'| tr '\n' ' ' | sed 's/ */ /g'
+exit $EXIT
+fi
diff --git a/example/site_check_mk/files/agent/logwatch/syslog_header.cfg b/example/site_check_mk/files/agent/logwatch/syslog_header.cfg
new file mode 100644
index 0000000..f60d752
--- /dev/null
+++ b/example/site_check_mk/files/agent/logwatch/syslog_header.cfg
@@ -0,0 +1 @@
+/var/log/syslog
diff --git a/example/site_check_mk/files/agent/logwatch/syslog_tail.cfg b/example/site_check_mk/files/agent/logwatch/syslog_tail.cfg
new file mode 100644
index 0000000..450b9e9
--- /dev/null
+++ b/example/site_check_mk/files/agent/logwatch/syslog_tail.cfg
@@ -0,0 +1,11 @@
+# some general patterns
+ C panic
+ C Oops
+ I Error: Driver 'pcspkr' is already registered, aborting...
+ C Error
+ C error
+ W generic protection rip
+ W .*Unrecovered read error - auto reallocate failed
+# 401 Unauthorized error logged by webapp and possible other
+# applications
+ C Unauthorized
diff --git a/example/site_check_mk/files/host_contactgroups.mk b/example/site_check_mk/files/host_contactgroups.mk
new file mode 100644
index 0000000..aeba291
--- /dev/null
+++ b/example/site_check_mk/files/host_contactgroups.mk
@@ -0,0 +1,3 @@
+host_contactgroups = [
+ ( "sysadmins", ALL_HOSTS ),
+]
diff --git a/example/site_check_mk/files/ignore.mk b/example/site_check_mk/files/ignore.mk
new file mode 100644
index 0000000..33aad11
--- /dev/null
+++ b/example/site_check_mk/files/ignore.mk
@@ -0,0 +1,97 @@
+# ignore.mk - built-in checks we ignore
+ignored_checktypes = [
+# ignored until we can investigate
+"hp_procurve_cpu", "hp_procurve_mem", "hp_procurve_sensors",
+"ipmi", "ipmi_sensors",
+"tcp_conn_stats",
+
+# useful generic types, ignored until we need them
+"if", "if64"
+"local",
+"logwatch",
+
+# postfix_queue is only the full mailq, we have our own check_postfixqueue
+# that can check individual queue (which we filed a feature request for
+# upstream
+"postfix_mailq",
+
+# ignored because we don't want them
+"3ware_disks", "3ware_info", "3ware_units",
+"ad_replication",
+"aironet_clients", "aironet_errors",
+"akcp_sensor_humidity", "akcp_sensor_temp",
+"apc_symmetra", "apc_symmetra_ext_temp", "apc_symmetra_power", "apc_symmetra_temp",
+"bintec_info",
+"blade_bays", "blade_blades", "blade_blowers", "blade_health", "blade_mediatray", "blade_misc", "blade_powerfan", "blade_powermod",
+"bluecoat_diskcpu", "bluecoat_sensors",
+"brocade_fcport",
+"canon_pages",
+"check_mk.only_from",
+"cisco_fan", "cisco_locif", "cisco_power", "cisco_qos", "cisco_temp", "cisco_temp_perf",
+"cmctc.temp",
+"cpsecure_sessions",
+"cups_queues",
+"decru_cpu", "decru_fans", "decru_perf", "decru_power", "decru_temps",
+"dell_powerconnect_cpu", "dell_powerconnect_fans", "dell_powerconnect_psu", "dell_powerconnect_temp",
+"df_netapp", "df_netapp32",
+"dmi_sysinfo",
+"drbd", "drbd.disk", "drbd.net", "drbd.stats",
+"f5_bigip_cluster", "f5_bigip_fans", "f5_bigip_pool", "f5_bigip_psu", "f5_bigip_temp", "f5_bigip_vserver",
+"fc_brocade_port", "fc_brocade_port_detailed",
+"fjdarye60_cadaps", "fjdarye60_cmods", "fjdarye60_cmods_flash",
+"fjdarye60_cmods_mem", "fjdarye60_conencs", "fjdarye60_devencs", "fjdarye60_disks", "fjdarye60_disks.summary", "fjdarye60_expanders", "fjdarye60_inletthmls", "fjdarye60_psus", "fjdarye60_rluns", "fjdarye60_sum", "fjdarye60_syscaps", "fjdarye60_thmls",
+"fsc_fans", "fsc_ipmi_mem_status", "fsc_subsystems", "fsc_temp",
+"h3c_lanswitch_cpu", "h3c_lanswitch_sensors",
+"heartbeat_crm", "heartbeat_crm.resources", "heartbeat_nodes", "heartbeat_rscstatus",
+"hp_blade", "hp_blade_blades", "hp_blade_fan", "hp_blade_manager", "hp_blade_psu",
+"hp_proliant_cpu", "hp_proliant_da_phydrv", "hp_proliant_fans", "hp_proliant_mem", "hp_proliant_psu", "hp_proliant_temp",
+"hpux_cpu", "hpux_if", "hpux_lvm", "hpux_multipath", "hpux_serviceguard",
+"hr_cpu", "hr_fs", "hr_mem",
+"ibm_imm_health", "ibm_rsa_health",
+"if", "if64",
+"ifoperstatus",
+"ironport_misc",
+"j4p_performance.app_sess", "j4p_performance.app_state", "j4p_performance.mem", "j4p_performance.serv_req", "j4p_performance.threads", "j4p_performance.uptime",
+"kernel.util",
+"lparstat_aix",
+"lsi.array", "lsi.disk",
+"mbg_lantime_refclock", "mbg_lantime_state",
+"mcdata_fcport",
+"megaraid_ldisks", "megaraid_pdisks",
+"mem.vmalloc",
+"mem.win",
+"multipath",
+"netapp_cluster", "netapp_vfiler", "netapp_volumes",
+"netctr.combined",
+"netif.link", "netif.params",
+"nfsmounts",
+"ntp", "ntp.time",
+"nvidia.errors", "nvidia.temp",
+"omd_status",
+"oracle_asm_dg", "oracle_asm_disk", "oracle_inst", "oracle_logswitches", "oracle_sessions", "oracle_tablespaces", "oracle_tbs",
+"printer_alerts", "printer_pages", "printer_supply",
+"ps.perf",
+"services",
+"smbios_sel",
+"snia_sml",
+"snmp_info", "snmp_uptime",
+"statgrab_cpu", "statgrab_disk", "statgrab_load", "statgrab_mem", "statgrab_net.ctr", "statgrab_net.link", "statgrab_net.params",
+"steelhead_connections", "steelhead_status",
+"strem1_sensors",
+"superstack3_sensors",
+"sylo",
+"systemtime",
+"tsm_stgpool",
+"ucd_cpu_load", "ucd_cpu_util",
+"ups_capacity", "ups_power",
+"vbox_guest",
+"vms_df", "vms_md", "vms_netif", "vms_sys.mem", "vms_sys.util",
+"vmstat_aix",
+"vmware_state",
+"win_dhcp_pools", "win_dhcp_pools.stats",
+"windows_updates",
+"winperf.cpuusage", "winperf.diskstat", "winperf_msx_queues", "winperf_phydisk", "winperf_processor.util",
+"wmic_process",
+"wut_webtherm",
+"zpool_status"
+]
diff --git a/example/site_check_mk/files/nohost.mk b/example/site_check_mk/files/nohost.mk
new file mode 100644
index 0000000..d0ff73f
--- /dev/null
+++ b/example/site_check_mk/files/nohost.mk
@@ -0,0 +1,3 @@
+# If you want to let nagios define the hosts rather than check_mk,
+# set this to False
+#generate_hostconf = False
diff --git a/example/site_check_mk/files/parents.mk b/example/site_check_mk/files/parents.mk
new file mode 100644
index 0000000..1b54083
--- /dev/null
+++ b/example/site_check_mk/files/parents.mk
@@ -0,0 +1,8 @@
+parents = [
+ # all seattle hosts (except those tagged router) have router.example.org
+ # as a parent
+ ( "router.example.org", ["seattle", "!router"], ALL_HOSTS ),
+
+ # KVM host
+ ( "foo.example.org", [ "vm1.example.org", "vm1.example.org" ] ),
+]
diff --git a/example/site_check_mk/files/submission.mk b/example/site_check_mk/files/submission.mk
new file mode 100644
index 0000000..cead6c3
--- /dev/null
+++ b/example/site_check_mk/files/submission.mk
@@ -0,0 +1,4 @@
+# default is "pipe", but file is more efficient (and default in newer versions)
+check_submission = "file"
+# the default in the debian package is wrong
+check_result_path = "/var/lib/nagios3/spool/checkresults/"
diff --git a/example/site_check_mk/files/use_ssh.mk b/example/site_check_mk/files/use_ssh.mk
new file mode 100644
index 0000000..eee1129
--- /dev/null
+++ b/example/site_check_mk/files/use_ssh.mk
@@ -0,0 +1,4 @@
+# http://mathias-kettner.de/checkmk_datasource_programs.html
+datasource_programs = [
+ ( "ssh -l checkmk -i /etc/check_mk/keys/<HOST>_id_rsa -p 1234 <HOST> sudo /usr/bin/check_mk_agent", ['ssh'], ALL_HOSTS ),
+ ]