Looking under the covers: Using SNMP to peek inside Erlang

Uploaded on

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

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

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide


  • 1. Looking Under The Covers Using SNMP to peek inside Erlang
  • 2. About me More stickers than a 40 years old RV!
  • 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. We Monitoring
  • 5. The Expected Monitoring the Erlang VM
  • 6. The Fun Stuff Monitoring your applications' guts
  • 7. Agenda SNMP 101 SNMP & Erlang Agent configuration Fixed and dynamic custom objects Standard VM / OTP objects
  • 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. SNMP 101, cont.
  • 10. SNMP 101, end SNMP world is a tree With OIDs All our Internet are belong to DOD You are*
  • 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. 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. Erlang SNMP Agent
  • 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. Getting started: Code application:start(snmp) snmpa:load_mibs(snmp_master_agent, ["snmp/MY-MIB"]) ... snmp_generic:variable_set(objectName, objectValue)
  • 16. Getting started: Tools Command line snmpwalk snmpget UI tkmib Monitoring Zabbix, Zenoss, Nagios... Graphing Cacti...
  • 17. Lab Time! Monitor: nodeName DisplayString gaugeValue Gauge32
  • 18. Creating Dynamic Objects Use tables when OID is not fixed Indexed rows Dynamic OID composed of ASCII codes == MyOID.Foo.1
  • 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. Lab Time! Monitor FS usage: / 74% /dev 1% /var/run 1%
  • 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. Lab Time! Monitor Erlang VM: erlNode* OTP-MIB load* OTP-OS-MON-MIB
  • 23. Moar Infoz!
  • 24. Thank you! Raffle courtesy of
  • 25. Source code http://www.dossot.net/misc/files/erlang-snmp.tar.gz