Archives pour l'étiquette Snmpd

Xen Erreur : « netsnmp_assert __extension__ »

netsnmp_assert extension

Dans votre /var/log/syslog vous trouvez ce type de message toute les minutes ou 30 secondes ?

netsnmp_assert __extension__ <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span> size_t __s1_len, __s2_len; <span style="color: #7a0874; font-weight: bold;">&#40;</span>__builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> __builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>__s1_len = strlen <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span>, __s2_len = strlen <span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">||</span> __s1_len <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">||</span> __s2_len <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ? __builtin_strcmp <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name, ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> : <span style="color: #7a0874; font-weight: bold;">&#40;</span>__builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>__s1_len = strlen <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span>, __s1_len <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ? <span style="color: #7a0874; font-weight: bold;">&#40;</span>__builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ? __builtin_strcmp <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_c May <span style="color: #000000;">20</span> <span style="color: #000000;">10</span>:<span style="color: #000000;">58</span>:<span style="color: #000000;">43</span> elara snmpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">3010</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: netsnmp_assert __extension__ <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#123;</span> size_t __s1_len, __s2_len; <span style="color: #7a0874; font-weight: bold;">&#40;</span>__builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> __builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>__s1_len = strlen <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span>, __s2_len = strlen <span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">||</span> __s1_len <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">!</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">||</span> __s2_len <span style="color: #000000; font-weight: bold;">&gt;</span>= <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ? __builtin_strcmp <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name, ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> : <span style="color: #7a0874; font-weight: bold;">&#40;</span>__builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>__s1_len = strlen <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_ctx-<span style="color: #000000; font-weight: bold;">&gt;</span>data.ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span>, __s1_len <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000;">4</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ? <span style="color: #7a0874; font-weight: bold;">&#40;</span>__builtin_constant_p <span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> - <span style="color: #7a0874; font-weight: bold;">&#40;</span>size_t<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>const void <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>ifentry-<span style="color: #000000; font-weight: bold;">&gt;</span>name<span style="color: #7a0874; font-weight: bold;">&#41;</span> == <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> ? __builtin_strcmp <span style="color: #7a0874; font-weight: bold;">&#40;</span>rowreq_c

La Cause

Il existe peu de littérature sur le net à propose de ce message d’erreur. Cependant un bug report existe chez RedHat à propos snmpd. Sur Debian Etch 4.0 la version de snmpd est la 5.2. Upgrader en 5.3 comme préconisé dans la solution a ce bug en compilant le tente moyen moyen.

Quelques messages sur sur les mailling-list de xensource.com rester sans réponse, dont celui ci Problem with dom0 and snmpd.

Solution de contournement

A défaut de pouvoir mettre à jour snmpd, on peux le faire taire. J’ai trouver ici le bon paramètre : Snmpd filling up /var/log/messages. Donc il est possible de limité l’écriture dans les log au chose hyper importante.

Dans /etc/default/snmpd j’ai modifier la ligne suivante.

<span style="color: #808080; font-style: italic;"># SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'</span>

par

<span style="color: #007800;">SNMPDOPTS=</span><span style="color: #ff0000;">'-LS 0-4 d -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'</span>

Les paramètres « 0-4 » signifie que les « warning messages », « errors », « alerts » et « critical messages » sont logger par contre tout ce qui est « notice info » et « debug level messages » sont ignoré. Depuis cette modification c’est plus silencieux 🙂

Installation de SNMPD

SNMPD

SNMPD pour snmpd Alias Simple Network Management Protocol Deamon

Rien de plus simple :


apt-get install snmpd

C’était le plus simple

La configuration de SNMPD

:

Le fichier de configuration est celui ci /etc/snmp/snmpd.conf. Je vous conseil de commencer par le sauvegarder dans un coin.


cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.back

Voici un exemple de configuration du fichier /etc/snmp/snmpd.conf :


syscontact root@karlesnine.com
syslocation Paris, France

# 1° créer des relations entre les communautés et des noms de sécurité
# nom.secu source communaute
com2sec LocalNet 10.1.1.1/32 public
com2sec LocalNet 127.0.0.1 public

# 2° créer des relations entre des noms de groupes et les noms de sécurité
# nom.groupe version nom.secu
group ROGroup v1 LocalNet

#3° Créer les diverses vues qui seront autorisées aux groupes
#
view tout included .1

#4° Indiquee les accès aux vues suivant les groupes
# nom.groupe contexte modele.secu niveau.secu prefixe lecture ecriture notification
access ROGroup "" v1 noauth exact tout none none

Avec cette configuration la machine du réseau 10.1.1.0/32 (oui avec un /32 cela correspond à un unique machine, celle qui fait tourner Cacti) pourra faire des requêtes SNMP sur la communauté « public » en lecture seul. Elle pourra récupérer tous les infos « standart »

Le daemon SNMPD

Par défaut sous Debian 4.0 « Etch » ou autre le daemon SNMPd écoute uniquement sur l’ip 127.0.0.1.

Pour constater la chose, suivez la dame :

# netstat -lapute | grep snmp udp 0 0 127.0.0.1:snmp * :* root 157682 17419/snmpd

Si vous effectuez des requêtes SNMP depuis une autre machine, il vous suffit de modifier le fichier /etc/default/snmpd et de remplacer 127.0.0.1 par l’adresse IP sur laquel SNMPd doit écouter ou, alors, totalement enlever 127.0.0.1. Ainsi SNMPD écoutera sur toutes les interfaces.

On avait snmpd en écoute seulement sur le loopback :


SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'

Et maintenant on a snmpd en écoute sur toute les interfaces. :


SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

Relance du daemon :

Pour prendre en compte tous nos changements il faut relancer le daemon SNMPd :


/etc/init.d/snmpd stop
/etc/init.d/snmpd start

Voila c’est fini.