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 to disableAuthorization and allow incoming traps:

disableAuthorization yes
authCommunity   log,execute,net public

3. Add the AS-PLATFORM.MIB file from the FAS /opt/cafex/FAS-2.5.5/docs/mibs folder to the /usr/share/snmp/mibs/ folder on the SNMP listener box and rename it AS-PLATFORM-MIB.txt

4. As per the http://net-snmp.sourceforge.net/wiki/index.php/TUT:Configuring_snmptrapd_to_parse_MIBS_from_3rd_party_Vendorsadd these environmental variables to pick up the MIB.

export MIBDIRS=/usr/share/snmp/mibs/
export MIBS=MIBS=AS-PLATFORM-MIB:ALARM-MIB:RMON2-MIB:TOKEN-RING-RMON-MIB:SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB

Note: ALARM-MIB,RMON2-MIB and TOKEN-RING-RMON-MIB are publicly available MIBs that are referenced from the MIBS=AS-PLATFORM-MIB. Adding them to the MIBS variable and mibs folder stops warnings messages being logged at snmptrapd start up.

5. Then start in foreground: 

snmptrapd -f -Lo -c /etc/snmp/snmptrapd.conf

 

You should now see traps. The following are the traps for a FAS restart:

NET-SNMP version 5.7.2

2017-06-06 10:50:03 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (14243) 0:02:22.43        SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerConnection   AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.20.97.112.112.115.101.114.118.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:05 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (14421) 0:02:24.21        SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerConnection   AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.23.108.111.97.100.98.97.108.97.110.99.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:15 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (54) 0:00:00.54   SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::coldStart

2017-06-06 10:50:15 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (70) 0:00:00.70   SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerGroupDown    AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.2.17.109.97.105.110.45.115.101.114.118.101.114.45.103.114.111.117.112 AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:15 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (70) 0:00:00.70   SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerGroupDown    AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.2.17.109.103.109.116.45.115.101.114.118.101.114.45.103.114.111.117.112        AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:15 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (71) 0:00:00.71   SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerGroupDown    AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.2.15.108.98.45.115.101.114.118.101.114.45.103.114.111.117.112 AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:25 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (1060) 0:00:10.60 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerGroupDown  AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.2.17.109.97.105.110.45.115.101.114.118.101.114.45.103.114.111.117.112 AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

2017-06-06 10:50:25 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (1060) 0:00:10.60 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerGroupDown  AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.2.17.109.103.109.116.45.115.101.114.118.101.114.45.103.114.111.117.112        AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

2017-06-06 10:50:25 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (1063) 0:00:10.63 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerGroupDown  AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.2.15.108.98.45.115.101.114.118.101.114.45.103.114.111.117.112 AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

2017-06-06 10:50:30 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (1541) 0:00:15.41 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerConnection   AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.20.97.112.112.115.101.114.118.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:30 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (1553) 0:00:15.53 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerConnection   AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.23.108.111.97.100.98.97.108.97.110.99.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:30 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (1564) 0:00:15.64 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetServerConnection   AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.10.109.97.110.97.103.101.109.101.110.116    AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:38 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (2339) 0:00:23.39 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerConnection AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.23.108.111.97.100.98.97.108.97.110.99.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

2017-06-06 10:50:38 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (2359) 0:00:23.59 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerState      AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.23.108.111.97.100.98.97.108.97.110.99.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapStringState = STRING: running

2017-06-06 10:50:38 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (2361) 0:00:23.61 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformSetNodesNotRegisteredWithLoadbalancer AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.3.23.108.111.97.100.98.97.108.97.110.99.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: false(2)

2017-06-06 10:50:39 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (2479) 0:00:24.79 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerConnection AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.10.109.97.110.97.103.101.109.101.110.116    AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

2017-06-06 10:50:39 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (2489) 0:00:24.89 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerState      AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.10.109.97.110.97.103.101.109.101.110.116    AS-PLATFORM-MIB::platformTrapStringState = STRING: running

2017-06-06 10:51:11 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (5669) 0:00:56.69 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerConnection AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.20.97.112.112.115.101.114.118.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

2017-06-06 10:51:11 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (5681) 0:00:56.81 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearServerState      AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.1.20.97.112.112.115.101.114.118.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapStringState = STRING: running

2017-06-06 10:51:13 cs-rdoyle4.cafex.com [UDP: [192.168.8.91]:8161->[192.168.8.46]:162]:

RFC1213-MIB::sysUpTime.0 = Timeticks: (5844) 0:00:58.44 SNMPv2-MIB::snmpTrapOID.0 = OID: AS-PLATFORM-MIB::platformClearNodesNotRegisteredWithLoadbalancer       AS-PLATFORM-MIB::platformTrapResourceId = OID: AS-PLATFORM-MIB::platformObjects.2.3.23.108.111.97.100.98.97.108.97.110.99.101.114.45.99.115.45.114.100.111.121.108.101.52       AS-PLATFORM-MIB::platformTrapBooleanState = INTEGER: true(1)

 

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

Have more questions? Submit a request

Comments

Powered by Zendesk