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

Citrix Netscaler - Use vserver full names #7279

Merged
merged 1 commit into from Sep 7, 2017

Conversation

Projects
None yet
5 participants
@mpatenaude
Contributor

mpatenaude commented Aug 31, 2017

Netscaler vserver names can be up to 127 chars long. The current db schema supports that but the actual polling was using vsvrName instead of vsvrFullName, therefore producing some random string names for vserver names longer than 30 chars (based on my observations).

Querying the SNMP agent with the Citrix MIB with something like:

snmptable -v2c -c READONLY123  -m "/srv/nms/librenms/mibs/citrix/NS-MIB-SMIV2-MIB" 10.11.12.13 vserverTable | awk '$0 !~ /^(SNMP|NS-ROOT)/ {print $1,$47;}' | column -t

Show the vsvrName vs vsvrFullName OID content:

vsvrName                           vsvrFullName
"v1test.example.dn-ssl"            "v1test.example.dn-ssl"
"v4test.example.dn-ssl"            "v4test.example.dn-ssl"
"IN5x1b508recfdlda1aghwbqrzfijap"  "v4test10-staging-intvserver-http"
"INrnvioacb39ujklzkl1fxdlz5v4wdb"  "test1.staging.example.dn-http-gslb"
"INnjxa2gd5mg54s9plgfchyapetvddp"  "testfeature-staging-intvserver-http"

As shown, longer vserver vsvrName are sent encoded (in something) but the vsvrFullName is always representative of the original configured vserver name.

With the proposed change, the vsvrFullName is used everywhere, including the RRD data files.

After some Googling, I found some references that this vsvrFullName OID was added in version 9 of the Netscaler. Considering that v9.x was EOL in 2015, it should be safe to use that OID without exception.

I also just found this:

https://gitlab.ctwug.za.net/librenms/librenms/commits/4edd835d0e03b3790e9ee9c947f597fe5752b8cb/includes/polling/netscaler-vsvr.inc.php

Looks like this exact change was attempted in 2012, but reverted the next day. I can't find the reason as to why, but possibly this was because the vsvrFullName was not available in all versions at that time.

Note that this change works without issue in our installation, but I am far from an expert in the polling code / SNMP in general.

Thanks,
Math.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926


This change is Reviewable

Use Netscaler vserver full names
Netscaler vserver names can be up to 127 chars long.  The current db schema supports that but the actual polling was using vsvrName instead of vsvrFullName, therefore producing some ramdom strings for vserver name longer than 30 chars.
@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Aug 31, 2017

Thank you for submitting a PR @mpatenaude! We have found the following @laf, @murrant and @tuxis-ie based on the history of these files to review this PR.

mention-bot commented Aug 31, 2017

Thank you for submitting a PR @mpatenaude! We have found the following @laf, @murrant and @tuxis-ie based on the history of these files to review this PR.

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Aug 31, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Aug 31, 2017

CLA assistant check
All committers have signed the CLA.

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Aug 31, 2017

The inspection completed: No new issues

scrutinizer-notifier commented Aug 31, 2017

The inspection completed: No new issues

@laf

laf approved these changes Sep 1, 2017

lgtm

@laf laf merged commit fea2f37 into librenms:master Sep 7, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@mpatenaude mpatenaude deleted the mpatenaude:Netscaler_vsvrFullName branch Sep 8, 2017

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.