CHECK_OPENMANAGE.C(5)

πŸ“¦
version 3.7.12 Β· 3 versions
, in epel 9

πŸ’– CHECK_OPENMANAGE.C(5) β€” the config file glow-up πŸ’–

okay bestie, so this is section 5 of the manual (CHECK_OPENMANAGE.C(5), Nagios plugin territory) and it's literally all about check_openmanage.conf β€” the configuration file for check_openmanage. yes, that config file. the one you keep forgetting the syntax of. not anymore. 🫢


✨ NAME ✨

check_openmanage.conf β€” the configuration file for check_openmanage. that's it, that's the name. iconic behaviour honestly.


πŸŽ€ FILE FORMAT πŸŽ€

okay so the file has ini-style syntax and it's made of sections and parameters. a section begins with the name of the section in square brackets and continues until the next section begins. here's an example of a section with two keywords and parameters:

[section]
    key1 = boolean
    key2 = string

the data types in play are string (no quotes needed, we're chill like that) and bool (values of β€œTRUE/FALSE”). for boolean values, β€œ1”, β€œon” and β€œtrue” are equivalent, and likewise β€œ0”, β€œoff” and β€œfalse” are equivalent. they're also case insensitive, which, thank u honestly. ✨

the root section or global section has no section name in brackets:

key1 = value1
key2 = value2

[section]
    key3 = value3
    key4 = value4

and here's the tea: the values set in a bracket section will override those set in the root section, in case of conflicts. closest match wins, periodt. πŸ‘‘

lines starting with β€œ#” or β€œ;” are considered comments and ignored, as are blank lines. so go off, annotate your config, live your truth. 🌸

the configuration file must be a regular file. owner and group does not matter, but the Nagios user must have read access. that's the one non-negotiable bestie, don't forget it. πŸ™ˆ


πŸ¦‹ SECTIONS AND ORDERING πŸ¦‹

the section name should correspond to the hostname, i.e. the value passed to the -H or --hostname command line option. and the section name itself can be either an exact match to the hostname, or a glob pattern. versatile queen. πŸ’…

the sections are read in order of significance:

  1. the root section is read first
  2. then any sections with glob patterns that match the hostname are read (alphabetically)
  3. any section whose name is an exact match to the hostname is read last

for boolean values, any conflicts are resolved by letting the section with the most significance (closest match to the hostname) override any previous definitions. for string values, they are simply added together. no conflict, just vibes. 🌈

normal shell globbing may be used for the section names. this is limited to β€œ*”, β€œ?” and β€œ[]”. some examples:

[web*.example.com]
    # matches e.g. webmail.example.com

[pgsql-[34].example.com]
    # matches pgsql-3.example.com and pgsql-4.example.com

[login?.example.com]
    # matches e.g. login1.example.com
CAUTION: be careful not to have more than one glob pattern section match any single host. this may lead to unpredictable results. πŸ’€ and by unpredictable we mean the kind of unpredictable that ruins your whole on-call shift. you've been warned, bestie.

πŸ”₯ CONFIGURATION πŸ”₯

all configuration file options have a corresponding command line option. usually, the command line option will override the configuration file option, if used simultaneously. command line stays main character. πŸ‘‘

each option is described briefly. for more information about syntax, legal values etc. refer to the corresponding command line option in check_openmanage(8).

πŸ’œ Check control configuration options πŸ’œ

any keyword to the --check command line option are accepted in the configuration file, as check_<keyword>. these options take boolean values (β€œtrue” or β€œfalse”). the following keywords are accepted for check control, listed here with their default values:

  • check_storage β€” check storage subsystem (controllers, disks etc.). Default: TRUE
  • check_memory β€” check memory (dimms). Default: TRUE
  • check_fans β€” check chassis fans. Default: TRUE
  • check_power β€” check power supplies. Default: TRUE
  • check_temp β€” check temperature sensors. Default: TRUE
  • check_cpu β€” check CPUs. Default: TRUE
  • check_voltage β€” check voltage sensors. Default: TRUE
  • check_batteries β€” check system batteries. Default: TRUE
  • check_amperage β€” check amperage probes. Default: TRUE
  • check_intrusion β€” check chassis intrusion. Default: TRUE
  • check_sdcard β€” check SD cards. Default: TRUE
  • check_esmhealth β€” check the ESM log health, i.e. fill grade. Default: TRUE
  • check_servicetag β€” check that the service tag (serial number) is sane and not empty. Default: TRUE
  • check_esmlog β€” check the ESM log content. Default: FALSE
  • check_alertlog β€” check the alert log content. Default: FALSE
  • check_everything β€” special option that turns on all checks. setting this option to "true" will effectively negate any other check options. this option corresponds to the -a or --all command line option. it's giving "select all, no notes". πŸ“

if used together with the --check command line option, the command line option will override the configuration file, if there is a conflict.

for more information about check control, see the CHECK CONTROL section in check_openmanage(8).

πŸ’– General configuration options πŸ’–

  • blacklist (string) β€” blacklist components. the argument is a string that uses the same syntax as the -b or --blacklist command line option.

if used together with the -b or --blacklist command line option, the two blacklists from the config file and command line are merged together.

for more information about blacklisting, including syntax, see the BLACKLISTING section in check_openmanage(8).

  • timeout (integer) β€” the plugin timeout. the argument is number of seconds and should be a positive integer.

corresponding command line option: -t, --timeout

  • performance_data (boolean or string) β€” turn on/off performance data reporting. accepted values are boolean (TRUE/FALSE) or either of the keywords β€œminimal” and β€œmultiline”.

corresponding command line option: -p, --perfdata

  • legacy_performance_data (boolean) β€” with version 3.7.0, performance data output changed. the new format is not compatible with the old format. users who wish to postpone switching to the new performance data API may use this option. this option takes a boolean value.

corresponding command line option: --legacy-perfdata

  • temperature_unit (char) β€” the temperature unit used for reporting, performance data etc. can be set with the this option.

corresponding command line option: --tempunit

NOTE: the command line option -F or --fahrenheit will override both the command line option and the configuration file option. it's the final boss of temperature units, lowkey. πŸ”₯
  • temp_threshold_warning (string) β€” custom temperature warning limits.

corresponding command line option: -w, --warning

  • temp_threshold_critical (string) β€” custom temperature critical limits.

corresponding command line option: -c, --critical

  • vdisk_critical (boolean) β€” make all alerts concerning virtual disks appear as critical.

corresponding command line option: --vdisk-critical

🌸 SNMP configuration options 🌸

several SNMP related options may be set in the configuration file. the configuration file may contain the following SNMP options:

  • snmp_community (string) β€” the SNMP community string.

corresponding command line option: -C, --community

  • snmp_version (string) β€” the SNMP protocol version.

corresponding command line option: -P, --protocol

  • snmp_port (integer) β€” the remote port number used with SNMP.

corresponding command line option: --port

  • snmp_use_ipv6 (boolean) β€” toggle using IPv6 instead of IPv4.

corresponding command line option: -6, --ipv6

  • snmp_use_tcp (boolean) β€” toggle using TCP instead of UDP as transport protocol.

corresponding command line option: --tcp

  • snmp_timeout (integer) β€” set timeout in seconds for the SNMP object of Net::SNMP.

corresponding command line option: --snmp-timeout

🧚 Output configuration options 🧚

these options gives some control over the output given by the plugin. a little creative direction, if you will. 🎨

  • output_servicetag (boolean) β€” toggle inclusion of the service tag (serial number) of the monitored host in alerts.

corresponding command line option: -i, --info

  • output_servicestate (boolean) β€” toggle inclusion of the service state in alerts.

corresponding command line option: -s, --state

  • output_servicestate_abbr (boolean) β€” toggle inclusion of the abbreviated service state in alerts.

corresponding command line option: -S, --short-state

  • output_sysinfo (boolean) β€” toggle inclusion of a short system information summary in case of alerts.

corresponding command line option: -e, --extinfo

  • output_blacklist (boolean) β€” toggle showing any blacklistings in the OK output.

corresponding command line option: -B, --show-blacklist

  • output_ok_verbosity (integer) β€” this option specifies how much information is shown in the OK output.

corresponding command line option: -o, --ok-info

  • output_html (boolean or code) β€” this option toggles HTML output. argument is either a boolean value, or a country or area code. see check_openmanage(8) for more information and list of supported country and area codes.

corresponding command line option: -I, --htmlinfo

  • output_post_message (string) β€” specify one line of information to be shown after alerts.

corresponding command line option: --postmsg

  • output_hide_servicetag (boolean) β€” this option toggles censoring of the service tag (serial number) in any output from the plugin. privacy era. πŸ™ˆ

corresponding command line option: --hide-servicetag


⭐ EXAMPLE ⭐

the following example shows a typical check_openmanage config, with a global section and a few host sections. steal this, it's cute:

# Global definitions
output_blacklist = true
output_ok_verbosity = 3
output_sysinfo = true
output_html = us

# Local definitions (exact or glob pattern)
[esx??.example.com]
    blacklist = ctrl_fw=all
    check_storage = false

[mysql01.example.com]
    performance_data = true

[web0[123].example.com]
    performance_data = true
    blacklist = ctrl_driver=all

[*.hpc.example.com]
    performance_data = true

πŸ‘‘ SEE ALSO πŸ‘‘


🫢 AUTHORS 🫢

Trond Hasle Amundsen <t.h.amundsen@usit.uio.no> β€” the legend responsible for all of this, we stan. πŸ’–


and that's the whole page bestie!! 🌟 this was check_openmanage, dated 05/20/2023, living in section CHECK_OPENMANAGE.C(5) of the manual β€” go forth and configure responsibly, mwah πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from