Configuring SNMP with FAS

Introduction

You can configure FAS to send SNMP traps to a listener. In this below example we are going to send SNMP traps to a linux server running snmptrapd (server on 192.168.8.222)/

Setup FAS to send traps

Connect to jboss cli:

[root@fas]# /opt/cafex/FAS-2.1.25/bin/jboss-cli.sh

[disconnected /] connect cs-fcsdk21.cafex.com:9999

Authenticating against security realm: ManagementRealm
Username: administrator
Password:

Add the target IP to send (any name can be used to define the snmp receiver):

[domain@fas:9999 /] /profile=management/subsystem=snmp_subsystem/trap-target=<snmp-receiver>/:add(protocol=SNMPv2c,ip=192.168.8.222,port=162)

{
"outcome" => "success",
"result" => undefined,
"server-groups" => {"mgmt-server-group" => {"host" => {"master-cs-fcsdk21" => {"management" => {"response" => {"outcome" => "success"}}}}}}
}

Restart SNMP

[domain@fas:9999 /] /profile=management/subsystem=snmp_subsystem/:restart-snmp
{
"outcome" => "success",
"result" => undefined,
"server-groups" => {"mgmt-server-group" => {"host" => {"master-cs-fcsdk21" => {"management" => {"response" => {"outcome" => "success"}}}}}}
}

To remove snmp listener

[domain@cs-fcsdk.cafex.com:9999 /] /profile=management/subsystem=snmp_subsystem/trap-target=<snmp-receiver>/:remove)                   = {                     

    "outcome" => "success",

    "result" => undefined,

    "server-groups" => {"mgmt-server-group" => {"host" => {"master-cs-fcsdk" => {"management" => {"response" => {"outcome" => "success"}}}}}}

}

               = {                     

 

Optional - set up a listener to test

  1. On a linux server install net-snmp
  2. Edit /etc/snmp/snmptrapd.conf & allow incoming traps:
  3. authCommunity   log,execute,net public
  4. Then start in foreground: 
  5. snmptrapd -f -Lo -c /etc/snmp/snmptrapd.conf

 

You should see traps:

2016-05-12 12:05:04 <UNKNOWN> [UDP: [192.168.8.153]:8161->[192.168.8.222]]:

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (208) 0:00:02.08 SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.7377.100.0.2.2 SNMPv2-SMI::enterprises.7377.100.1.1.1 = OID: SNMPv2-SMI::enterprises.7377.100.1.2.1.10.109.97.110.97.103.101.109.101.110.116 SNMPv2-SMI::enterprises.7377.100.1.1.4.1 = STRING: "running"

 

Comments are disabled on these articles if you require help contact support@cafex.com.

Have more questions? Submit a request

Comments

Powered by Zendesk