Jump to content
Welcome to our new Citrix community!

SNMPD.CONF examples?


Jim Tsetsos

Recommended Posts

I want to be able to discover Netscaler using snmp, I don't have a proper example of the snmpd.conf file that installed with the docker container.

 

All that I could find is /cpx/nsconfig/snmpd.conf

 

It contains only one entry, the number "3", obviously this is not going to work.

 

[root@master00 bin]# docker port awesome_gates
161/udp -> 0.0.0.0:32768
22/tcp -> 0.0.0.0:32769
80/tcp -> 0.0.0.0:32768

 

[root@master00 bin]# ssh nsroot@localhost -p 32769

nsroot@16f4cfbdd580:~# ps -ef | grep snmpd
root        441      1  0 04:41 ?        00:00:01 /var/netscaler/bins/snmpd

 

root@16f4cfbdd580:~# cd /var/netscaler/bins
root@16f4cfbdd580:/var/netscaler/bins# ./cli_script.sh "show ns config"
exec: show ns config
    NetScaler IP: 172.17.0.2  (mask: 255.255.0.0)
    Number of MappedIP(s): 0
    Node: Standalone
    NetScaler IP Vlan: 1 Tagged: NO Bound Ports: 
                       System Time: Thu Sep  3 05:57:23 2020
          Last Config Changed Time: Thu Sep  3 00:36:01 2020
    Config Changed since Last Saved Config: TRUE
Done


root@16f4cfbdd580:/var/netscaler/bins# ./cli_script.sh "show ns version"
exec: show ns version
    NetScaler NS12.0: Build 56.20.nc-b64, Date: Dec 19 2017, 18:35:07  
Done


 

Can someone please share a working version of snmpd.conf I can modify and use?

 

I have also tried the following snmpd.conf options, killed the snmpd process, checked to see if has restarted and I still am unable to browse (I'm using iReasoning MIB Browser)

 

rocommunity public
agentAddress udp:127.0.0.1:161
agentAddress udp:161,udp6:[::1]:161
 

 

Kind Regards

Jim

Edited by jtsetsos
Link to comment
Share on other sites

Quote

 

By discovering ADC, do you mean to be able to fetch counters from ADC using snmp?  

 

For fetching counters/generating traps we need to first do snmp config on the ADC. And then load the snmp MIB file(/netscaler/snmp/) from ADC to remote manager.

 

File snmpd.conf is for internal purpose. Please do not edit this file.

We can configure snmp related configuration through CLI/GUI.

 

Please refer the below link for doing snmp related config.

https://docs.citrix.com/en-us/netscaler/12/getting-started-with-netscaler/configure-system-settings/configure-snmp.html

 

For snmp-v2 walk we need to configure snmp community. And then use this community string to fetch the counters.

 

Command:-  add snmp community <community_name> <permission>

 

Thanks,

Arjun

Link to comment
Share on other sites

5 hours ago, Arjun Dhakad said:

 

Command:-  add snmp community <community_name> <permission>

 

 

Thanks Arjun, I'll add the community string as per provided and will try.

 

I'm attempting to discover using ServiceNow Discovery as documented here. 

 

https://docs.servicenow.com/bundle/orlando-it-operations-management/page/product/discovery/concept/c_LoadBalancerCitrixNetscaler.html

 

You'll see in the link provided, to successfully classify the appliance SNMP objects need to be discovered.

 

As I understand there is no GUI and need to rely on CLI - Is there a comprehensive list of commands documented that you are able to share?

 

Kind Regards

Jim 

Link to comment
Share on other sites

10 minutes ago, Jim Tsetsos said:

 

Command:-  add snmp community <community_name> <permission>

 

 

BTW Arjun, what values can I use for <permission> parameter?

 

I've tried the following without success:

 

[root@master00 /]# ssh root@localhost -p 32779
The authenticity of host '[localhost]:32779 ([127.0.0.1]:32779)' can't be established.
ECDSA key fingerprint is SHA256:Pfrv9PCkAnmQG8B+dii1GPQC1+GV/xuZbT/D7QJ8ac8.
ECDSA key fingerprint is MD5:e7:d4:24:8f:76:4a:11:34:47:3b:1f:07:e8:f3:b3:05.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:32779' (ECDSA) to the list of known hosts.
root@localhost's password: 
Welcome to nsoslx 1.0 (GNU/Linux 3.10.0-1062.18.1.el7.x86_64 x86_64)

 * Documentation: https://www.citrix.com/
Last login: Fri Sep  4 01:21:48 2020 from 192.0.0.1
root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community public public"
exec: add snmp community public public
ERROR: Invalid argument value [public]
root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community public ro"
exec: add snmp community public ro
ERROR: Invalid argument value [ro]
root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community public rw"
exec: add snmp community public rw
ERROR: Invalid argument value [rw]
root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community public read"
exec: add snmp community public read
ERROR: Invalid argument value [read]
root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community public rocommunity"
exec: add snmp community public rocommunity
ERROR: Invalid argument value [rocommunity]
root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community rocommunity public"
exec: add snmp community rocommunity public
ERROR: Invalid argument value [public]
root@90aa6480c7cf:~# 
 

Link to comment
Share on other sites

Ok Arjun, I think I have it...

 

After adding community with public all permissions, I can now travers the SNMP Agent

 

root@90aa6480c7cf:~# /var/netscaler/bins/cli_script.sh "add snmp community public all"
exec: add snmp community public all
Done
 

 

image.thumb.png.0756e7ab0cb3914fb3aae8f4104472c6.png

 

I'd still like a cli complete reference if one is available...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...