Graph not displayed for Invoke-IcingaCheckCPU

Hi team,
I created a new check using Invoke-IcingaCheckCPU but no graphs are shown.

The whisper files were created but the graph debug log shows that the metrics were excluded:

+ Icinga check command: 'Invoke-IcingaCheckCPU'
+ Obscured check command: NULL
+ Applying templates for check command 'Invoke-IcingaCheckCPU'
++ Applying template 'load-windows'
+++ Fetched 0 metric(s) from 'http://192.168.9.77:81/metrics/expand?query=icinga2.KTC01_LABOR_domain_com.services.Windows_CPU.Invoke-IcingaCheckCPU.perfdata.%2A.value'
+++ Fetched 0 metric(s) from 'http://192.168.9.77:81/metrics/expand?query=icinga2.KTC01_LABOR_domain_com.services.Windows_CPU.Invoke-IcingaCheckCPU.perfdata.%2A.crit'
+++ Fetched 0 metric(s) from 'http://192.168.9.77:81/metrics/expand?query=icinga2.KTC01_LABOR_domain_com.services.Windows_CPU.Invoke-IcingaCheckCPU.perfdata.%2A.warn'
+++ Excluded 0 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)
+ Applying default templates, excluding previously used metrics
++ Not applying template 'default-host'
++ Applying template 'default-service'
+++ Fetched 0 metric(s) from 'http://192.168.9.77:81/metrics/expand?query=icinga2.KTC01_LABOR_domain_com.services.Windows_CPU.Invoke-IcingaCheckCPU.perfdata.%2A.value'
+++ Excluded 0 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)
++ Not applying template 'multi2-host'
++ Applying template 'multi2-service'
+++ Fetched 0 metric(s) from 'http://192.168.9.77:81/metrics/expand?query=icinga2.KTC01_LABOR_domain_com.services.Windows_CPU.Invoke-IcingaCheckCPU.perfdata.%2A.%2A.value'
+++ Excluded 0 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)
++ Not applying template 'multi3-host'
++ Applying template 'multi3-service'
+++ Fetched 10 metric(s) from 'http://192.168.9.77:81/metrics/expand?query=icinga2.KTC01_LABOR_domain_com.services.Windows_CPU.Invoke-IcingaCheckCPU.perfdata.%2A.%2A.%2A.value'
+++ Excluded 10 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)

My cpu_windows_powershell_framework.ini template file looks like this:

[load-windows.graph]
check_command = "Invoke-IcingaCheckCPU"

[load-windows.metrics_filters]
load.value = "$service_name_template$.perfdata.$load$.value"
crit.value = "$service_name_template$.perfdata.$load$.crit"
warn.value = "$service_name_template$.perfdata.$load$.warn"

[load-windows.urlparams]
areaAlpha = "0.5"
lineWidth = "2"
min = "0"
title = "CPU $load$ %"
yUnitSystem = "none"

[load-windows.functions]
load.value = "alias(color($metric$, '#1a7dd7'), 'CPU usage(%)')"
crit.value = "alias(color($metric$, '#ff0000'), 'Crit (%)')"
warn.value = "alias(color($metric$, '#ff8d00'), 'Warn (%)')"

How can we futher investigate the issue?
The check is called “Windows CPU” to avoid problems with special chars

Thanks and kind regards
Markus

Hi Markus,

are you sure about

check_command = "Invoke-IcingaCheckCPU"

?

Is the name of the CheckCommand (not the Service) correct?

Greetings.

Hi,
yes I am sure:
https://icinga.com/docs/icinga-for-windows/latest/plugins/doc/plugins/04-Invoke-IcingaCheckCPU/
The check is working as it should and I am receiving performance data.

Did you get this sorted out as I also have this problem ?

No, it’s still open…

OK, seems like it must just be some simple error?

I get this in the debug:

