How to create a custom check with all metrics in a single graph (w/o creating a custom graph)

Hi,

I would like to create a custom check, which measures the size of subfolders of a specific folder and shows them in a single graph (one line per folder). This is somehow similar to How to combine all same metrics of a series of hosts into a custom graph in one go but I would prefer not to have to create a custom graph. Instead all the metrics should be in the same graph by default (there are lots of subfolders…).

Additionally, the number of measured subfolders can change, when folders are deleted or new folders are created.

Is such a setup possible at all? I imagine, that others have had the same requirement in the past, but I was not able to find any suitable posts in the forum.

Hello Frank,

Normaly, this is only possible if you measure all folders in ONE service. If you want a service for each folder, you cannot avoid the custom graph.

Instructions for graphs with multiple metrics:

BUT the folder names in the metric file must be known for this. I am not aware that you can pass variables from the check to the metrics.

In my opinion and knowledge, there are 2 options:

  • Call up the same metric for each folder, then you have many lines without folder names.
  • Create one metric per folder in the metric file, which of course means an unwanted maintenance effort.

@MarcS sorry for the delay. :thinking: that doesn’t sound easy to solve. Thanks anyway for the valuable pointers. I’ll see if I want to implement this in checkmk at all or it an other solution might come in handier