HowToUseMetaService

From Wiki Centreon

Jump to: navigation, search

This page is a stub with an example of how to use meta services in centreon.

In this example I use a meta service called InternetConnection for checking the amount of reachable servers in the Internet. In my case I defined a ping service each for my primary pop3, smtp, ftp and www sites (4 services). You can also add more sites like your favorite search or news sites, but then the values for warning and critical level has to be changed too.

First create a new meta service by going to Configuration > Services > Meta Services and selecting Add with the following values:

Meta Service Name: InternetConnection
Display format: %d servers reachable
Warning Level:  2
Critical Level: 3
Calculation Type: Sum 
Selection Mode: Service List
SQL matching	
Metric: ok

... and your favorite notification options. Display format is specified as a printf-style string with '%d' variable for the result. The above example results in the plugin output beeing:

4 servers reachable|value=4;2;4;

The selection mode may be choosen between "Service List" and "SQL (pattern) matching". The first case is used here, so the services have to be selected and added in the next step. The alternative pattern matching method allows to specify a SQL LIKE clause as described on www.sql.org for postgresql.

Afterwards go to the meta services main screen and use the marked icon to add services: Image:Metaservice-add.png

Host: google
Service: ping
Metrics: ok()

... save and be happy about watching your new meta service! :)

Personal tools