Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: check_perfmon.exe - Change name of counter in output #5418

Closed
Stefar77 opened this issue Jul 16, 2017 · 8 comments
Closed
Labels
area/windows Windows agent and plugins enhancement New feature or request
Milestone

Comments

@Stefar77
Copy link
Contributor

When you create a check using check_perfmon.exe you can't change the name of the counter in the output / perfdata.

Current Behavior

check_perfmon.exe -P "\PhysicalDisk(_Total)\Current Disk Queue Length"

PERFMON OK "\PhysicalDisk(_Total)\Current Disk Queue Length" = 0

Possible Solution

Add a parameter like -N {Name} that if set will override the name in the Output and perfdata
check_perfmon.exe -P "\PhysicalDisk(_Total)\Current Disk Queue Length" -N "Disk Queue Length"
While at it maybe format the output a bit more like below. ;-)

PERFMON OK - Disk Queue Length: 0

This will also be less of a pain when making graphs.

@mcktr
Copy link
Member

mcktr commented Jul 17, 2017

For the perdata there is already a parameter

--perf-syntax arg                Use this string as name for the performance
                                 counter (graphite compatibility)

As mentioned this will only override the counter name in the perfdata. I don't know if it useful to change the name of the counter in the output because then you don't have any clue where those data come from (by only looking on the output).

@Stefar77
Copy link
Contributor Author

@mcktr You name the service so you know what it is, otherwise I need to rewrite it in our dashboard but you still see it when you get an alert from it, look in Icinga GUI or aNag.
I changed it in a patch in my repo but I need to compile stuff on Windows but I really hate Windows. :-)

@mcktr
Copy link
Member

mcktr commented Jul 17, 2017

@Stefar77 I get your point, but won't it be useful to use the existing parameter --perf-syntax for the rewrite? With adding a new parameter like -N we have two parameters that will do almost the same.

mcktr added a commit to mcktr/icinga2 that referenced this issue Jul 17, 2017
@Stefar77
Copy link
Contributor Author

True, in my case I would only need one parameter for all.
Service usually has a good name already, the output can say anything pointing people more in the right direction to know the issue.

Maybe other people would like the original counter name with " etc but I doubt it, if needed you can wrap it in your script but then you could also rewrite anything.. :-)

👍

@Crunsher
Copy link
Contributor

I don't think that makes sense for check_perfmon.
As @mcktr said, there is already --perf-syntax. And other than a prettier display, there is no reason for the user to change the non-performance output.
An additional parameter is out of the question (dosen't add enough) and changing --perf-syntax is an unexpected change I'd rather not have.

What's the issue with a wrapper script/changing it in the dashboard?

@Crunsher Crunsher added Plugins enhancement New feature or request labels Jul 18, 2017
@Stefar77
Copy link
Contributor Author

Stefar77 commented Jul 18, 2017

Here, it's just looking ugly on any dashboard.
I'll fix a Windows host to compile stuff on and I'll just use my own patched version of the plugin. 👎

noc

For this my dashboard could just rewrite it but in aNag and Icinga GUI it doesn't look nice. Also If you rename the name only for Carbon will Icinga still find the counter in Carbon?

Btw; this is only for a select amount of machines, most of our Windows hosts are monitored by SCOM and I pull performance data from the DWH.

@Crunsher
You still get an nasty looking alert in aNag, Icinga, Notification scripts etc. :-)
Such an easy fix and saves the trouble of wrapping the perfmon in a wrapper on the hosts.
Locally I'd just hack the poller or rewrite it in C or PHP and all looks nice and clean no matter where you look.

For Nagios my NOC dashboard is 60Kb of poller text rewrites, with Icinga I'm doing it right from the start.. :-)

Another Example:
image

@Crunsher
Copy link
Contributor

@N-o-X This is something for you. Don't forget to update the ITL and Documentation

@dnsmichi dnsmichi added the area/windows Windows agent and plugins label Aug 17, 2017
dnsmichi pushed a commit that referenced this issue Sep 18, 2017
This was split from #5416 and #5419.

More patches from #5419 are pending.

refs #5419
refs #5418
refs #5416

refs #5408
refs #5148
refs #5007
refs #4968
refs #4910
Crunsher added a commit that referenced this issue Nov 8, 2017
@Crunsher Crunsher self-assigned this Nov 8, 2017
Crunsher added a commit that referenced this issue Nov 8, 2017
@N-o-X N-o-X removed their assignment Nov 13, 2017
@dnsmichi dnsmichi added this to the 2.9.0 milestone Nov 28, 2017
@Crunsher
Copy link
Contributor

Closed with #d1d1c2e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/windows Windows agent and plugins enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants