Werk #5769: site_object_counts: New check which collects information about the amount of different host types or used check commands of OMD sites

Component Checks & agents
Title site_object_counts: New check which collects information about the amount of different host types or used check commands of OMD sites
Date Mar 6, 2018
Level Trivial Change
Class New Feature
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
1.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0b1
Not yet released
Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

To make this check work please install the {{mk_site_object_counts}} agent plugin and specify host tags or check commands within the {{site_object_counts.cfg}} configration file. The following options are available:

{TAGS}global host tags
{SERVICE_CHECK_COMMANDS}global check commands
{SITES}restriction to specified sites
{TAGS_$SITENAME}site specific host tags
{SERVICE_CHECK_COMMANDS_$SITENAME}site specific check commands

The agent plugin is executed if and only if OMD is installed and there's a configuration file. Sites which provide an opened Livestatus socket {/omd/sites/$SITENAME/tmp/run/live} are taken into account.

Without the restrictive option {SITES} all sites on that server are considered which satisfy above conditions.

If more than one value is assigned they have to be separated by one space, eg.

  • {TAGS=prod snmp}
  • {SERVICE_CHECK_COMMANDS_sitename=kernel lnx_if}

H3:Example 1

site_object_counts.cfg

TAGS=snmp
SERVICE_CHECK_COMMANDS=if

With this configuration the agent plugin returns the amount of all SNMP hosts and the amount of all interface services of the type {if} of all sites.

H3:Example 2

site_object_counts.cfg

SITES=site_a site_b
TAGS=snmp
SERVICE_CHECK_COMMANDS=if

With this configuration the agent plugin returns the amount of all SNMP hosts and the amount of all interface services of the type {if} of the sites {site_a} and {site_b}.

H3:Example 3

site_object_counts.cfg

TAGS_site_a=snmp
SERVICE_CHECK_COMMANDS_site_a=if
TAGS_site_b=agent
SERVICE_CHECK_COMMANDS_site_b=lnx_if

With this configuration the agent plugin returns

  • the amount of all SNMP hosts and the amount of all interface services of the type {if} of the site {site_a} and
  • the amount of all agent-based hosts and the amount of all Linux interface services of the type {lnx_if} of the site {site_b}.

H3:Example 4

site_object_counts.cfg

TAGS=prod
SERVICE_CHECK_COMMANDS=omd_apache omd_status
TAGS_site_a=snmp
SERVICE_CHECK_COMMANDS_site_a=if
TAGS_site_b=agent
SERVICE_CHECK_COMMANDS_site_b=lnx_if

With this configuration the agent plugin returns

  • the amount of all productive hosts and services of type {omd_apache} and {omd_status} of all sites.
  • additionaly the amount of all SNMP hosts and the amount of all interface services of the type {if} of the site {site_a} and
  • additionaly the amount of all agent-based hosts and the amount of all Linux interface services of the type {lnx_if} of the site {site_b}.

H3:Example 5

site_object_counts.cfg

SITES=site_a site_b site_c
TAGS=prod
SERVICE_CHECK_COMMANDS=omd_apache omd_status
TAGS_site_a=snmp
SERVICE_CHECK_COMMANDS_site_a=if
TAGS_site_b=agent
SERVICE_CHECK_COMMANDS_site_b=lnx_if

With this configuration the agent plugin returns

  • the amount of all productive hosts and services of type {omd_apache} and {omd_status} of the sites {site_a}, {site_b} and {site_c}.
  • additionaly the amount of all SNMP hosts and the amount of all interface services of the type {if} of the site {site_a} and
  • additionaly the amount of all agent-based hosts and the amount of all Linux interface services of the type {lnx_if} of the site {site_b}.

To the list of all Werks