PNP templates for local checks

Hello,

I’ve configured several CheckMK local checks to monitor the status of some services running on the client servers. This check should throw either OK or CRIT on output and works perfectly fine. The only thing left is these are not in pnp4nagios graphs since CheckMK doesn’t know about it. I was looking to setup graph for the future reference and to send out history to the users when they request.

I found this thread [Check_mk (english)] pnp templates which exactly has the same doubts of mine but no one responded on that. Can someone shed some light on this or advise how we could setup a PNP template for my local check here.

@andreas-doehler - you’ve been helpful in many of my open threads. Any idea or anything you could share about this here. :slight_smile:

Thanks, :slight_smile:

Your local check has to explicitly return performance data (metrics). For example:
0 mylocalcheck myvalue=12 My local check has found a value of 12 and all is well.

Only the “myvalue=12” is taken as metrics. The “…value of 12 …” is just free human-readable text.
See the manual for details on the output format: https://checkmk.com/cms_localchecks.html

The metrics returned by this check (“myvalue”, currently at 12) are automatically graphed using the default template, no further configuration is required for this.

2 Likes

There is on template existing for local checks - check_mk-local.php - this one provides a wrapper that searches for a template for your local check.
In this post from 2012 it is also described. :wink:
[Check_mk (english)] Multiple local checks to same graph

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.