| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
| tech:notes_snmp [2025/04/03 12:30] – Jean-Baptiste | tech:notes_snmp [2026/02/26 11:44] (Version actuelle) – Jean-Baptiste |
|---|
| Voir : | Voir : |
| * [[Notes SNMPv3]] | * [[Notes SNMPv3]] |
| | * https://www.net-snmp.org/docs/FAQ.html |
| * https://wiki.deimos.fr/SNMP_:_Le_protocole_de_gestion_r%C3%A9seaux.html | * https://wiki.deimos.fr/SNMP_:_Le_protocole_de_gestion_r%C3%A9seaux.html |
| * https://makina-corpus.com/python/initiation-snmp-avec-python-pysnmp-partie-1-le-protocole-et-les-commandes | * https://makina-corpus.com/python/initiation-snmp-avec-python-pysnmp-partie-1-le-protocole-et-les-commandes |
| * [|Les traps SNMP](https://documentation-fr.centreon.com/docs/centreon/en/2.8.x/configuration_guide/advanced_configuration/traps.html) | |
| * [snmptt](https://servicenav.coservit.com/documentations/2-creer-un-fichier-de-definition-trap/) | |
| * [How to define trapsess for snmpv3 without plain passwords in Red Hat Enterprise Linux 6](https://access.redhat.com/solutions/969183) | |
| * http://www.sugarbug.web4me.fr/atelier/techniques/monitoring_lan/snmp/ | * http://www.sugarbug.web4me.fr/atelier/techniques/monitoring_lan/snmp/ |
| * https://support.zoho.com/portal/manageengine/kb/articles/configuring-snmp-on-redhat-linux-server | * https://support.zoho.com/portal/manageengine/kb/articles/configuring-snmp-on-redhat-linux-server |
| * https://docs.redhat.com/fr/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-system_monitoring_tools-net-snmp#sect-System_Monitoring_Tools-Net-SNMP-Retrieving | * https://docs.redhat.com/fr/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-system_monitoring_tools-net-snmp#sect-System_Monitoring_Tools-Net-SNMP-Retrieving |
| * https://blog.cedrictemple.net/290-configuration-avancee-de-snmp-sur-linux-les-informations-systemes/ | * https://blog.cedrictemple.net/290-configuration-avancee-de-snmp-sur-linux-les-informations-systemes/ |
| | |
| | Voir les traps SNMP : |
| | * [Les traps SNMP](https://documentation-fr.centreon.com/docs/centreon/en/2.8.x/configuration_guide/advanced_configuration/traps.html) |
| | * [snmptt](https://servicenav.coservit.com/documentations/2-creer-un-fichier-de-definition-trap/) |
| | * [How to define trapsess for snmpv3 without plain passwords in Red Hat Enterprise Linux 6](https://access.redhat.com/solutions/969183) |
| | * https://docs.centreon.com/fr/docs/monitoring/passive-monitoring/enable-snmp-traps/ |
| |
| |
| ''/etc/snmp/snmpd.conf'' | ''/etc/snmp/snmpd.conf'' |
| ~~~ | ~~~ |
| # rwuser: a SNMPv3 read-write user | # rouser: a SNMPv3 read-write user |
| # arguments: user [noauth|auth|priv] [restriction_oid] | # arguments: user [noauth|auth|priv] [restriction_oid] |
| |
| rwuser nagios auth | rouser nagios auth |
| rwuser nagios | |
| ~~~ | ~~~ |
| |
| Exemples : | Exemples : |
| ~~~bash | ~~~bash |
| | # snmpwalk -t "$timeout" -r "$retries" |
| | # '-Cc' Use this option to ignore number not increasing error |
| | |
| snmpwalk -v2c -c public localhost system | snmpwalk -v2c -c public localhost system |
| #snmpwalk -v <laversion> -c <lacommunaute> <adresseip> <oid> | #snmpwalk -v <laversion> -c <lacommunaute> <adresseip> <oid> |
| # snmpwalk -v2c -c public 192.168.1.13 | # snmpwalk -v2c -c public 192.168.1.13 |
| ~~~ | ~~~ |
| | |
| | Pour debug |
| | ~~~bash |
| | snmpwalk -d -DAll |
| | ~~~ |
| | |
| |
| ### snmpget | ### snmpget |
| command_line $USER1$/check_snmp -H $HOSTADDRESS$ -P3 -L authNoPriv -a MD5 -U $USER3$ -A "$USER4$" -c 1,1 -o IF-MIB::ifOperStatus.$ARG1$ | command_line $USER1$/check_snmp -H $HOSTADDRESS$ -P3 -L authNoPriv -a MD5 -U $USER3$ -A "$USER4$" -c 1,1 -o IF-MIB::ifOperStatus.$ARG1$ |
| } | } |
| | ~~~ |
| | |
| | |
| | ''switch.cfg'' |
| | ~~~c |
| | define service{ |
| | use generic-service ; Inherit values from a template |
| | host_name linksys-srw224p |
| | service_description Port 1 Link Status |
| | check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB |
| | } |
| | |
| ~~~ | ~~~ |
| |