+ Icinga check command: 'Invoke-IcingaCheckCPU'
+ Obscured check command: NULL
+ Applying templates for check command 'Invoke-IcingaCheckCPU'
++ Applying template 'load-windows'
+++ Fetched 0 metric(s) from 'http://127.0.0.1:81/metrics/expand?query=icinga2.server01_local.services.windows-Invoke-IcingaCheckCPU.Invoke-IcingaCheckCPU.perfdata.%2A.value'
+++ Fetched 0 metric(s) from 'http://127.0.0.1:81/metrics/expand?query=icinga2.server01.services.windows-Invoke-IcingaCheckCPU.Invoke-IcingaCheckCPU.perfdata.%2A.crit'
+++ Fetched 0 metric(s) from 'http://127.0.0.1:81/metrics/expand?query=icinga2.server01.services.windows-Invoke-IcingaCheckCPU.Invoke-IcingaCheckCPU.perfdata.%2A.warn'
+++ Excluded 0 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)
+ Applying default templates, excluding previously used metrics
++ Not applying template 'multi2-host'
++ Applying template 'multi2-service'
+++ Fetched 0 metric(s) from 'http://127.0.0.1:81/metrics/expand?query=icinga2.server01.windows-Invoke-IcingaCheckCPU.Invoke-IcingaCheckCPU.perfdata.%2A.%2A.value'
+++ Excluded 0 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)
++ Not applying template 'multi3-host'
++ Applying template 'multi3-service'
+++ Fetched 3 metric(s) from 'http://127.0.0.1:81/metrics/expand?query=icinga2.server01.services.windows-Invoke-IcingaCheckCPU.Invoke-IcingaCheckCPU.perfdata.%2A.%2A.%2A.value'
+++ Excluded 3 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)
++ Not applying template 'default-host'
++ Applying template 'default-service'
+++ Fetched 0 metric(s) from 'http://127.0.0.1:81/metrics/expand?query=icinga2.server01.windows-Invoke-IcingaCheckCPU.Invoke-IcingaCheckCPU.perfdata.%2A.value'
+++ Excluded 0 metric(s)
+++ Combined 0 metric(s) to 0 chart(s)

I see that i applies the template ‘default-service’… It seems not to apply the template ‘cpu_windows_powershell_framework.ini’ which I suppose should be the correct one? Is that maybe the problem?

or is it actually the “Applying template ‘load-windows’” row that tells which template it’s using?

I had the same problem you simply need to change the name of the command to

“Invoke-IcingaCheck-cpu”

cpu must be lowercaps.

that worked for me

OK, you mean in the template? If so, in which template file? Or do you mean in the actual check command ?

in the actuall command

1 Like

Yes!!! :grinning: Thanks @ExeLeNtCrypt !

Perfect - Thanks @ExeLeNtCrypt !

Another question that maybe any of you can answer… what is causing the graphs to have “gaps” in them… like this for some:

but for instance the CPU looks like this (better!)

I assume it has to do with how the template is configured ? Or have I made an mistake in some config?

Noone has any clue of the above issue?

this could be the configuration of your storage-schema.conf

OK, I was also looking into that… This is how it looks right now:

pattern = ^carbon.
retentions = 60:90d

[icinga-hosts]
pattern = ^icinga2..*.host.
retentions = 5m:4w

[icinga-services]
pattern = ^icinga2..*.services.
retentions = 5m:12w,15m:26w,30m:1y

[icinga2_default]

intervals like PNP4Nagios uses them per default

pattern = ^icinga2.
retentions = 1m:2d,5m:10d,30m:90d,360m:4y
[default]
pattern = .*
retentions = 60s:1d,5m:30d,1h:3y

I actually also see that I cant see graphs older than 2 days… But according to the pattern the data should be there, right?

I saw some notes regarding storage-aggregation.conf, but I actually don’t have any such file at all in the /etc/carbon directory… I was following different setup guides so maybe I’ve missed some part?

I see older data on the CPU graphs, which was the ones we fixed before… so maybe the only thing I need to do is to set storage-schema to:
[icinga2_default]
pattern = ^icinga2.
retentions = 1m:2d,5m:10d,30m:90d,360m:4y

Then run the whisper-resize tool ? but how should I then run that?

so i am not really an expert on the gaphite stuff.

i run a less fine-grained schema:

[icinga_default]
pattern = ^icinga\.
retentions = 1m:2d,5m:10d,30m:90d,360m:4y

[default]
pattern = .*
retentions = 60s:1d,5m:30d,1h:3y

not sure what you mean with the whisper-resize tool?

1 Like