Custom Trends computation for the custom service I'am developing

Hello Team ,

Previously , I’ ve developed custom check_mk plugins in order to fit our custom business needs:

After some reverse engineering , we know that we can customize check-mk agents in this manner :
( all existing plugins plugins are following the same way ex : cpu , memory , disk …)

Host side :

  1. Develop custom agent in bash or python
    2 ) Put them in /usr/lib/check_mk_agent/local ( for the case where treshold is in the code itself )
  2. Put them in /usr/lib/check_mk_agent/plugins ( for the case that we are just sending the data in raw )

Monitoring Server Side :

  1. develop custom checks inside /opt/omd/sites/{{monitoring_site}}/local/share/check_mk/checks to handle the raw data
  2. develop custom wato , for custom treshold inside /opt/omd/sites/{{monitoring_site}}/local/share/check_mk/web/plugins/wato/
  3. add the manual of the agent inside /opt/omd/sites/{{monitoring_site}}/local/share/check_mk/checkman

My goal is to send notification when the metrics has reached a pic ( decrease , or increase ) in certain period of time as the built in agent I have said previously .

Want I want to do is know to develop custom trends computation for my custom plugins , as we know they are olny available in factory plugins like CPU , Memory and Disk .

Someone has an idea ?

Kr ,

Andry

The easiest way for your own checks would be to use the size_trend.include.
This include file provides a function size_trend. I thick it is possible to use this function for all types of checks where you want to compute a trend what depends on a size of something.
The description of this function looks very good. (inside the include file)

If you want to build your own trend function i would also use this function as a baseline to what is possible.

An example how to use this included function can be found inside the df check and there inside the df.include file.