-
Notifications
You must be signed in to change notification settings - Fork 18
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
Interface perf data #56
Comments
Hi @gjarm93, the command I haven't tested it, but it should be possible to filter the check to a single interface via Please let me know if this fits your needs. |
./check_netscaler.pl -H hostname -u user -p pwd -s -C perfdata -o Interface -n rxbytesrate -f '0/1/1' It still gives all the interfaces even when filter is provided |
Ok, this isn't supposed to happen. Let me check this. |
Sorry, i was a bit wrong. The filter switch filters out an interface from your result, just as the name suggests. It should be possible to add a inverse filter via perl regular expression (like So a quick and very dirty solution would be to filter out all unwanted interfaces:
This may or may not solve your initial problem. Filtering is currently not supported for the perfdata command. This is because the sub check_threshold_and_get_perfdata is very generic. We do not know which field contain the item field. |
It seems like that it's also possible to filter the API response to a single interface.
But this will require some changes in the plugin code - and also this would be only an option for the Interfaces command. |
I would need perfdata since I'm looking for rxbytesrate to get current value instead of total(counter). Looks like /nitro/v1/config/Interface doesn't have a rate |
…word and check_threshold_and_get_perfdata (#56)
Have a look at 5c0ef0a. The commit adds a new Example usage:
|
Yes, for now this should work. Thank you! |
And are there any plans for future to again filter to get single interface? |
Since we now have a label for filtering, adding support for the |
I renamed the label switch from Examples:
TODOs:
|
It did the job, thank you!! |
## [1.6.1](v1.6.0...v1.6.1) (2020-09-18) ### Bug Fixes * add --seperator to allow to configure a custom perfdata seperator ([#47](#47)) ([9a9a1b1](9a9a1b1)) * add limit switch ('--limit', '-l') and change spec for label switch from '-l' to '-L' ([f396fbe](f396fbe)) * add release automation via semantic-release-bot ([19bb5d1](19bb5d1)) * add support for limit in more subs ([90b7995](90b7995)) * add the ability to set a custom perfdata label for sub check_keyword and check_threshold_and_get_perfdata ([#56](#56)) ([5c0ef0a](5c0ef0a)) * get host, user and password from environment variables (NETSCALER_HOST, NETSCALER_USERNAME, NETSCALER_PASSWORD) ([4cec658](4cec658)) * replace hardcoded id with $plugin->opts->label ([2c623d3](2c623d3))
The new switches are part of Release v1.6.1. |
./check_netscaler.pl -H hostname -u username -p passwd -s -C perfdata -o Interface -n rxbytesrate
NetScaler OK - perfdata: Interface.rxbytesrate[0]: 0; Interface.rxbytesrate[1]: 0; Interface.rxbytesrate[2]: 0; Interface.rxbytesrate[3]: 0; Interface.rxbytesrate[4]: 7941; Interface.rxbytesrate[5]: 3714; Interface.rxbytesrate[6]: 874196; Interface.rxbytesrate[7]: 4048; Interface.rxbytesrate[8]: 3677; Interface.rxbytesrate[9]: 2312; Interface.rxbytesrate[10]: 943678; Interface.rxbytesrate[11]: 7889; Interface.rxbytesrate[12]: 6122; Interface.rxbytesrate[13]: 0; Interface.rxbytesrate[14]: 104078; Interface.rxbytesrate[15]: 11635; Interface.rxbytesrate[16]: 6042; Interface.rxbytesrate[17]: 1817614; Interface.rxbytesrate[18]: 12097 | 'Interface.rxbytesrate[0]'=0;; 'Interface.rxbytesrate[1]'=0;; 'Interface.rxbytesrate[2]'=0;; 'Interface.rxbytesrate[3]'=0;; 'Interface.rxbytesrate[4]'=7941;; 'Interface.rxbytesrate[5]'=3714;; 'Interface.rxbytesrate[6]'=874196;; 'Interface.rxbytesrate[7]'=4048;; 'Interface.rxbytesrate[8]'=3677;; 'Interface.rxbytesrate[9]'=2312;; 'Interface.rxbytesrate[10]'=943678;; 'Interface.rxbytesrate[11]'=7889;; 'Interface.rxbytesrate[12]'=6122;; 'Interface.rxbytesrate[13]'=0;; 'Interface.rxbytesrate[14]'=104078;; 'Interface.rxbytesrate[15]'=11635;; 'Interface.rxbytesrate[16]'=6042;; 'Interface.rxbytesrate[17]'=1817614;; 'Interface.rxbytesrate[18]'=12097;;
It is giving rxbytesrate for all the interfaces.
Is there a way to get the metric for particular interface instead of all interfaces
or atleast the "id" value(i.e, the name of the interface) instead of [1],[2]...
The text was updated successfully, but these errors were encountered: