Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
2.03k stars 579 forks source link

[dev.icinga.com #9906] Using perfmon-windows plugin counters with % symbol are not found. #3263

Closed icinga-migration closed 9 years ago

icinga-migration commented 9 years ago

This issue has been migrated from Redmine: https://dev.icinga.com/issues/9906

Created by ollybee on 2015-08-14 14:03:19 +00:00

Assignee: (none) Status: Rejected (closed on 2015-10-15 12:51:23 +00:00) Target Version: (none) Last Update: 2015-10-15 12:51:23 +00:00 (in Redmine)

Icinga Version: 2.3.6
Backport?: Not yet backported
Include in Changelog: 1

There seems to be no way to escape the % symbol

This only happens when running this as a remote check. Executing the plugin directly on the Windows host is fine.

I've tested this with a number of performance counters.

This fails vars.perfmon_win_counter = "\\Processor(0)\\% C1 Time" This is OK vars.perfmon_win_counter = "\\Processor(0)\\C1 Transitions/sec"


Relations:

icinga-migration commented 9 years ago

Updated by mfriedrich on 2015-08-21 19:01:42 +00:00

What exactly do you mean by escaping the percent sign? Please show the corresponding log output from the debug log's command execution.

icinga-migration commented 9 years ago

Updated by mfriedrich on 2015-09-24 20:07:25 +00:00

No feedback received, I'm closing this issue.

icinga-migration commented 9 years ago

Updated by ollybee on 2015-09-25 10:40:44 +00:00

What exactly do you mean by escaping the percent sign? I meant that percentage symbol was not listed in the list of characters that could be escaped in the documentaiton. I sisnce noticed that any charecter could be escaped with backslash character followed by an ASCII character in octal encoding but this doesn't help me.

Please show the corresponding log output from the debug log's command execution. I should have done this inserted. I can see that a space is inserted before the percentage symbol.

From the debug logs on the satellite windows server: [2015-09-25 11:16:54 GMT Daylight Time] notice/Process: PID 20176 ('"C:\Program Files (x86)\ICINGA2/sbin/check_perfmon.exe" "--fmt-countertype" "double" "-P" "\Hyper-V Hypervisor Virtual Processor(EUK-21686-40831:Hv VP 0)\ % Guest Run Time"') terminated with exit code 3

From the config on the master: vars.perfmon_win_counter = [ "\\Hyper-V Hypervisor Virtual Processor(EUK-21686-40831:Hv VP 0)\\% Guest Run Time" ]

I've tried a number of variations and each time the check_perfmon.exe plug-in is executed with an additional space before the percentage symbol in the performance counter string. If the performance counter string. does not contain a percentage symbol everything works as expected.

UPDATE: I can reproduce this with other plugins. If I try to use the check_disk to check a path "c:\testing" then the logs show an attempt to check "c:\testing" I've not tried on a Linux host yet.

icinga-migration commented 9 years ago

Updated by mfriedrich on 2015-10-15 12:50:49 +00:00

icinga-migration commented 9 years ago

Updated by mfriedrich on 2015-10-15 12:51:23 +00:00

This will be fixed in 2.3.11. See #10245 for details.