0
Looking
    Under The Covers
Using SNMP to peek inside Erlang
About me




      More stickers than a 40 years old RV!
About us




 Developing a platform for a new breed of social
 networking games
 Scalability is a must
 Back-end developed...
We


     Monitoring
The Expected

Monitoring the Erlang VM
The Fun Stuff

Monitoring your applications' guts
Agenda

 SNMP 101
 SNMP & Erlang
   Agent configuration
   Fixed and dynamic custom objects
   Standard VM / OTP objects
SNMP 101

 Simple Network Management Protocol
    Introduced in 1988
    Control & Monitoring
    Anything with an IP addr...
SNMP 101, cont.
SNMP 101, end

 SNMP world is a tree
 With OIDs
 All our Internet
 are belong to DOD
 You are 1.3.6.1.4.1.*
SNMP 101, end

   Management Information Base (MIB)
   Define what objects are handled by the agent
   "Interesting" synta...
SNMP & Erlang

 Full SNMP support:

 Manager, agent, traps, queries, security...
 Quickstart:

 http://www.trapexit.org/SN...
Erlang SNMP Agent
Getting started: Configuration

  Add all the agent boiler plate configuration
  Create a custom MIB
     Consider getting...
Getting started: Code

application:start(snmp)

snmpa:load_mibs(snmp_master_agent,
         ["snmp/MY-MIB"])

...

snmp_ge...
Getting started: Tools

  Command line
     snmpwalk
     snmpget
  UI
     tkmib
  Monitoring
     Zabbix, Zenoss, Nagios...
Lab Time!

            Monitor:
            nodeName
            DisplayString

            gaugeValue
            Gauge32
Creating Dynamic Objects

 Use tables when OID is not fixed
   Indexed rows
 Dynamic OID composed of ASCII codes

 1.3.6.1...
SNMP Table: Code

SnmpRow = {Data1, Data2, ..., DataN}

snmpa_local_db:table_create_row(
     tableName,
     Index,
     ...
Lab Time!

            Monitor FS usage:
            /      74%
            /dev     1%
            /var/run 1%
Standard Erlang SNMP

 OTP
    Single agent
    Table of all nodes in a cluster
    General info & stats
 OSMON
    Local ...
Lab Time!

            Monitor Erlang VM:
            erlNode*
            OTP-MIB

            load*
            OTP-OS-M...
Moar Infoz!
Thank you!


Raffle courtesy of
Source code
http://www.dossot.net/misc/files/erlang-snmp.tar.gz
Upcoming SlideShare
Loading in...5
×

Looking under the covers: Using SNMP to peek inside Erlang

3,640

Published on

Slides of the talk I gave at the Erlang meetup on the 20th of April 2010.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,640
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
56
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Transcript of "Looking under the covers: Using SNMP to peek inside Erlang"

  1. 1. Looking Under The Covers Using SNMP to peek inside Erlang
  2. 2. About me More stickers than a 40 years old RV!
  3. 3. About us Developing a platform for a new breed of social networking games Scalability is a must Back-end developed with Erlang/OTP And lots of other good stuff Front-end developed with Flex 4
  4. 4. We Monitoring
  5. 5. The Expected Monitoring the Erlang VM
  6. 6. The Fun Stuff Monitoring your applications' guts
  7. 7. Agenda SNMP 101 SNMP & Erlang Agent configuration Fixed and dynamic custom objects Standard VM / OTP objects
  8. 8. SNMP 101 Simple Network Management Protocol Introduced in 1988 Control & Monitoring Anything with an IP address Usually over UDP port 161 v2 is current, v3 is draft
  9. 9. SNMP 101, cont.
  10. 10. SNMP 101, end SNMP world is a tree With OIDs All our Internet are belong to DOD You are 1.3.6.1.4.1.*
  11. 11. SNMP 101, end Management Information Base (MIB) Define what objects are handled by the agent "Interesting" syntax nodeName OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current DESCRIPTION "Erlang node name" ::= { staticOid 1 }
  12. 12. SNMP & Erlang Full SNMP support: Manager, agent, traps, queries, security... Quickstart: http://www.trapexit.org/SNMP_Quick_Start Quicksand: [3,6,1,4,1,193,19]}. % {ericsson otp}
  13. 13. Erlang SNMP Agent
  14. 14. Getting started: Configuration Add all the agent boiler plate configuration Create a custom MIB Consider getting a Private Enterprise Number Compile .mib to .bin Compile .bin to .hrl (optional) OIDs, default values, ranges
  15. 15. Getting started: Code application:start(snmp) snmpa:load_mibs(snmp_master_agent, ["snmp/MY-MIB"]) ... snmp_generic:variable_set(objectName, objectValue)
  16. 16. Getting started: Tools Command line snmpwalk snmpget UI tkmib Monitoring Zabbix, Zenoss, Nagios... Graphing Cacti...
  17. 17. Lab Time! Monitor: nodeName DisplayString gaugeValue Gauge32
  18. 18. Creating Dynamic Objects Use tables when OID is not fixed Indexed rows Dynamic OID composed of ASCII codes 1.3.6.1.4.1.35458.3.70.111.111.1 == MyOID.Foo.1
  19. 19. SNMP Table: Code SnmpRow = {Data1, Data2, ..., DataN} snmpa_local_db:table_create_row( tableName, Index, SnmpRow) Index being one of Data... Don't forget the .funcs configuration
  20. 20. Lab Time! Monitor FS usage: / 74% /dev 1% /var/run 1%
  21. 21. Standard Erlang SNMP OTP Single agent Table of all nodes in a cluster General info & stats OSMON Local node Detailed stats Good luck to find these MIBs :)
  22. 22. Lab Time! Monitor Erlang VM: erlNode* OTP-MIB load* OTP-OS-MON-MIB
  23. 23. Moar Infoz!
  24. 24. Thank you! Raffle courtesy of
  25. 25. Source code http://www.dossot.net/misc/files/erlang-snmp.tar.gz
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×