[Check_mk (english)] Multiple local checks to same graph

Hi,

  I've defined some local checks. As a matter of fact, I've expanded my service- and hoststats-checks so that they now return problem statistics per host/service groups. The output is like so, returning six variables.

0 hoststats critproblems=0|unhandledcrit=0|prodproblems=2|unhandledprod=2|problems=11|unhandled=11 Total hosts=216, critproblems=0, unhandled=0, prodproblems=2, unhandled=2, problems=11, unhandled=11

  (Basically, returning problems for critical hosts, production hosts, and all others).

  Now, these appear in pnp4nagios graphs as completely separate graphs.

  Is there some way I can state that these should really be combined into same graph? Now I see 6 separate graphs.

  The problem here is that despite the fact that I've given the check a distinct name ("hoststats"), the check_mk architecture still sees those as local checks. Hence, in pnp4nagios's hoststats.xml-file, I see " <TEMPLATE>check_mk-local</TEMPLATE>" instead of the actual name of the check.

  Any ideas on how to work around this one?

- Antti

I have a local check called "Concurrent_Voip_Calls" and a template file called "Concurrent_Voip_Calls.php" - that works just fine.

See http://mathias-kettner.de/checkmk_localchecks.html

"PNP4Nagios uses the name of the check command for selecting a template for rendering the RRD graph. Since all local checks have the same command check_mk-local, the template check_mk-local.php will be used for all cases.
Since version 1.0.37, Check_mk ships a wrapper template with that name, that tries to find a service specific template file matching a prefix of the service description. Let's assume the service description is LDAP auth/4. The wrapper then first tries to find the file LDAP auth_4.php (slashes are replaced with underscores). If that file is present, it is used as template. Otherwise the file LDAP auth_.php will be tried, then LDAP auth.php, LDAP aut.php and so on until L.php. If none of those files is present, then PNP4Nagios' default.php will be loaded and will generate a graph based on your warn/crit levels.
All those files are expected to be in the same directory as check_mk-local.php"

//Colin

···

-----Original Message-----
From: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Mäkelä, Antti
Sent: 03 July 2012 13:06
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Multiple local checks to same graph

Hi,

  I've defined some local checks. As a matter of fact, I've expanded my service- and hoststats-checks so that they now return problem statistics per host/service groups. The output is like so, returning six variables.

0 hoststats critproblems=0|unhandledcrit=0|prodproblems=2|unhandledprod=2|problems=11|unhandled=11 Total hosts=216, critproblems=0, unhandled=0, prodproblems=2, unhandled=2, problems=11, unhandled=11

  (Basically, returning problems for critical hosts, production hosts, and all others).

  Now, these appear in pnp4nagios graphs as completely separate graphs.

  Is there some way I can state that these should really be combined into same graph? Now I see 6 separate graphs.

  The problem here is that despite the fact that I've given the check a distinct name ("hoststats"), the check_mk architecture still sees those as local checks. Hence, in pnp4nagios's hoststats.xml-file, I see " <TEMPLATE>check_mk-local</TEMPLATE>" instead of the actual name of the check.

  Any ideas on how to work around this one?

- Antti
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Great, I didn't notice this tidbit about the wrapper. Thanks!

- Antti

···

-----Original Message-----
From: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Colin Taylor
Sent: 3. heinäkuuta 2012 16:06
To: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Multiple local checks to same graph

I have a local check called "Concurrent_Voip_Calls" and a template file called "Concurrent_Voip_Calls.php" - that works just fine.

See http://mathias-kettner.de/checkmk_localchecks.html

"PNP4Nagios uses the name of the check command for selecting a template for rendering the RRD graph. Since all local checks have the same command check_mk-local, the template check_mk-local.php will be used for all cases.
Since version 1.0.37, Check_mk ships a wrapper template with that name, that tries to find a service specific template file matching a prefix of the service description. Let's assume the service description is LDAP auth/4. The wrapper then first tries to find the file LDAP auth_4.php (slashes are replaced with underscores). If that file is present, it is used as template. Otherwise the file LDAP auth_.php will be tried, then LDAP auth.php, LDAP aut.php and so on until L.php. If none of those files is present, then PNP4Nagios' default.php will be loaded and will generate a graph based on your warn/crit levels.
All those files are expected to be in the same directory as check_mk-local.php"

//Colin

-----Original Message-----
From: checkmk-en-bounces@lists.mathias-kettner.de [mailto:checkmk-en-bounces@lists.mathias-kettner.de] On Behalf Of Mäkelä, Antti
Sent: 03 July 2012 13:06
To: checkmk-en@lists.mathias-kettner.de
Subject: [Check_mk (english)] Multiple local checks to same graph

Hi,

  I've defined some local checks. As a matter of fact, I've expanded my service- and hoststats-checks so that they now return problem statistics per host/service groups. The output is like so, returning six variables.

0 hoststats critproblems=0|unhandledcrit=0|prodproblems=2|unhandledprod=2|problems=11|unhandled=11 Total hosts=216, critproblems=0, unhandled=0, prodproblems=2, unhandled=2, problems=11, unhandled=11

  (Basically, returning problems for critical hosts, production hosts, and all others).

  Now, these appear in pnp4nagios graphs as completely separate graphs.

  Is there some way I can state that these should really be combined into same graph? Now I see 6 separate graphs.

  The problem here is that despite the fact that I've given the check a distinct name ("hoststats"), the check_mk architecture still sees those as local checks. Hence, in pnp4nagios's hoststats.xml-file, I see " <TEMPLATE>check_mk-local</TEMPLATE>" instead of the actual name of the check.

  Any ideas on how to work around this one?

- Antti
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en