SNMP for cloud Jean Parpaillon SNMP4cloud - 1
SNMP4cloud - 2
API SNMP4cloud - 3
Modèle API SNMP4cloud - 4
Modèle API Mise en oeuvre SNMP4cloud - 5
Modèle Langages A, B, C API Mise en oeuvre SNMP4cloud - 6
Modèle Langages A, B, C API Langages α, β, γ Mise en oeuvre SNMP4cloud - 7
Modèle API Mise en oeuvre Langages A, B, C Langages α, β, γ Langages x, y, z SNMP4cloud - 8
MIB Cloud Protocole SNMP PDU SMI Réseau Modèle Langage SNMP4cloud - 9
SNMP SNMP4cloud - 10
SNMP SNMP4cloud - 11
SNMP SNMP4cloud - 12
SNMP SNMP4cloud - 13
SNMP SNMP4cloud - 14
SNMP 1 Un protocole réseau Agent Manager SNMP4cloud - 15
SNMP 1 Un protocole réseau 2 Gestion de la sécurité : - v1/2c : mot de passe en clair - v3 : communications chiffrées Agent Manager SNMP4cloud - 16
SNMP 1 Un protocole réseau 2 Gestion de la sécurité : - v1/2c : mot de passe en clair - v3 : communications chiffrées 3 Remontées d'alertes (TRAP) Agent Manager SNMP4cloud - 17
SNMP Agent GET.1.3.6.1.2.1.45.0 42 Manager SNMP4cloud - 18
SNMP Agent SET.1.3.6.1.2.1.45.0 = 10 10 Manager SNMP4cloud - 19
SNMP Agent GETNEXT.1.3.6.1.2.1.45.0.1.3.6.1.2.1.46.0 Manager SNMP4cloud - 20
SNMP Agent Manager.1.3.6.1.2.1.3.12.0 = 11! SNMP4cloud - 21
.1.3.6.1.2.1.25.2.3.1.5?!! SNMP4cloud - 22
.1.3.6.1.2.1.25.2.3.1.5 MIB SNMP4cloud - 23
MIB.1.3.6.1.2.1.25.2.3.1.5 HOST-RESOURCES-MIB::hrStorageSize hrstoragesize OBJECT-TYPE -- FROM HOST-RESOURCES-MIB SYNTAX Integer32 (0..2147483647) MAX-ACCESS read-write STATUS current DESCRIPTION "The size of the storage represented by this entry, in units of hrstorageallocationunits. This object is writable to allow remote configuration of the size of the storage area in those cases where such an operation makes sense and is possible on the underlying system. For example, the amount of main memory allocated to a buffer pool might be modified or the amount of disk space allocated to virtual memory might be modified." ::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) host(25) hrstorage(2) hrstoragetable(3) hrstorageentry(1) 5 } SNMP4cloud - 24
MIB La MIB, comment ça marche? SNMP4cloud - 25
MIB - Un modèle de données : arbre de couples clés/valeur ccitt(0) iso(1) iso-ccitt(2) standard(0) org(3) dod(6) internet(1) directory(1) mgmt(2) experimental(3) private(4) security(5) mib-2(1) entreprise(1) system(1) interfaces(2) at(3) ip(4) icmp(5) sysdescr(1) sysuptime(3) SNMP4cloud - 26
MIB - Chaque branche décrite par un module ccitt(0) iso(1) iso-ccitt(2) standard(0) org(3) dod(6) SNMPv2-SMI internet(1) SNMPv2-MIB directory(1) mgmt(2) experimental(3) private(4) security(5) mib-2(1) entreprise(1) system(1) interfaces(2) at(3) ip(4) icmp(5) sysdescr(1) sysuptime(3) IF-MIB SNMP4cloud - 27
MIB - Un langage : SMI ASN.1 ENTITY-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-TYPE, mib-2, NOTIFICATION-TYPE, Integer32 FROM SNMPv2-SMI -- The Physical Entity Table entphysicaltable OBJECT-TYPE SYNTAX SEQUENCE OF EntPhysicalEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "This table contains one row per physical entity. There is always at least one row for an 'overall' physical entity." ::= { entityphysical 1 } SNMP4cloud - 28
MIB - Structure d'un module Imports depuis modules tiers Déclarations de types Déclaration variables documentées Déclaration des traps SNMP4cloud - 29
Mise en œuvre? SNMP4cloud - 30
Mise en œuvre Agent master MIB-A MIB-B AgentX SNMP MIB-C Manager SNMP4cloud - 31
Mise en œuvre mib2c python-agentx etc. Exemple : LIBVIRT-MIB : - 2000 lignes de C - 1750 lignes générées SNMP4cloud - 32
SNMP4cloud? 1.1 Recenser modules existants 1.2 Mettre en œuvre, compléter les mises en œuvre 2.1 Écrire nouveaux modules 2.2 Mettre en œuvre nouveaux modules SNMP4cloud - 33
SNMP4cloud? 1.1 Recenser modules existants 1.1.1 Standards : - Gestion rése au : IF-MIB, IP-MIB, BRIDGE-MIB, etc. - Resources systèmes : HOST-RESOURCES-MIB - statiques, dynamiques - hardware, software, processus, etc. - Topologie système : ENTITY-MIB - etc. 1.1.2 Non-standards : - Gestion de machines virtuelles : LIBVIRT-MIB - À compléter (libvirt) - etc. SNMP4cloud - 34
SNMP4cloud? 1.2 Mettre en œuvre, compléter les mises en œuvre 1.2.1 Gérer un serveur FTP ou HTTP : WWW-MIB 1.2.2 net-snmp sous Linux (entre autres) : read-only 1.2.3 libvirt : projet débuté en Février 2011 SNMP4cloud - 35
SNMP4cloud? 2.1 Écrire nouveaux modules 2.1.1 cf 1.1 (recenser) 2.1.2 Demander un PEN (Private Enterprise Number) auprès de l'iana pour l'ow2?.1.3.6.1.4.1.ow2 SNMP4cloud - 36
SNMP4cloud? 2.2 Mettre en œuvre nouveaux modules SNMP4cloud - 37
Démo SNMP4cloud - 38
Liens - Annuaire de ressources SNMP : http://snmplink.org - Net-SNMP, implémentation UNIX : http://www.net-snmp.org/ - PEN application form : http://pen.iana.org/ - Navigateur de MIB (CISCO) http://tools.cisco.com/support/snmp/do/browseoid.do SNMP4cloud - 39